fixed scanlines for real this time :/
This commit is contained in:
parent
fcaed6a5e6
commit
ac6255175c
1 changed files with 4 additions and 3 deletions
|
@ -3,15 +3,16 @@
|
||||||
|
|
||||||
#define scanline 0 // [0 1 2]
|
#define scanline 0 // [0 1 2]
|
||||||
|
|
||||||
public void scanlines() {
|
vec3 scanlines(vec3 color) {
|
||||||
#if scanline == SCANLINE_SOFT
|
#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;
|
color.rgb *= 0.95;
|
||||||
else
|
else
|
||||||
color.rgb /= 0.95;
|
color.rgb /= 0.95;
|
||||||
#elif scanline == SCANLINE_HARD
|
#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;
|
color.rgb *= 0.5;
|
||||||
#endif
|
#endif
|
||||||
|
return color;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue