Hi,
I’ve been looking for a way to make transparency/translucency work in my program and after I decided that depth sorting would be way to slow to do on a per-frame basis, I stumbeled upon the Dual Depth Peeling algorithm which seems to be the right thing for me. However, I have problems understanding the equation used for front-to-back blending introduced in the document. In the section “Under Blending” (middle of the document) equations are given for back-to-front blending of two fragments with a background color.
But I don’t understand how to get the equations for front-to-back blending from these example equations. Also, I tried to apply the equations listed afterwards to the same set of fragments in front-to-back order, but got different results for the color values of the resulting fragment. I guess these equations should give the same results for both directions, so there’s something I didn’t understand.
So could someone please explain to me how to get from back-to-front equations to front-to-back ones?
Thanks in advance!