ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/Deliantra-Client/TODO
(Generate patch)

Comparing deliantra/Deliantra-Client/TODO (file contents):
Revision 1.121 by root, Sun Jun 4 01:14:02 2006 UTC vs.
Revision 1.122 by root, Sun Jun 4 23:05:05 2006 UTC

90allocating id 73 90allocating id 73
91OK 91OK
92set_face 4784 => 73 92set_face 4784 => 73
93libpng warning: Ignoring gAMA chunk with gamma=0 93libpng warning: Ignoring gAMA chunk with gamma=0
94 94
95 To achieve a more complete blending, you can have your drawing engine rasterize each transparent object more than once, altering in each pass the blending mode, object alpha channel, and buffer write masks. The first pass should perform RGB blending. Accordingly, you should disable writing any alpha channel or z buffer data during this pass.
96 /*first pass*/
97 glColorMask(TRUE, TRUE, TRUE, FALSE); /*disable alpha channel*/
98 glDepthMask(FALSE); /*disable Z buffer*/
99 if (premultpliedTransparency)
100 glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
101 else
102 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
103 /*render the object here*/
104
105 On the second pass, you should set the frame buffer alpha channel value to (1- a s )(1- a d ). To do this, you need to render the object again, with a different alpha value, as follows:
106 /*second pass*/
107 glColorMask(FALSE, FALSE, FALSE, TRUE); /*enable alpha channel*/
108 glDepthMask(FALSE); /*disable Z buffer*/
109 glBlendFunc(GL_ONE_MINUS_DST_ALPHA, GL_ZERO);
110 /*render the object with alpha replaced with 1-a*/
111
112 Finally, the third pass should replace the value in the alpha channel with the final value 1-((1- a s )(1- a d )). To do this, you need to render the object again, with its alpha value set to 1, as follows:
113 /*third pass*/
114 glColorMask(FALSE, FALSE, FALSE, TRUE); /*enable alpha channel*/
115 glDepthMask(TRUE); /*enable Z buffer*/
116 glBlendFunc(GL_ONE_MINUS_DST_ALPHA, GL_ZERO);
117 /*render the object with alpha replaced with 1*/
118
119

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines