|
From: Frank C. <dev...@ch...> - 2004-09-29 16:20:11
|
On 29-Sep-04, at 12:05 PM, Frank Condello wrote: > On 29-Sep-04, at 6:17 AM, Peter Michelsen wrote: > >>> That's correct- the illumination of the last solid object is >>> errantly maintained for the entire transparent pass. The bug report >>> linked above includes a bit of a workaround if your're using the CVS >>> source. >> >> I have test this solution as list in the bug report ( 96773 ). >> >> Yes it fixes the problem but effects all the other transparent >> objects, they become white. So not a solution. > > Sorry - I didn't do exhaustive testing with that (it was just off the > top of my head). You'll need enable lighting for the specular pass, or > else it'll draw solid. i.e. put: > > glEnable(GL_LIGHTING); > glEnable(GL_COLOR_MATERIAL); > > Before the "// Second pass to add specular highlights" bit in > IRTransBuffer_Draw. That should do it - I think... Actually, that's a little excessive... Just put "glEnable(GL_LIGHTING);" above the "glBlendFunc( GL_ONE, GL_ONE );" in the "if (instanceData->transNeedSpecular)" statement. You may need to re-enable lighting at the bottom as well, but the next solid pass should get that anyway. I'll add these notes to the bug report, but there are several GL states (including lighting) that can be cached between triangles to speed up the transparent renderer by quite a bit. Frank. |