0 votes

Hey guys,
I´m trying to recreate the following video in Godot Engine 3.1
Link: Youtube Video
But I´m failing. This is my shader code. It don´t shows the texture (yes I set it to the noise parameter)

shader_type canvas_item;

uniform sampler2D noise;
uniform float intensity = 0.05;

void fragment() {
    vec2 uv2 = vec2(SCREEN_UV);
    uv2 += (texture(noise, uv2 + vec2(TIME/10.0,TIME/1.0)).rgb.rb-vec2(.53))*intensity;
    COLOR = vec4(uv2, 1.0, 0.0);
}

I hope you can help me!

Greetings
Nerdis

asked Apr 3, 2019 in Engine by Nerdis (19 points)
recategorized Apr 3, 2019 by Nerdis

1 Answer

0 votes
Best answer

Hey,

I´ve got the problem fixed with the help from clayjohn from the Godot Discord.

shader_type canvas_item;

uniform sampler2D noise;
uniform float intensity = 0.03;

void fragment() {
    vec2 uv = vec2(SCREEN_UV);
    uv += (texture(noise, uv + vec2(TIME/10.0,TIME/1.0)).rb-vec2(.53))*intensity;
    COLOR = vec4(texture(SCREEN_TEXTURE, uv).rgb, 1.0);
}
answered Apr 7, 2019 by Nerdis (19 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.