Oh Greetings guys!!!
I have an issue with this tutorial
https://youtu.be/32jdNLTJ3zY
I used the shader and the thing is it cant show me anything no water, no reflections, nada!!! just an empty lazy sprite, dunno what happen, here is the full shader
shader_type canvas_item;
uniform vec2 scale;
uniform float y_zoom;
uniform vec4 water_color : hint_color;
uniform sampler2D noise;
uniform vec2 distortion_scale;
uniform float intensity;
uniform float water_speed;
void fragment(){
float distortion =texture(noise,UV * scale * distortion_scale + TIME*water_speed).x;
float uv_height = SCREEN_PIXEL_SIZE.y / TEXTURE_PIXEL_SIZE.y;
distortion -=0.5;
vec2 reflected_screenuv = vec2(SCREEN_UV.x-distortion, SCREEN_UV.y + uv_height * UV.y *scale.y * y_zoom * 2.0);
vec4 reflection= texture(SCREEN_TEXTURE,reflected_screenuv);
COLOR = texture(SCREEN_TEXTURE, reflected_screenuv);
COLOR.rgb = mix(reflection.rgb,water_color.rgb,water_color.a);
}
the sprite have a simple texture, the mat-shader, and is connected with the right signal which is item_rect_changed()
So let me know what I'm doing wrong