Blending Modes in WPF using ShaderEffect's
With the RTM of .NET 3.5 SP1 , we can now create hardware accelerated layer blending effects in WPF like those available in Image Editing tools & Photoshop & GIMP some of the common blending modes are Darken, Darker Colors preferred. sampler2D input : register(s0); sampler2D tex1 : register(s1); float4 main(float2 uv : TEXCOORD) : COLOR { float4 clr1; clr1= tex2D(tex1, uv.xy); float4 Color; Color= tex2D( input , uv.xy); if (Color.r>clr1.r) Color.r=clr1.r; if (Color.g>clr1.g) Color.g=clr1.g; if (Color.b>clr1.b) Color.b=clr1.b; return Color; } Lighten, Lighter Colors preferred. sampler2D input : register(s0); sampler2D tex1 : register(s1); float4 main(float2 uv : TEXCOORD) : COLOR { float4 clr1; clr1= tex2D(tex1, uv.xy); float4 Color; Color= tex2D( input , uv.x...
Comments