HDStaticShadows¶
Classes¶
- HDStaticShadows : NativeComponent¶
This component provides control over static shadow properties in HD Renderer.
Static shadows are a performance-efficient way to produce shadows for static geometry and cover long distances with them. They get updated only when some static object is changed (which shouldn’t happen every frame) or when camera is moved and only in the regions which need to be updated.
Static shadows also provide shadow info for HDGlobalIllumination.
The number of cascades static shadows have is fixed to 2 to avoid an extensive number of shader permutations. The first cascade has a distance of 1/3 maxDist.
To use this component, add the following line to your project file:
require engine.core_components.hd_static_shadows // or require engine.core
Usage example:
let renderSettings = create_render_settings()
add_component(renderSettings, new HDStaticShadows())
get_component(renderSettings) $(var staticShadows : HDStaticShadows?) {
staticShadows.maxDist = 500.0
staticShadows.cascadeWidth = 2048
}
- Properties:
- HDStaticShadows.maxDist: float¶
- HDStaticShadows.maxDist =(value: float)¶
Maximum distance from camera to be covered by static shadows.
- Arguments:
value : float
- HDStaticShadows.cascadeWidth: int¶
- HDStaticShadows.cascadeWidth =(value: int)¶
Resolution of each cascade in pixels.
- Arguments:
value : int