Godot Version
Godot4.3
Question
I’m following the tutorial https://www.youtube.com/watch?v=KVTa2xkly1g and on the part about creating a 2D flame, it uses two noise textures that scrolls to different directions.
Here is my code:
shader_type canvas_item;
uniform sampler2D texture2;
uniform sampler2D color_texture;
uniform vec2 scroll1 = vec2(0.3, 03);
uniform vec2 scroll2 = vec2(-0.3, -0.3);
void fragment() {
float text_color1 = texture(TEXTURE, UV + scroll1 * TIME).r;
float text_color2 = texture(texture2, UV + scroll2 * TIME).r;
float energy = text_color1 * text_color2 - (1.0 - UV.y) * 0.5;
vec4 color = texture(color_texture, vec2(energy));
COLOR = color;
}
My problem is that the TEXTURE is scrolling, but the texture2 isn’t.
texture2 doesn’t even is rendered and I don’t understand why.