Dash dash baby
This commit is contained in:
1 parent
a73609b86b
commit
11e291e867
12 files changed
+222
-30
No files matched your search
@@ -0,0 +1,20 @@
|
||||
// Thanks YouTube and DevPoodle
|
||||
// https://www.youtube.com/watch?v=E401x98N6iA
|
||||
|
||||
shader_type canvas_item;
|
||||
render_mode unshaded, skip_vertex_transform;
|
||||
|
||||
const float curvature = 3.2;
|
||||
|
||||
uniform sampler2D screen_texture: hint_screen_texture;
|
||||
|
||||
void fragment() {
|
||||
vec2 centered_uv = SCREEN_UV * 2.0 - 1.0;
|
||||
vec2 uv_offset = centered_uv.yx / curvature;
|
||||
vec2 warped_uv = centered_uv + centered_uv * uv_offset * uv_offset;
|
||||
vec3 cutoff = vec3(step(abs(warped_uv.x), 1.0) * step(abs(warped_uv.y), 1.0));
|
||||
|
||||
vec3 screen_color = texture(screen_texture, (warped_uv + 1.0) / 2.0).rgb;
|
||||
//COLOR = vec4(warped_uv, 0.0, 1.0);
|
||||
COLOR = texture(screen_texture, (warped_uv + 1.0) / 2.0);
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
uid://mmf86jusrkrr
|
||||
Reference in new issue
Block a user