Debugging a Black Shadertoy Import
Narrow a black screen by following the data path. Return constant red to establish linking, vertex coverage and drawing. Then display UV, introduce time and finally the texture. Add one input at a time so the first failing step is informative.
Fix the problem and environment
Narrow a black screen by following the data path. Return constant red to establish linking, vertex coverage and drawing. Then display UV, introduce time and finally the texture. Add one input at a time so the first failing step is informative.
The controlling code
// Stage 1: gl_FragColor=vec4(1.0,0.0,0.0,1.0);
// Stage 2:
vec2 uv=gl_FragCoord.xy/max(u_resolution,vec2(1.0));
gl_FragColor=vec4(uv,0.0,1.0);
// Stage 3: animate one channel with sin(u_time).
// Stage 4: replace the color with the texture lookup.
Verify in order
Keep compile logs and distinguish compile failure from a valid all-zero output. Check the main wrapper, uniform names, nonzero resolution, texture readiness and missing Buffer A.
Scope and common mistakes
Do not change camera, texture and material at once. Keep a known-visible quad while inspecting one variable at a time.