Lighting class
The lighting state handed to a Material when it binds for a draw.
Bundles the image-based-lighting EnvironmentMap (and the scene's
environmentIntensity multiplier) with the analytic lights and shadow
resources, so material code has everything it needs in one place.
Constructors
-
Lighting({required EnvironmentMap environmentMap, double environmentIntensity = 1.0, Matrix3? environmentTransform, DirectionalLight? directionalLight, Texture? shadowMap, List<
ShadowCascade> cascades = const []})
Properties
-
cascades
→ List<
ShadowCascade> -
The shadow cascades matching shadowMap, near-to-far, or empty
when there is no shadow map this frame.
final
- directionalLight → DirectionalLight?
-
The scene's directional light, or null when there isn't one.
final
- environmentIntensity → double
-
Scalar multiplier applied to environmentMap's contribution
(the scene's
environmentIntensity).final - environmentMap → EnvironmentMap
-
The image-based-lighting environment in effect for this draw.
final
- environmentTransform → Matrix3
-
Rotation applied to the image-based-lighting environment (the
scene's
environmentTransform). Identity leaves it unrotated.final - hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- shadowMap → Texture?
-
The cascaded shadow map atlas (a depth-in-
.rtexture holding the cascade tiles as a horizontal strip) for directionalLight, or null when shadows are off for this frame. Sampled with cascades.final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited