3D Retrowave Grid Effect Spatial

This shader is moving in real time.

You can edit these Shader Parameters:

Battery, Anchor, Speed Scale, FOV, Background Color, Grid Color

Shader code
shader_type spatial;

uniform float battery : hint_range(0.0,1.0) = 1.0;
uniform float anchor : hint_range(-1.0,1.0) = -0.5;
uniform float speed_scale : hint_range(1.0, 10.0) = 1.0;
uniform float fov : hint_range(0.01, 1.0) = 0.2;
uniform vec4 background_color  = vec4(0.0, 0.1, 0.2, 1.0);
uniform vec4 grid_color  = vec4(1.0, 0.5, 1.0, 1.0);

float grid(vec2 uv, float batt) {
    vec2 size = vec2(uv.y, uv.y * uv.y * 0.2) * 0.01;
    uv += vec2(0.0, TIME * speed_scale * (batt + 0.05));
    uv = abs(fract(uv) - 0.5);
  vec2 lines = smoothstep(size, vec2(0.0), uv);
  lines += smoothstep(size * 5.0, vec2(0.0), uv) *0.4 * batt;
    return clamp(lines.x + lines.y, 0.0, 3.0);
}

void fragment() {
 vec2 uv = UV;

 vec4 col = background_color;
    uv.y = 3.0 / (abs(uv.y + fov) + 0.05);
 uv.x += anchor;
    uv.x *= uv.y * 1.0;
    float gridVal = grid(uv, battery);
    col = mix(background_color, grid_color, gridVal);
 ALBEDO = col.rgb;
}
Tags
3d, Neon, Retrowave, Spatial
The shader code and all code snippets in this post are under CC0 license and can be used freely without the author's permission. Images and videos, and assets depicted in those, do not fall under this license. For more info, see our License terms.

More from mattmars

Pulse Aura for 3D Character

Rage Aura Effect for 3D character

Related shaders

Dashed Grid (The Best Darn Grid Shader (Yet))

Simple spatial CRT effect

LED BULB EFFECT SPATIAL SHADER

Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments