Navigation
API > API/Plugins > API/Plugins/Composite
Layer that catches shadows cast by registered actors from a single specified light.
Uses classic shadow-map percentage-closer filtering (5x5 by default, no cascades). Implemented with custom render passes for minimal performance cost.
| Name | UCompositeLayerSingleLightShadow |
| Type | class |
| Header File | /Engine/Plugins/Compositing/Composite/Source/Composite/Public/Layers/CompositeLayerSingleLightShadow.h |
| Include Path | #include "Layers/CompositeLayerSingleLightShadow.h" |
Syntax
UCLASS (MinimalAPI, BlueprintType, Blueprintable, EditInlineNew, CollapseCategories,
Meta=(DisplayName="Single Light Shadow"))
class UCompositeLayerSingleLightShadow : public UCompositeLayerBase
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UCompositePassBase → UCompositeLayerBase → UCompositeLayerSingleLightShadow
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UCompositeLayerSingleLightShadow
(
const FObjectInitializer& ObjectInitializer |
Constructor. | Layers/CompositeLayerSingleLightShadow.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~UCompositeLayerSingleLightShadow() |
Destructor. | Layers/CompositeLayerSingleLightShadow.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bAutomaticBounds | bool | When enable, the shadow map render transform and orthographic width are automatically derived from the selected meshes and light angle. | Layers/CompositeLayerSingleLightShadow.h |
|
| Light | TObjectPtr< ALight > | The reference light, whose direction or exact transform will by used to render a shadow map. | Layers/CompositeLayerSingleLightShadow.h |
|
| OrthographicWidth | float | The desired width (in world units) of the shadow map view (ignored if light is not directional). | Layers/CompositeLayerSingleLightShadow.h |
|
| ShadowMapResolution | int32 | Resolution of the shadow map texture. Lower resolutions will cause more blurry shadows. | Layers/CompositeLayerSingleLightShadow.h |
|
| ShadowStrength | float | Basic shadow strength multiplier, from 0 to 1. | Layers/CompositeLayerSingleLightShadow.h |
|
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| CachedSceneDepthCapture | TWeakObjectPtr< UCompositeSceneCapture2DComponent > | Cached pointer to the scene depth capture. | Layers/CompositeLayerSingleLightShadow.h | |
| CachedShadowMapCapture | TWeakObjectPtr< UCompositeSceneCapture2DComponent > | Cached pointer to the composite-managed shadow map scene capture. | Layers/CompositeLayerSingleLightShadow.h | |
| RenderTargetResolution | FIntPoint | Render target resolution for the scene depth capture. | Layers/CompositeLayerSingleLightShadow.h |
|
| ShadowCastingActors | TArray< TSoftObjectPtr< AActor > > | List of shadow casting actors (required). | Layers/CompositeLayerSingleLightShadow.h |
|
| SpawnableBindings | FCompositeSpawnableBindings | Parallel spawnable binding data for the ShadowCastingActors array. | Layers/CompositeLayerSingleLightShadow.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FIntPoint GetRenderTargetResolution() |
Get the render target resolution for the scene depth capture. | Layers/CompositeLayerSingleLightShadow.h |
|
const TArray< TSoftObjectPtr< AActor > > GetShadowCastingActors() |
Get shadow caster actors. | Layers/CompositeLayerSingleLightShadow.h |
|
void SetRenderTargetResolution
(
FIntPoint InRenderTargetResolution |
Set the render target resolution for the scene depth capture. | Layers/CompositeLayerSingleLightShadow.h |
|
void SetShadowCastingActors
(
TArray< TSoftObjectPtr< AActor > > InShadowCaster |
Set shadow caster actors. | Layers/CompositeLayerSingleLightShadow.h |
|
Public Virtual
Overridden from UCompositeLayerBase
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void OnEndOfFrameUpdate
(
UWorld* InWorld |
End-of-frame update callback. | Layers/CompositeLayerSingleLightShadow.h | |
virtual void OnRemoved
(
ACompositeActor* LastOwner |
Called when the layer is removed or composite actor is destroyed. | Layers/CompositeLayerSingleLightShadow.h |
Overridden from UCompositePassBase
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual bool GetIsActive () |
Returns true if the pass should participate in rendering this frame. | Layers/CompositeLayerSingleLightShadow.h | |
virtual FCompositeCorePassProxy * GetProxy
(
const UE::CompositeCore::FPassInputDecl& InputDecl, |
Override to return a render-thread proxy for this layer. | Layers/CompositeLayerSingleLightShadow.h |
Overridden from UObject
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void BeginDestroy() |
Layers/CompositeLayerSingleLightShadow.h | ||
virtual void PostEditChangeProperty
(
FPropertyChangedEvent& PropertyChangedEvent |
Layers/CompositeLayerSingleLightShadow.h | ||
virtual void PostEditUndo() |
Layers/CompositeLayerSingleLightShadow.h | ||
virtual void PostTransacted
(
const FTransactionObjectEvent& TransactionEvent |
Layers/CompositeLayerSingleLightShadow.h | ||
virtual void PreEditChange
(
FProperty* PropertyAboutToChange |
Layers/CompositeLayerSingleLightShadow.h |
Deprecated Variables
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| ShadowBias_DEPRECATED | float | Layers/CompositeLayerSingleLightShadow.h |
|