On Jul 18, 10:22 am, dugla <douglass.tur...@[EMAIL PROTECTED]
> wrote:
> 1) What is the meaning of the params float __nonspecular = 1 and
> string __category = "occlusion"? Both are unused within the shader.
These are special parameters which many surfaces query and use in
their shading. You can think of them as a description of the light,
even if they're not used in the code.
"__nonspecular = 1" means the light has no specular component so it
will not produce specular highlights. The specular() shadeop will
honor this and many surfaces which have their own illuminance loops
will as well. There is a similar __nondiffuse parameter. Together,
they allow things such as a spotlight used only to add specular
highlights of a special color.
__category can be used to get only some of the lights in an
illuminance loop, where you can specify which light categories you
want the loop to run on. Look up illuminance in the RI spec.
> 2) Ps + shading_normal. Why is Ps (the surface point being occlusion
> shaded) translated in the direction of the shading normal away from
> the surface of the object being occlusion tested? This makes no
> sense.
It is so the light is coming from a point just above the surface,
always in the direction of the normal. This will make most surface
shaders accept the light "as-is" with no attenuation. It is, I think,
equivalent to solar( -shading_normal, 0 ) and I'm not sure why it was
written that way.
Olivier


|