Created
February 21, 2019 12:25
-
-
Save jimmyjonezz/5020daf550dae8a0e15a44eaf2279ff0 to your computer and use it in GitHub Desktop.
Scanline Texture for Godot 3.1 altha 5
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 sampler2D source; | |
void vertex() { | |
vec2 texCoord; | |
} | |
void fragment() { | |
vec4 rgba = texture(source, UV); | |
vec4 intensity; | |
if (fract(FRAGCOORD.y * (0.5 * 4.0 / 3.0)) > 0.5){ | |
intensity = vec4(0); | |
} else { | |
intensity = smoothstep(0.2, 0.8, rgba) + normalize(rgba); | |
} | |
COLOR = intensity * -0.25 + rgba *1.1; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment