xygine
xygine copied to clipboard
Sort transparent pass objects by depth in MeshRenderer
Meshes drawn during the transparent pass need to be rendered back to front to be drawn correctly. This is, in general, OK when objects do not change depth and are added to the scene in the correct order - but is something the end user should not have to worry about. Objects can be sorted by the mesh renderer, preferably after view culling although could also be done via some sort of transform callback to reduce the total amount of sorting done