This is the testing Godot forums!

**All forum posts unique to this forum will be deleted!**Please use the main forums here for any posts you want to keep. All forum rules still apply.# Can anyone fix this shader problem for me? (Answered)

So I found this "portal" shader on youtube and hacked it together as best as I could. What I would like it to do is to keep the animation within the sprite, currently, it does not. I tried to get some help from another youtube shader guy (the original author has been mia for 2 years) but I have not been able to get the results I am looking for =/

```
shader_type canvas_item;
uniform float timescale = 0.5;
uniform sampler2D normal;
void fragment(){
NORMAL = texture(normal,UV).rgb * vec3(2.0,-2.0,1.0) - vec3(1.0,-1.0,0.0);
float PI = 3.14159265358979323844;
vec2 shifted_UVs = UV - vec2(0.5,0.5);
vec2 angle_offset = vec2(cos(TIME*timescale)*0.6, sin(TIME*timescale)*0.6);
float angle = 0.5*atan(shifted_UVs.x+angle_offset.x, shifted_UVs.y+angle_offset.y)/PI;
float wave_amplitude = 0.01;
float wave_number = 1.0;
float radius = length(shifted_UVs)+cos(TIME*2.1)*cos(angle*wave_number*PI+TIME)*sin(angle*wave_number);
vec2 polar_TCs = vec2(radius*2.0, angle + 0.5);
vec2 screen_radius = vec2(0.02);
vec2 screen_angle = vec2(radius*radius*cos(TIME+angle*wave_number*PI*2.0), radius*radius*sin(TIME+angle));
vec2 screen_polar_SSCs = SCREEN_UV+vec2(screen_angle*screen_radius);
vec4 screen_texture = texture(SCREEN_TEXTURE, screen_polar_SSCs);
vec4 sprite_texture = texture(TEXTURE, polar_TCs);
if(radius < 0.5){
if (sprite_texture.a < 0.25){
COLOR.rgba = screen_texture.rgba;
}
else{
COLOR.rgba = sprite_texture.rgba;
}
}
else{
discard;
}
}
```

## Comments

2,580AdminYou should perhaps link to the youtube videos you are talking about.

37MemberThat's where I asked for help, and I tried but could not figure it out.

and I could not find the original link, but ill keep looking and update if I do.

2,580AdminAha, there we go, finally a comprehensible question(as in, clearly presenting the problem, or perhaps I just misread the first post):

change line 12 to:

37Memberhere is the original

37MemberThank you very much. That was exactly what I was looking for