gather loop in a light shader

   3918   0   1
User Avatar
Member
13 posts
Joined: July 2005
Offline
Hi everyone,

thought' I'd pop a couple of questions I had
about light shaders…

I'm trying to implement ambient occlusion through light shaders,
so that the amb. occlusion info would be available through an ambient light. This is handy since all the GC keylights can still be seen overlaid
through the diffuse() call.
…and this has to be done in version 5.5.x

Problem is, as far as I understand it, to get a light evaluated
during the ambient() loop, L should be set to 0, but in order for
the shader to work with a gather loop, L has to be set to N (no way around that), and the the occlusion info ends up getting passed to the diffuse term instead of the ambient one….
(the actual gather loop works fine otherwise….)

am I doing anything wrong? is it an implementation issue,
or can we get around that? is there any other way (an explicit way)
to categorize a light as ambient?

any ideas or suggestions most welcome

Cheers!

-Charles.
  • Quick Links