Graf Zahl wrote:Decals are not sprites. They are drawn as the last pass of solid geometry, so they either shouldn't write normals or get one from the underlying line.
If they are drawn last, then that's actually good news. Makes it easier to make them stop outputting depth and normal data.
Nash wrote:dpJudas - off topic but how do you make the scene show those funky bright colours?

Been meaning to ask since that model normal thread... :V
At the moment I cheat. In main.fp I change the last part of the shader to look like this:
Code: Select all
FragColor = frag;
#ifdef GBUFFER_PASS
FragFog = vec4(AmbientOcclusionColor(), 1.0);
FragNormal = vec4(vEyeNormal.xyz * 0.5 + 0.5, 1.0);
FragColor = FragNormal; // <---- this line creates the funky colors
#endif
About the funky colors, those are the normal vectors stored as RGB. The red channel is X, green Y, blue Z and then offset so that 0 means -1, 128 means 0, and 255 means 1. My faked version only gives me a rough version of the true data I want. For example, you can see the SSAO applying its shadowing on top of the normals, which it wouldn't be in the normal gbuffer I'm trying to debug.
What I really need is to improve the debugging part of the GL renderer so I can pick any given point in the rendering process and copy that particular buffer to be shown. In this particular case I'm interested in knowing how the depth and normal buffers look like exactly between the opaque and translucent passes, because that's the data that the SSAO pass is working with.