summaryrefslogtreecommitdiff
path: root/godot3/ShaderTestScreen.tscn
diff options
context:
space:
mode:
authorHenrique Lacreta Alves <henriquelalves@gmail.com>2020-02-02 13:49:16 -0300
committerGitHub <noreply@github.com>2020-02-02 13:49:16 -0300
commitc3515366650c07c061b790bb523613f4eacbaede (patch)
treef14aeb48fae24a7e2bbae3c37fd46f118f428deb /godot3/ShaderTestScreen.tscn
parent467e23e5c575b5de2bb3b4130bba10ae085b9493 (diff)
parentfde9a3d9f7f3aed1b152f500388fb22388687c4e (diff)
downloadplugin-godot-simple-crt-shader-c3515366650c07c061b790bb523613f4eacbaede.tar.gz
plugin-godot-simple-crt-shader-c3515366650c07c061b790bb523613f4eacbaede.tar.bz2
plugin-godot-simple-crt-shader-c3515366650c07c061b790bb523613f4eacbaede.zip
Merge pull request #5 from RealJTG/master
Wrong coordinates in Godot 3.x CRT shader. Fixes #4
Diffstat (limited to 'godot3/ShaderTestScreen.tscn')
-rw-r--r--godot3/ShaderTestScreen.tscn4
1 files changed, 2 insertions, 2 deletions
diff --git a/godot3/ShaderTestScreen.tscn b/godot3/ShaderTestScreen.tscn
index 5440580..aca9cfd 100644
--- a/godot3/ShaderTestScreen.tscn
+++ b/godot3/ShaderTestScreen.tscn
@@ -171,8 +171,8 @@ else{
float pixel_size_x = 1.0/screen_width*bleeding_range_x;
float pixel_size_y = 1.0/screen_height*bleeding_range_y;
-vec4 color_left = texture(SCREEN_TEXTURE,SCREEN_UV - vec2(pixel_size_x, pixel_size_y));
-vec4 current_color = texture(SCREEN_TEXTURE,SCREEN_UV);
+vec4 color_left = texture(SCREEN_TEXTURE,xy - vec2(pixel_size_x, pixel_size_y));
+vec4 current_color = texture(SCREEN_TEXTURE,xy);
get_color_bleeding(current_color,color_left);
vec4 c = current_color+color_left;
get_color_scanline(xy,c,TIME);