In C, I can debug code like:
fprintf(stderr, "blah: %f", some_var);
In GLSL, is there a way for me to just dump out a value in a Vertex or Fragment shader? I don't care if it's slow; I just want to dump out the value. Ideally, I want a setup like the following:
- normal state = run the GLSL shader normally
- press key D = the next frame is generated in ULTRA slow mode, where the "printfs" in the Vertex/Fragment shader are executed and dumped out.
Is this feasible? (I don't care about performance; I just want to do this for one frame).