- Home /
Is there a way to visually show the order in which geometry was rendered in your scene.
The number of passes required to render a scene is important information when optimizing for lower level platforms. Is there a way to render the camera such that the materials are replaced with solid colors representing the order in which the viewport was rendered?
The scene would be rendered sort of like a depth map, in that black is the first object rendered, and white is the last.
e.g. Object : (R,G,B)
Background object 1 : (0,0,0)
Background object 2 (separate material from object 1) : (127,127,127)
Foreground object (255,255,255)
I can only really do basic things like write shaderlab and use existing shaders (no CgFX), I don't know if unity can even do this, but if someone wants to share their solution that would be great.
Answer by Eric5h5 · Nov 22, 2010 at 12:12 AM
The closest thing is the overdraw option:
Note that unlike desktop GPUs, the iPhone graphics chip doesn't render pixels that are occluded anyway, as long as you don't use transparency.