![]() Then you would do render C (simply just a quad of some description) which has the combination shader bound and you would pass both depth textures and both colour textures to this. You would need to render both scene A completely and then scene B completely and store both depth AND colour buffers in textures. ![]() Sorry for the delay, it was night when I commented. Not at my PC to test this so curious to hear what others have to say. As long as you don't also overwrite your other buffers when you restore the depth buffer (colour, alpha, stencil, etc) then everything from the second render should appear as expected within the scene but without their depth included in any further tests. To do it as you go it'd be a little trickier but I believe you could render into your first depth buffer, save that in a temp buffer, render your second set of objects into the current buffers and then overwrite the current depth buffer with your stored buffer from the first render. Do you need it done as you go or are you happy to defer it all? You could most certainly store your buffers as textures (including depth) and sort it out when you get to your shaders which would be relatively painless but you would have the overhead of rendering both copies completely, eg: extra colouring of sections which will later be discarded in your testing.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |