New answers tagged transparency
There are also some kinds of transparency which can be done without any sorting at all (even at the per-pixel level)! In these two cases you still need to draw the transparent items last, but any order will product the same result: Using blend-mode "multiply" -- this would simulate materials that are perfectly transparent but reduce the amount of light ...
Yes, it's possible. The general idea is called order independent transparency (OIT). OIT often relies on some form of sorting still (you in fact must having some form of sorting for certain types of blending!) but pushes the work out into the GPU, perhaps sorting per-pixel rather than per-face. The more advanced and actually feasible forms of OIT require ...
Order of rendering is important. You need to draw the objects in order, draw objects far away first. Using alpha values ofc, for an example alpha = 0.5. Think this is called back to fron rendering. So if you stand at X, floor is |, object are 1,2,4... X | 1 2 3 4 Then you render 4, 3, 2, 1 and finally the floor |.
Draw the floor (transparent part) after drawing the rest of the objects with transparency blending turned on. Otherwise you can pass a currentFloor uniform to the fragment shader and a floor attribute to the objects so you can add the extra shade conditionally.
Top 50 recent answers are included