From fde9a3d9f7f3aed1b152f500388fb22388687c4e Mon Sep 17 00:00:00 2001 From: RealJTG Date: Sat, 2 Jun 2018 17:09:16 +0300 Subject: Wrong coordinates in Godot 3.x CRT shader. Fixes #4 --- godot3/ShaderTestScreen.tscn | 4 ++-- 1 file 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); -- cgit v1.2.3