Lighting class Lighting and environment
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, Vector3? directionalLightDirection, Texture? shadowMap, List<
ShadowCascade> cascades = const [], Texture? ssaoMap, double specularOcclusionMode = 0.0, Size viewportSize = ui.Size.zero})
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
- directionalLightDirection → Vector3?
-
The world-space travel direction of directionalLight, derived from
the light node's transform. Null when there is no directional light;
consumers fall back to DirectionalLight.direction in that case.
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 - specularOcclusionMode → double
-
How indirect specular is occluded:
0leaves it on the diffuse occlusion factor,1derives a dedicated specular occlusion. MirrorsSpecularAmbientOcclusionMode.index.final - ssaoMap → Texture?
-
The screen-space ambient-occlusion texture for this frame (occlusion
factor in
.r), or null when occlusion is off. When set, it modulates indirect lighting in the shader.final - viewportSize → Size
-
The color-pass render-target size, used to map
gl_FragCoordinto the occlusion texture's UV. Zero when occlusion is off.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