AB4D Forum
Transparency - Printable Version

+- AB4D Forum (https://forum.ab4d.com)
+-- Forum: Products Forums (https://forum.ab4d.com/forumdisplay.php?fid=4)
+--- Forum: Ab3d.DXEngine (https://forum.ab4d.com/forumdisplay.php?fid=11)
+--- Thread: Transparency (/showthread.php?tid=4091)



Transparency - Hamish - 03-01-2018

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?


RE: Transparency - abenedik - 03-01-2018

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.