Occluded vertex colours

Hi,

I am (still) working on a research application and I could use some pointers on a particular issue I am facing and hoping to solve using shaders.

The scene is a simple unlit scene with occluded game-objects (each with their materials and textures).
I would like to know at what stage in the render pipeline do I have access to the vertex distance from the camera AND the colour information of each vertex (even if occluded) as I need to combine colour information of occluded vertices under certain circumstances.

I tried post-processing shader script on the camera (one of the Ronja tutorials), but that doesn’t work in the current context. The depth buffer has already rejected all occluded vertices and the colour fragment is also missing occluded vertex colour info.

Thanks.

During the vertex shader on that mesh. That’s the only time you’re guaranteed access to that data. If it’s occluded, and the sorting order is doing its job, the fragment shader on that mesh will get skipped.

If you absolutely need that information, you’ll probably want to render your objects using a shader with ZTest Always.