Interface GiLightProvider
- All Known Implementing Classes:
GlobalIllumination
public interface GiLightProvider
Optional provider of global-illumination data for
LightingManager. When a provider is installed, the per-polygon
lighting computation additionally:
- asks the provider whether each light source is occluded from the polygon (direct-light shadows), and
- adds the provider's indirect (bounced light) contribution.
Implementations are called from parallel render-pool threads: all methods must be thread-safe, fast and allocation-free. Providers are expected to answer from progressively updated caches.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddIndirectLight(SolidPolygon polygon, Color baseColor, Color result) Adds the polygon's indirect (bounced light) contribution to an already computed direct-lighting color, in place.booleanisLightVisible(SolidPolygon polygon, LightSource light) Tells whether a light source currently has an unobstructed path to the polygon.
-
Method Details
-
isLightVisible
Tells whether a light source currently has an unobstructed path to the polygon. Until the provider has computed the answer, it should returntrue(light visible): shadows then fade in gradually instead of popping out.- Parameters:
polygon- the shaded polygonlight- the light source being evaluated- Returns:
- true if the light reaches the polygon
-
addIndirectLight
Adds the polygon's indirect (bounced light) contribution to an already computed direct-lighting color, in place.- Parameters:
polygon- the shaded polygonbaseColor- the polygon's unlit color (for albedo scaling)result- the direct-lighted color to augment (modified in place)
-