Feed on
Posts
Comments

Shader Articles

It only takes a few seconds to install the free Shazzam utility. See what all the buzz is about. Install now

Creating Shaders with Shazzam

Want to learn more about writing Pixel shaders?  Here are a few links to .NET pixel shader articles.  Most of these have references to Shazzam somewhere in the article:>.

WPF Reflection Effect

First of all, I’m no game programmer so HLSL is quite new to me, although the syntax is quite similar to the C programming language. I have to check the DirectX documentation every now and then to figure out some things. To better understand how pixel shaders work, let’s check the HLSL code template provided in the generated FX file.  - Read more

Silverlight Reflection Effect

WetFloorEffect with Half Reflection

I’ve become enamored with Silverlight behaviors lately because they provide a clean and easy-to-use mechanism for encapsulating complex behavioral logic and applying it to XAML elements. And I’m equally enamored with Silverlight pixel shaders, which allow similar encapsulation of complex visual effects implemented using Microsoft’s High-Level Shader Language, better known as HLSL.  Read more.

Penguin with WateryEffect Reflection

What’s really cool is that you can write custom pixel shaders that can be applied using the same simple, declarative syntax as built-in shaders. Here’s how.  Read more

 

Silverlight 3: Pixel Shaders and Effects

In Silverlight 3, Shader Effects (aka Pixel Shaders) allow you to modify the rendered pixels of any UI Element before they are composited to the current view. They can be used to add effects to screen elements including shadows, blur, grayscale, redeye removal – pretty much anything you can accomplish by tweaking pixels using an algorithm. Normally, pixel shaders are done using the GPU (video card), but currently in Silverlight 3, Pixel Shaders are rendered using a software-based algorithm. This means that Pixel Shaders in Silverlight aren’t nearly as fast as they might be using the GPU.   Read more

Old Photo, Pastel, and Pencil Sketch Pixel Shaders For Silverlight

Read more

Old Movie Effect with Silverlight 4 WebCam

The Silverlight 4 webcam and microphone support is always fun and even more when it’s combined with a pixel shader. This demo uses my Old Movie Pixel Shader to create a neat real time webcam effect that simulates scratches, noise and other effects you might have seen in old movies.  Read more

More articles by Rene Schulte

SilverShader – Introduction to Silverlight and WPF Pixel Shaders

Pixel shaders were introduced with WPF 3.5 SP1, and later with Silverlight 3, as so-called ShaderEffects. ShaderEffects can be applied to any control to create both nice visual effects and new user experiences. WPF 3.5 SP1 and Silverlight support the Shader Model 2, which is limited to a total of 96 instructions (64 arithmetic and 32 texture instructions). Modern DirectX 11 graphics cards already support Shader Model 5, which doesn’t have such limits. WPF 3.5 SP1 and Silverlight pixel shaders, however, are executed on the CPU and not on the specialized GPU. Since the software rendering pipelines make use of modern CPU capabilities like SSE and multi-core execution, they still run pretty fast and are the right way to implement effects in Silverlight and WPF.

EdgeCam Shots – Saving Silverlight 4 Webcam Snapshots to JPEG

In my last blog post I have covered the new Silverlight 4 Webcam API and provided a demo that used my edge detection pixel shader to create a nice real time webcam effect. In this post I make an extended version available which can save webcam snapshots as JPEG files and I also discuss some limitations of the webcam API’s built-in CaptureSource.AsyncCaptureImage snapshot method.

 

EdgeCam – Silverlight 4 Webcam & Edge Detection Shader

One of my favorite new features is the webcam and microphone support and I’ve coded a small demo that uses the new Silverlight 4 CaptureSource class and applied my edge detection pixel shader to it to create a cool real time webcam effect.

Read Between The Pixels – HLSL Kill Pixel Shader

A couple of days ago William Moore (@codenenterp) asked me via Twitter if I know a pixel shader that makes odd pixels black. I didn’t know were such a shader is available, but I knew that it should be not hard to write one in HLSL. So I fired up the Shazzam tool and wrote two shaders.
I have started with a pixel shader that kills the color in every odd row of the texture and makes every second scanline transparent. If a black rectangle is overlaid with such a shaded image, each odd scanline will be seen as black, thus resulting in the desired black scanline effect.

Silverlight 3 WriteableBitmap Performance Follow-Up

The Speedtest generates an interference image and writes each pixel to a buffer, which is then used as the source of an Image. This effect could also be realized with a pixel shader and as I was working on the Speedtest v2, I implemented the effect as a pixel shader too.

Sharp Edge – Silverlight Parametric Pixel Shader

One great addition to Silverlight 3 are pixel shaders. The Blur and the Drop Shadow shaders are bundled with Silverlight 3, but it’s also possible to attach custom shaders to any UI Element. Unfortunately shaders are not executed on the GPU by Silverlight, but the Software implementation is pretty fast.

Silverlight 3.0: Tile Effect with a Pixel Shader

tiles

Listening what has been asked in the Silverlight forums I’ve found someone searching for a TileBrush. This kind of brush, in WPF can be used to create a Tile of repeated elements. Unfortunately the TileBrush exists in Silverlight but is only a placeholder ready for future development and for WPF compatibility.

In a thread I found a suggestion by Tom Taylor to work around this missing thing. He suggested to create a Pixel Shader with Silverlight 3.0 to enable tiling. So I’ve decided to start studying Pixel Shaders to try create an Effect that may be used for this purpose. In this brief article I will get into this argument and explain how Pixel Shaders works and how they may be used in Silverlight 3.0.

Read more

Silverlight 4: Webcams to the 3rd Dimension

Recently at work, my coworker Jimm Wagner thought it would be fun to see if we could accomplish creating a "live" 3d video using Silverlight 4, a couple of webcams, and some old school red and blue 3d glasses. With the new webcam support that is now available in Silverlight 4, making this work was actually very simple. The resulting 3d in the video isn’t perfect, but there is some feeling of depth once the videos are aligned properly. Read more

Swizzler – Creating Shader Effects

Creating High Level Shader Language (HLSL) pixel shaders. To create the pixel shaders used in the Swizzler, knowledge of HLSL is necessary. HLSL is quite similar to C at first glance, but it has a lot of fundamental differences.  Read more

HLSL Tutorial

image

Recently, I already wrote about PixelShader effects, introduced in .NET framework 3.5 SP1 (WPF). However it looks like for most people this syntax is still hard to understand. Today we’ll try to lean it more. In order to do this, I wrote small program, that helps you to write and debug pixel shader effects quickly. This how it looks like.  Read more

Telescopic Blur

In an earlier post, I showed some still images of Silverlight pixel shaders and how we used the awesome tool Shazzam in our development. Today I’d like to post the code and show some interesting uses of the shaders. (Live!)

Telescopic Blur effect

Read more

Leave a Reply