SweetCRT.h 585 B

1234567891011121314151617181920
  1. /*-----------------------------------------------------------.
  2. / SweetCRT /
  3. '-----------------------------------------------------------*/
  4. /*
  5. SweetCRT - a Work in progress.
  6. */
  7. #define scanline_strength 0.75
  8. float4 SweetCRTPass( float4 colorInput, float2 tex )
  9. {
  10. //
  11. float scanlines = frac(tex.y * (screen_size.y * 0.5)) - 0.49; //
  12. scanlines = 1.0 + scanlines * scanline_strength;
  13. colorInput.rgb = saturate(colorInput.rgb * scanlines);
  14. //colorInput.rgb = saturate(scanlines).xxx;
  15. return colorInput;
  16. }