Last active
December 29, 2021 10:15
-
-
Save jimmyjonezz/1196e29356340bc9ac41bd79119aaf12 to your computer and use it in GitHub Desktop.
LCD Post Effect: https://www.shadertoy.com/view/ldBfDd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
shader_type canvas_item; | |
uniform float pb : hint_range(0, 1.0) = 0.4; | |
uniform float sclV : hint_range(0, 1.0) = 0.25; | |
void fragment() { | |
vec2 uv = FRAGCOORD.xy / SCREEN_PIXEL_SIZE.xy; | |
//or uv = SCREEN_UV; - it's look good! | |
vec4 texColor = texture(SCREEN_TEXTURE, uv); | |
vec4 lcdColor = vec4(pb, pb, pb, 1.0); | |
int px = int(mod(FRAGCOORD.x,3.0)); | |
if (px == 1) | |
lcdColor.r = 1.0; | |
else if (px == 2) | |
lcdColor.g = 1.0; | |
else lcdColor.b = 1.0; | |
if (int(mod(FRAGCOORD.y, 2.0)) == 0) | |
lcdColor.rgb = vec3(sclV, sclV, sclV); | |
COLOR = texColor * lcdColor; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment