Compare commits

..

No commits in common. "b103d0ca992743351f1c77892c1f5620d5743c87" and "933cb21020834ac8dfd264ea3f66d94af87668d6" have entirely different histories.

5 changed files with 8 additions and 31 deletions

View file

@ -4,6 +4,7 @@
//#define aberration //#define aberration
//#define hBlur //#define hBlur
//#define scanlines
varying vec2 texcoord; varying vec2 texcoord;
@ -12,7 +13,6 @@ uniform float viewWidth;
#include "/module/aberration.frag" #include "/module/aberration.frag"
#include "/module/horizontal_blur.frag" #include "/module/horizontal_blur.frag"
#include "/module/scanline.frag"
void main() { void main() {
vec3 color; vec3 color;
@ -26,8 +26,11 @@ void main() {
color.rb = aberrate().rb; color.rb = aberrate().rb;
#endif #endif
#if scanline > 0 #ifdef scanlines
color = scanlines(color); if(mod(int(gl_FragCoord.y / (pixelSize * 2)), 2) == 0)
color.rgb *= 0.95;
else
color.rgb /= 0.95;
#endif #endif
gl_FragData[0] = vec4(color, 1); gl_FragData[0] = vec4(color, 1);

View file

@ -54,10 +54,7 @@ screen.SCREEN=Screen
option.interlacing=Interlacing option.interlacing=Interlacing
option.scanline=Scanlines option.scanlines=Scanlines
value.scanline.0=Off
value.scanline.1=Soft
value.scanline.2=Hard
option.aberration=Chromatic Aberration option.aberration=Chromatic Aberration

View file

@ -1,18 +0,0 @@
#include "/var/scanline.glsl"
#define scanline 0 // [0 1 2]
vec3 scanlines(vec3 color) {
#if scanline == SCANLINE_SOFT
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) == 0)
color.rgb *= 0.5;
#endif
return color;
}

View file

@ -20,7 +20,7 @@ screen.COLOR.columns=3
screen.COLOR=colorMode dithering <empty> colorDepth <empty> monoPalette hueBits satBits valBits screen.COLOR=colorMode dithering <empty> colorDepth <empty> monoPalette hueBits satBits valBits
# screen effects # screen effects
screen.SCREEN=interlacing scanline aberration screen.SCREEN=interlacing scanlines aberration
# console effects # console effects
screen.CONSOLE.columns=1 screen.CONSOLE.columns=1

View file

@ -1,5 +0,0 @@
#define SCANLINE_SOFT 1
#define SCANLINE_HARD 2
#define SCANLINE_STRETCH 3