Invert.fx 312 B

1234567891011121314151617181920
  1. sampler s0;
  2. float4 PixelShaderFunction(float2 coords: TEXCOORD0) : COLOR0
  3. {
  4. float4 color = tex2D(s0, coords);
  5. if (!any(color)) return color;
  6. color.rgb = 1 - color.rgb;
  7. return color;
  8. }
  9. technique Technique1
  10. {
  11. pass Pass1
  12. {
  13. PixelShader = compile ps_3_0 PixelShaderFunction();
  14. }
  15. }