public interface KVisibleSetShadowsBuilderType
KVisibleSetShadows
snapshots.Modifier and Type | Method and Description |
---|---|
void |
visibleShadowsAddCaster(KLightWithShadowType light,
KInstanceOpaqueType instance)
Add an invisible instance
instance associated with light
light . |
void |
visibleShadowsAddLight(KLightWithShadowType light)
Add a shadow-projecting light.
|
void visibleShadowsAddCaster(KLightWithShadowType light, KInstanceOpaqueType instance) throws RExceptionBuilderInvalid
Add an invisible instance instance
associated with light
light
. The instance will not appear in the rendered scene,
but will cast a shadow.
Shadow casting is controlled by depth buffering (even for translucent instances) and therefore the order that shadow casting instances are added to the scene has no effect on the rendered image with respect to shadows.
Allowing instances to appear in scenes purely as shadow casters is supported in order to allow separate, simplified geometry to be used for shadow casting.
light
- The lightinstance
- The shadow-casting instanceRExceptionBuilderInvalid
- If the builder has already been used.void visibleShadowsAddLight(KLightWithShadowType light) throws RExceptionBuilderInvalid
Add a shadow-projecting light.
This function is provided because although a given light may be configured to cast a shadow and may be lighting one or more instances, it may not currently have any shadow casting instances associated with it. The shadow map renderer that eventually consumes the visible set needs to know about the light in order to (re)initialize its associated shadow map, to prevent the light being used with an uninitialized shadow map.
This function is typically called by builders created via
KVisibleSetLightGroup
and it is therefore not necessary for users
to call this function directly.
light
- The lightRExceptionBuilderInvalid
- If the builder has already been used.Copyright © 2015 <code@io7m.com> http://io7m.com