Reputation: 2812
I would like to apply a shader effect to an image in c#/xaml.
I have found this example:
http://msdn.microsoft.com/en-us/library/system.windows.media.effects.shadereffect(v=vs.95).aspx
Which makes applying pixel shaders to an image pretty trivial. Unfortunately I cannot do the same thing with the windows 8 phone SDK.
Can I do anything this simple? I would like to avoid using DirectX if possible.
Upvotes: 6
Views: 1914
Reputation: 196
Check the link below:
Creating a Lens Application that uses HLSL effects for filters
This solution uses SharpDX api (a C# DirectX wrapper).
I've tested recently and it works fine under emulator.
Unfortunally I didn't get the same results when applying outside a Game class. I already published a question here with no responses yet. :-(
Good luck!
Best regards,
Pieter Voloshyn
Upvotes: 1
Reputation: 885
Unfortunately you cannot make custom ShaderEffects in Windows Phone 7 or 8. See also: WP7 - HLSL effects from WPF/Silverlight
Also it would appear that XNA is a no-go: Windows Phone custom shaders error? I don't think XNA has had any feature additions from WP7 to WP8, either.
You might be able to get away with doing what you need in Direct3D: (http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj714072(v=vs.105).aspx)
Good luck!
Upvotes: 0