summaryrefslogtreecommitdiff
path: root/godot3/ShaderTestScreen.tscn
diff options
context:
space:
mode:
authorRealJTG <RealJTG@gmail.com>2018-06-02 17:09:16 +0300
committerRealJTG <RealJTG@gmail.com>2018-06-02 17:09:16 +0300
commitfde9a3d9f7f3aed1b152f500388fb22388687c4e (patch)
treef14aeb48fae24a7e2bbae3c37fd46f118f428deb /godot3/ShaderTestScreen.tscn
parent467e23e5c575b5de2bb3b4130bba10ae085b9493 (diff)
downloadplugin-godot-simple-crt-shader-fde9a3d9f7f3aed1b152f500388fb22388687c4e.tar.gz
plugin-godot-simple-crt-shader-fde9a3d9f7f3aed1b152f500388fb22388687c4e.tar.bz2
plugin-godot-simple-crt-shader-fde9a3d9f7f3aed1b152f500388fb22388687c4e.zip
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);