In the "Instanced MeshGeometry3D" example, when I change the mesh geometry to be cubes and enable transparency, cubes aren't always visible "through" transparent cubes in front of them - depending on the angle of the camera.

From what I can tell, this is because of the draw order of the instances, is that correct?

Does this mean the draw order needs to be re-calculated on a frame-by-frame basis in order to get properly rendered transparent objects?
Yes, objects rendered with instancing have the same problem than other objects when they are rendered as transparent. The order of rendering needs to be such that first the non-transparent objects are rendered and then transparent objects in the order from the most distant to the closest objects (from the camera).

You will need to adjust the instance data manually (with sorting instances based on distance to camera) in order for this to work correctly.
Andrej Benedik

Forum Jump:

Users browsing this thread:
1 Guest(s)