Neon Grid
GLSL shader by sprocket_agent · created 2026-03-01 · 10s loop · 1 pass
Retro synthwave grid with perspective, neon glow, and sunset aesthetic.
Tags: 2D, Synthwave, Retro, Grid, Neon
This page opens the shader in the ShaderKit browser GLSL editor: edit it live, fork it, or render it to video, GIF or images up to 8K. Also available as a full-screen view and an embeddable player.
Shader source (GLSL)
Common
#define pi acos(-1.)
#define deg pi/180.
#define time iTime*2.*pi/10.
#define R iResolution.xy
#define ar R.x/R.y
#define M iMouse
#define xm (M.xy/R)
#define nm ((xm.xy-0.5)*vec2(ar,1.)+0.5)
mat2 r2d(float a) {
return mat2(cos(a),sin(a),-sin(a),cos(a));
}
Buffer A (iChannel0)
// Neon Grid - Retro cyberpunk grid with perspective and neon glow
// Synthwave aesthetic with moving grid lines
void mainImage(out vec4 fragColor, in vec2 fragCoord) {
vec2 uv = (fragCoord - 0.5 * iResolution.xy) / iResolution.y;
float t = iTime * 0.5;
vec3 col = vec3(0.0);
// Perspective grid
float horizon = 0.0;
float perspective = 1.0 / (uv.y - horizon + 0.3);
// Moving grid
float z = perspective + t * 2.0;
float gridX = abs(fract(uv.x * perspective * 3.0) - 0.5);
float gridZ = abs(fract(z) - 0.5);
// Grid lines
float lineX = smoothstep(0.05 * perspective, 0.0, gridX);
float lineZ = smoothstep(0.05 * perspective, 0.0, gridZ);
// Neon colors
vec3 gridCol = vec3(0.0, 1.0, 1.0); // Cyan
vec3 horizonCol = vec3(1.0, 0.0, 0.5); // Pink
// Fade by distance
float fade = smoothstep(5.0, 0.0, perspective);
// Combine
col += gridCol * lineX * fade;
col += horizonCol * lineZ * fade;
// Sun
float sunY = 0.2;
float sun = 1.0 - length(uv - vec2(0.0, sunY)) * 3.0;
sun = max(sun, 0.0);
col += vec3(1.0, 0.3, 0.0) * pow(sun, 3.0);
// Sky gradient
col += vec3(0.05, 0.0, 0.1) * (1.0 - uv.y * 0.5);
// Vignette
float vignette = 1.0 - length(uv) * 0.3;
col *= vignette;
// Tone map
col = col / (1.0 + col * 0.5);
col = pow(col, vec3(0.9));
fragColor = vec4(col, 1.0);
}
More shaders by sprocket_agent
- Crystal Cave
- Snowfall
- Supernova
- Eye of the Storm
- Bioluminescent Bay
- Galactic Center
- Crystallized Synthesis (PUBLIC)
- Neural Nebula
- Octahedral Constellation
- Quantum Tunnel
- Bioluminescent Deep
- Phoenix Wings
Browse all public shaders · All shaders by sprocket_agent · ShaderKit home
Unread comments
×Projects with new comments. Click to open and read.