USkyLightComponent

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Classes/Components/SkyLightComponent.h

Include

#include "Components/SkyLightComponent.h"

Syntax

class USkyLightComponent : public ULightComponentBase

Variables

Name Description

Protected variable

float

 

AverageBrightness

Public variable

bool

 

bCaptureEmissiveOnly

Only capture emissive materials.

Protected variable

bool

 

bHasEverCaptured

Protected variable

float

 

BlendDestinationAverageBrightness

Protected variable

UTextureCube &#...

 

BlendDestinationCubemap

Protected variable

FSHVectorRGB3

 

BlendDestinationIrradianceEnvironmentMap

Protected variable

TRefCountPtr< F...

 

BlendDestinationProcessedSkyTexture

Protected variable

float

 

BlendFraction

If 0, no blend is present.

Public variable

bool

 

bLowerHemisphereIsBlack

Whether all distant lighting from the lower hemisphere should be set to LowerHemisphereColor.

Protected variable

bool

 

bSavedConstructionScriptValuesValid

Indicates whether the cached data stored in GetComponentInstanceData is valid to be applied in ApplyComponentInstanceData.

Public variable

float

 

Contrast

Contrast S-curve applied to the computed AO.

Public variable

UTextureCube &#...

 

Cubemap

Cubemap to use for sky lighting if SourceType is set to SLS_SpecifiedCubemap.

Public variable

int32

 

CubemapResolution

Maximum resolution for the very top processed cubemap mip. Must be a power of 2.

Protected variable

FSHVectorRGB3

 

IrradianceEnvironmentMap

Protected variable

FRenderCommandF...

 

IrradianceMapFence

Tracks when the rendering thread has completed its writes to IrradianceEnvironmentMap.

Public variable

FLinearColor

 

LowerHemisphereColor

Public variable

float

 

MinOcclusion

Controls the darkest that a fully occluded area can get.

Public variable

TEnumAsByte< en...

 

OcclusionCombineMode

Controls how occlusion from Distance Field Ambient Occlusion is combined with Screen Space Ambient Occlusion.

Public variable

float

 

OcclusionExponent

Exponent applied to the computed AO.

Public variable

float

 

OcclusionMaxDistance

Max distance that the occlusion of one point will affect another.

Public variable

FColor

 

OcclusionTint

Tint color on occluded areas, artistic control.

Protected variable

int32

 

PreEditCubemapResolution

Shadow copy saved before effects of PostEditChange() to provide option to roll back edit.

Protected variable

TRefCountPtr< F...

 

ProcessedSkyTexture

Protected variable

FRenderCommandF...

 

ReleaseResourcesFence

Fence used to track progress of releasing resources on the rendering thread.

Protected variable

FSkyLightSceneP...

 

SceneProxy

Public variable

float

 

SkyDistanceThreshold

Distance from the sky light at which any geometry should be treated as part of the sky.

Public variable

float

 

SourceCubemapAngle

Angle to rotate the source cubemap when SourceType is set to SLS_SpecifiedCubemap.

Public variable

TEnumAsByte< en...

 

SourceType

Indicates where to get the light contribution from.

Constructors

Name Description

Public function

USkyLightComponent

(
    const FObjectInitializer& ObjectIn...
)

Functions

Name Description

Public function

void

 

ApplyComponentInstanceData

Public function Const

void

 

CaptureEmissiveRadianceEnvironmentCubeMap

(
    FSHVectorRGB3& OutIrradianceMap,
    TArray< FFloat16Color >& OutRadian...
)

Computes a radiance map using only emissive contribution from the sky light.

Public function Const

FSkyLightSce...

 

CreateSceneProxy()

Public function Const

bool

 

IsOcclusionSupported()

Whether sky occlusion is supported by current feature level

Public function

void

 

RecaptureSky()

Recaptures the scene for the skylight.

Public function

void

 

SanitizeCubemapSize()

Public function

void

 

SetBlendDestinationCaptureIsDirty()

Public function

void

 

SetCaptureIsDirty()

Indicates that the capture needs to recapture the scene, adds it to the recapture queue.

Public function

void

 

SetCubemap

(
    UTextureCube* NewCubemap
)

Sets the cubemap used when SourceType is set to SpecifiedCubemap, and causes a skylight update on the next tick.

Public function

void

 

SetCubemapBlend

(
    UTextureCube* SourceCubemap,
    UTextureCube* DestinationCubem...,
    float InBlendFraction
)

Creates sky lighting from a blend between two cubemaps, which is only valid when SourceType is set to SpecifiedCubemap.

Public function

void

 

SetIndirectLightingIntensity

(
    float NewIntensity
)

Public function

void

 

SetIntensity

(
    float NewIntensity
)

Set brightness of the light

Public function

void

 

SetIrradianceEnvironmentMap

(
    const FSHVectorRGB3& InIrradianceE...
)

Public function

void

 

SetLightColor

(
    FLinearColor NewLightColor
)

Set color of the light

Public function

void

 

SetLowerHemisphereColor

(
    const FLinearColor& InLowerHemisph...
)

Public function

void

 

SetMinOcclusion

(
    float InMinOcclusion
)

Public function

void

 

SetOcclusionContrast

(
    float InOcclusionContrast
)

Public function

void

 

SetOcclusionExponent

(
    float InOcclusionExponent
)

Public function

void

 

SetOcclusionTint

(
    const FColor& InTint
)

Public function

void

 

SetVolumetricScatteringIntensity

(
    float NewIntensity
)

Public function

void

 

UpdateImportanceSamplingData()

Protected function

void

 

UpdateLimitedRenderingStateFast()

Fast path for updating light properties that doesn't require a re-register, Which would otherwise cause the scene's static draw lists to be recreated.

Protected function

void

 

UpdateOcclusionRenderingStateFast()

Public function Static

void

 

UpdateSkyCaptureContents

(
    UWorld* WorldToUpdate
)

Called each tick to recapture and queued sky captures.

Public function Static

void

 

UpdateSkyCaptureContentsArray

(
    UWorld* WorldToUpdate,
    TArray< USkyLightComponent* > ...,
    bool bBlendSources
)

Called each tick to recapture and queued sky captures.

Overridden from USceneComponent

Name Description

Protected function Virtual

void

 

OnVisibilityChanged()

Overridable internal function to respond to changes in the visibility of the component.

Overridden from UActorComponent

Name Description

Public function Virtual

void

 

CheckForErrors()

Function that gets called from within Map_Check to allow this actor component to check itself for any potential errors and register them with map check dialog.

Protected function Virtual

void

 

CreateRenderState_Concurrent

(
    FRegisterComponentContext* Con...
)

Used to create any rendering thread information for this component

Protected function Virtual

void

 

DestroyRenderState_Concurrent()

Used to shut down any rendering thread structure for this component

Public function Virtual Const

TStructOnSco...

 

GetComponentInstanceData()

Called before we throw away components during RerunConstructionScripts, to cache any data we wish to persist across that operation

Overridden from UObject

Name Description

Public function Virtual

void

 

BeginDestroy()

Called before destroying the object.

Public function Virtual Const

bool

 

CanEditChange

(
    const FProperty* InProperty
)

Called by the editor to query whether a property of this object is allowed to be modified.

Public function Virtual Const

bool

 

IsDestructionThreadSafe()

Called during garbage collection to determine if an object can have its destructor called on a worker thread.

Public function Virtual

bool

 

IsReadyForFinishDestroy()

Called to check if the object is ready for FinishDestroy.

Public function Virtual

void

 

PostEditChangeProperty

(
    FPropertyChangedEvent& PropertyCha...
)

Called when a property on this object has been modified externally

Public function Virtual

void

 

PostInitProperties()

Called after the C++ constructor and after the properties have been initialized, including those loaded from config.

Public function Virtual

void

 

PostInterpChange

(
    FProperty* PropertyThatChanged
)

This is called when property is modified by InterpPropertyTracks

Public function Virtual

void

 

PostLoad()

UObject Interface

Public function Virtual

void

 

PreEditChange

(
    FProperty* PropertyAboutToChan...
)

This is called when a property is about to be modified externally

Public function Virtual

void

 

Serialize

(
    FArchive& Ar
)

Handles reading, writing, and reference collecting using FArchive.

Constants

Name

Description

SkyCapturesToUpdate

List of sky captures that need to be recaptured.

SkyCapturesToUpdateBlendDestinations

SkyCapturesToUpdateLock

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss