fixed scanlines for real this time :/

This commit is contained in:
Valerie Wolfe 2024-05-03 22:24:04 -04:00
parent fc1c7c7b1a
commit b103d0ca99

View file

@ -3,15 +3,16 @@
#define scanline 0 // [0 1 2]
public void scanlines() {
vec3 scanlines(vec3 color) {
#if scanline == SCANLINE_SOFT
if(mod(int(gl_FragCoord.y) / (pixelSize * 2), 2) == 0)
if(mod(int(gl_FragCoord.y / pixelSize * 2), 2) == 0)
color.rgb *= 0.95;
else
color.rgb /= 0.95;
#elif scanline == SCANLINE_HARD
if(mod(int(gl_FragCoord.y) / (pixelSize * 2), 2) == 0)
if(mod(int(gl_FragCoord.y / pixelSize), 2) == 0)
color.rgb *= 0.5;
#endif
return color;
}