HighContrast.fx 343 B

12345678910111213141516171819
  1. sampler s0;
  2. float4 PixelShaderFunction(float2 coords: TEXCOORD0) : COLOR0
  3. {
  4. float4 color = tex2D(s0, coords);
  5. if (color.r > .65) color.r = 1;
  6. else if (color.r < .35) color.r = 0;
  7. return color;
  8. }
  9. technique Technique1
  10. {
  11. pass Pass1
  12. {
  13. PixelShader = compile ps_2_0 PixelShaderFunction();
  14. }
  15. }