|
From: James W. <ja...@fr...> - 2007-03-13 01:04:44
|
Roger Holmes wrote: >> In answer to the question "why do they have to be known before >> StartRender time", my answer is: because any OpenGL-based renderer >> needs >> to have the lights set up before you render anything that should be >> lit >> by said lights. > > Well if that is a restriction of OpenGL then fair enough. I just > think that no processing of lights can be done until a (non shadow) > renderer has the Z buffer set up with depths and references to the > triangles, and whilst the renderer builds the list of triangles (and > culls some) it could have set up the list of lights whilst it parsed > the group structures. Either I'm misunderstanding you, or you have a mental model of rendering that doesn't correspond to the way any of our built-in renderers work. There isn't any separate phase of setting up the Z buffer with depths and references to triangles. There's a continuous process of breaking triangles into fragments, updating the Z and color buffers with new fragment data, and so on. Once a particular triangle has passed through the pipeline, there is no opportunity to change the way it has been lit. -- James W. Walker, Innoventive Software LLC <http://www.frameforge3d.com/> |