Class LightWithShadow
Base class for all light types that can cast dynamic or static shadow. Contains more shared properties for point/spot/directional lights.
Inherited Members
Assembly: FlaxEngine.dll
File: Engine/Level/Actors/Light.h
Syntax
public class LightWithShadow : public Light
Fields
_invalidateShadowFrame
Declaration
protected uint32 _invalidateShadowFrame = 0
Field Value
uint32
|
ContactShadowsLength
The length of the rays for contact shadows computed via the screen-space tracing. Set this to values higher than 0 to enable screen-space shadows rendering for this light. This improves the shadowing details. Actual ray distance is based on the pixel distance from the camera.
Declaration
public float ContactShadowsLength = 0.0f
Field Value
float
|
MinRoughness
The minimum roughness value used to clamp material surface roughness during shading pixel.
Declaration
public float MinRoughness = 0.04f
Field Value
float
|
ShadowsDepthBias
The depth bias used for shadow map comparison.
Declaration
public float ShadowsDepthBias = 0.005f
Field Value
float
|
ShadowsDistance
Shadows casting distance from view.
Declaration
public float ShadowsDistance = 5000.0f
Field Value
float
|
ShadowsFadeDistance
Shadows fade off distance.
Declaration
public float ShadowsFadeDistance = 500.0f
Field Value
float
|
ShadowsMode
Describes how a visual element casts shadows.
Declaration
public ShadowsCastingMode ShadowsMode = ShadowsCastingMode::All
Field Value
ShadowsCastingMode
|
ShadowsNormalOffsetScale
A factor specifying the offset to add to the calculated shadow map depth with respect to the surface normal.
Declaration
public float ShadowsNormalOffsetScale = 10.0f
Field Value
float
|
ShadowsResolution
Defines the resolution of the shadow map texture used to draw objects projection from light-point-of-view. Higher values increase shadow quality at cost of performance.
Declaration
public ShadowMapResolution ShadowsResolution = ShadowMapResolution::Dynamic
Field Value
ShadowMapResolution
|
ShadowsSharpness
TheShadows edges sharpness.
Declaration
public float ShadowsSharpness = 1.0f
Field Value
float
|
ShadowsStrength
Dynamic shadows blending strength. Default is 1 for fully opaque shadows, value 0 disables shadows.
Declaration
public float ShadowsStrength = 1.0f
Field Value
float
|
ShadowsUpdateRate
Frequency of shadow updates. 1 - every frame, 0.5 - every second frame, 0 - on start or change. It's the inverse value of how many frames should happen in-between shadow map updates (eg. inverse of 0.5 is 2 thus shadow will update every 2nd frame).
Declaration
public float ShadowsUpdateRate = 1.0f
Field Value
float
|
ShadowsUpdateRateAtDistance
Frequency of shadow updates at the maximum distance from the view at which shadows are still rendered. This value is multiplied by ShadowsUpdateRate and allows scaling the update rate in-between the shadow range. For example, if light is near view, it will get normal shadow updates but will reduce this rate when far from view. See ShadowsUpdateRate to learn more.
Declaration
public float ShadowsUpdateRateAtDistance = 1.0f
Field Value
float
|
Methods
Deserialize(DeserializeStream& stream, ISerializeModifier* modifier)
Deserializes object from the input stream.
Declaration
public virtual void Deserialize(DeserializeStream& stream, ISerializeModifier* modifier) override
Parameters
DeserializeStream
stream
The input stream. |
ISerializeModifier
modifier
The deserialization modifier object. Always valid. |
Overrides
InvalidateShadow()
Marks the light shadow to be refreshes during next drawing. Invalidates any cached shadow map and redraws static shadows of the object (if any in use).
Declaration
public void InvalidateShadow()
Serialize(SerializeStream& stream, const void* otherObj)
Serializes object to the output stream compared to the values of the other object instance (eg. default class object). If other object is null then serialize all properties.
Declaration
public virtual void Serialize(SerializeStream& stream, const void* otherObj) override
Parameters
SerializeStream
stream
The output stream. |
void
otherObj
The instance of the object to compare with and serialize only the modified properties. If null, then serialize all properties. |