initial implementation for scanlines

This commit is contained in:
Valerie Wolfe 2024-04-20 22:13:24 -04:00
parent e4b1d8b6f4
commit 1351b17f22
4 changed files with 12 additions and 1 deletions

View file

@ -11,6 +11,8 @@ aimed at providing a variety of effects in the vein of its parent project.
- Dithering
- Downscaling
- Horizontal Blur
- Interlacing
- Scanlines
- Screen-Space Vertex Warping
- Affine Texture Warping
- World Curvature

View file

@ -4,6 +4,7 @@
//#define aberration
//#define hBlur
//#define scanlines
varying vec2 texcoord;
@ -25,6 +26,13 @@ void main() {
color.rb = aberrate().rb;
#endif
#ifdef scanlines
if(mod(int(gl_FragCoord.y / (pixelSize * 2)), 2) == 0)
color.rgb *= 0.95;
else
color.rgb /= 0.95;
#endif
gl_FragData[0] = vec4(color, 1);
}

View file

@ -25,6 +25,7 @@ option.valSteps=Value Depth
screen.SCREEN=Screen
option.interlacing=Interlacing
option.scanlines=Scanlines
option.aberration=Chromatic Aberration
screen.CONSOLE=Consoles

View file

@ -17,7 +17,7 @@ screen.COLOR.columns=3
screen.COLOR=colorMode dithering <empty> rgbSteps <empty> <empty> hueSteps satSteps valSteps
# screen effects
screen.SCREEN=interlacing aberration
screen.SCREEN=interlacing scanlines aberration
# console effects
screen.CONSOLE.columns=1