I want to calculate or approximate the depth of at least convex objects (concave is a plus) on a per pixel basis, if possible in a multipass object shader (with some Src/ Dest or COLOR2 magic?). 8bit (0..255) accuracy is enough.
I've tried to do this with a separate depth view that renders the models with clockwise culling - which works with a single object - but this approach obviously fails when you have multiple overlapping objects.
Any ideas? Thanks.


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends