How to debug varying variable in fragment shader

I am using glslDevil for shader debugging. I had to buy a certain videocard to be able to do that though.
The vertex shader debugging is very good and actually is much better than I expected.
However I seem not to be able to inspect varying variables when debugging a fragment shader. Nor I can inspect variables that are calculated based on varying variables.
The varying variables in question are set correctly - the shader works, but only when I am not debugging it. When I do step through debugger such variables show either zero or NAN and the whole fragment is colored black.
Is is a design feature or I am doing something wrong ?

See the attache image. The vertex shader shows correct direction.x = 1, while the fragment shader shows it as 0.
It also can show NAN.

So I can draw conclusions:

  1. Nobody is using glslDevil.
    or
  2. Nobody pays attention to the varying variables.

There’s a very recent thread all about approaches to shader debugging. Your options are few at this point regardless: package your goods for output to the screen as color or to the app as raw numeric data. Not going to be setting break points or stepping through code at source level… yet.

Haven’t used glslDevil or any other GLSL debugger in many moons so I can’t speak to its capabilities directly.

Btw, can’t say that I’ve ever needed to debug varying variables. My errors tend to be overwhelmingly GL API related - forgetting to dot an i or cross a t kinds of things.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.