Pixel Shader Effect Rendering

[REMIX]

[php] include(TEMPLATEPATH.”/includes/breadcrumb.php”);[/php]

[php] the_title(); [/php]

Demonstrates a pixel shader effect on a source image. The shader code flips the picture in the y-direction and inverts the image colours. The second image (bottom) is bound in XAML code to the source image and displays the original picture before the shader code is applied. This application shows that the shader modifies the rendering of the image but does not modify the original image pixels.

This can be clearly seen in two ways. Firstly the the cloned image is ‘bound’ to display the source image at all times. If the pixels of the original source picture changes then so would the cloned image. Secondly, the pixel shader effect can be switched on/off at any time to disable the effect rendering. When the effect is switched off the source image is displayed without the modified pixel shader code applied prior to rendering (i.e. just displays the image as is, with no effect code).

To summarise, it is interesting to note that pixel shaders do not fundamentally modify the image source pixels, they only modify the rendered output. This is why the cloned image always displays the original source image, regardless of whether the effect is enabled on the source image or not. XAML code for both images is also shown.

Click for live demo

[/REMIX]

For further information please contact us.

Leave a Reply

Your email address will not be published.