GLSL / HLSL shader writer
Generate fragment shaders from natural-language descriptions. Meridian emits GLSL 4.60 and HLSL SM 6.0 with matching uniforms.
Prompt template
Write a fragment shader that [effect]. Target: GLSL 4.60. Include uniforms for time and resolution. Use smoothstep for anti-aliasing. Return vec4(r, g, b, 1.0).
GLSL output
Validated against glslangValidator. Includes #version 460 core, smoothstep AA, and time/resolution uniforms.
HLSL output
SM 6.0 entry points. cbuffer uniforms, SV_TARGET return. Ready for Unity, Unreal, or custom D3D12 pipelines.
Example
“Write a fragment shader that renders a pulsing neon grid on a dark background. Use smoothstep for line anti-aliasing.”
uniform float u_time;
uniform vec2 u_resolution;
void main() {
vec2 uv = gl_FragCoord.xy / u_resolution;
vec2 grid = abs(fract(uv * 8.0) - 0.5);
float line = smoothstep(0.04, 0.0, min(grid.x, grid.y));
float pulse = sin(u_time * 2.0) * 0.5 + 0.5;
vec3 color = mix(vec3(0.1, 0.0, 0.2), vec3(0.8, 0.2, 1.0), line * pulse);
gl_FragColor = vec4(color, 1.0);
}