Question

How to create simple Gaussian Blur filter with HLSL (for Silverlight)?
Why - I want to create some complex filter for Silverlight and I do not want to apply blur filter and mine separately.

What do I need?

I need HLSL filter source.

Was it helpful?

Solution

If you scroll down here you'll find a sample- poster says it's not for the shy...

OTHER TIPS

This might help you. You can compile and use in Silverlight.Windows Presentation Foundation Pixel Shader Effects Library

The WPF pixel shader architecture (and HLSL shaders in general) are not capable of doing generalized gaussian blur. The problem: the size of the filter kernel in an HLSL shader is strictly limited by the number of operations permitted in an HLSL shader, and a gaussian blur filter requires an arbitrarily large filter kernel.

It's not clear that you would want to do it this way anyway. The right way to do gaussian blur is with convolutions, via 2D Fourier transforms. WPF shaders don't permit this. However, those who are enormously brave could try doing it via a WriteableBitmap.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top