|
From: Frank C <li...@si...> - 2004-06-05 20:37:55
|
On 5-Jun-04, at 3:43 PM, Dair Grant wrote:
> Can you log some bugs demonstrating how?
I'll try to do this tomorrow.
>> The only thing I'm concerned about is how and when the light state is
>> updated - looking through the code it appears to happen once per
>> frame, but in practice it updates for every mesh - so I'm missing
>> something here...
>
> Where do you see it being updated on each mesh? The lights should be
> converted once per frame, by IRRenderer_Lights_StartPass.
That's why I'm confused - I'll try to explain what I'm seeing:
As part of the colour modulation fix posted yesterday, I'm checking
stateViewIllumination in ir_light_reset and disabling lighting if it's
kQ3IlluminationTypeNULL. This allows modulated texture blending on null
shaded objects, but still has them render at full brightness
(previously the blend state was set to replace and lighting was simply
left on).
If ir_light_reset is only called once per frame then this should break
scenes that mix lit and null shaded objects, but it's been working in
my test cases so far.
I've set up a test app that draws 12 cubes in a grid, with the state of
each cude is determined by it's position in the grid:
Phong Lambert Null
no texture opaque: X X X
no texture transparent: X X X
textured opaque: X X X
textured transparent: X X X
Attribute sets are shared across each row, but each cube is it's own
display group containing an appropriate illumination shader to try and
get the illumination state to change as often as possible. This renders
correctly with my changes (transparency bugs aside for the moment) but
looking at the source, it really shouldn't. I must be missing something
entirely in the IR source, or my test case is flawed.
Is there an explanation and/or diagram of Quesa's render pipeline
anywhere?
Frank.
|