|
From: Steven V. <is...@ma...> - 2005-07-16 20:57:14
|
Hi all, I am so glad that there is now a community which I can turn to if I have a problem. This time I am working on fixing the race-overlay of my game. This was something that used to work once (Either under Quickdraw 3D or under another version of quesa). The problem is that my race-overlay gets shaded with the lights of my scene. I don't want this. I want it to be transparent and not shaded for which I use Q3NULLIllumination_New. I am really messing my code up so I might actually make things worse. However I suspect this might be a bug in quesa. I render in retained mode and I think what happens is that Quesa does some alpha sorting routine, but then forgets to check if the texture should be rendered with lights on or off. I can actually make this work, but then all the windows of my cars (which should be transparent) become white. In the case my race overlay gets shaded with the scene lights I do something like: Q3View_StartRendering(view); Q3Shader_Submit(MyPhongShader, view); RenderLevel(view); RenderRaceOverlay(view); Q3View_EndRendering(view); I can make the race overlay render correctly if I do: Q3View_StartRendering(view); Q3Shader_Submit(MyPhongShader, view); RenderLevel(view); Q3Shader_Submit(MyNullShader, view); RenderRaceOverlay(view); Q3View_EndRendering(view); But then All the windows of my cars are white It will also render correctly if do: Q3View_StartRendering(view); Q3Shader_Submit(MyNullShader, view); RenderLevel(view); RenderRaceOverlay(view); Q3View_EndRendering(view); But then of course everything gets rendered with the NullShader. And yes, the RaceOverlay is a OrderedDisplayGroup with a NULLIlluminationShader added to it. The null shader does work, because I already use it for my background. But I suspect that alpha sorting messes things up. A screenshot of the problem can be seen here: http://revaro.spymac.com/ShadingProblem.png (That the small numbers are lighter is deliberately know by me, I know how to fix it) Steven Verstoep www.revaro.net |