Shader debugging: show samples

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
drhenry
Posts: 16
Joined: Fri Mar 26, 2010 8:03 am

Shader debugging: show samples

Post by drhenry »

Hi everyone,

I'd like to debug a shader:
for each pixel in the fragment shader, I take a few samples around it. I'd like to validate, if the sample locations are where I expect them to be. Any idea how I can achieve this? (it's a GLSL shader).
It would be quite nice to show all the sample pixels e.g. in red color for only one fragment in the current rendering pass. I could check, if the current pixel has texture coordinates (0.5,0.5) (-> pixel at center of the window), but I don't know how to draw to sample pixels (I doubt that it's possible)...

Thanks in advance.
Post Reply