engine
 
载入中...
搜索中...
未找到
Public 成员函数 | Protected 成员函数 | Protected 属性 | 所有成员列表
FLightSceneProxy类 参考

Encapsulates the data which is used to render a light by the rendering thread. 更多...

#include <SceneManagement.h>

+ 类 FLightSceneProxy 继承关系图:

Public 成员函数

virtual bool AffectsBounds (const FBoxSphereBounds &Bounds) const
 Tests whether the light affects the given bounding volume. 更多...
 
virtual void ApplyWorldOffset (FVector InOffset)
 Shifts light position and all relevant data by an arbitrary delta. 更多...
 
 FLightSceneProxy (const ULightComponent *InLightComponent)
 Initialization constructor.
 
const ULightComponent * GetLightComponent () const
 Note: The Rendering thread must not dereference UObjects!
The game thread owns UObject state and may be writing to them at any time. 更多...
 
virtual void GetLightShaderParameters (FLightShaderParameters &PathTracingLightParameters) const
 Accesses parameters needed for rendering the light.
 
virtual uint32 GetNumViewDependentWholeSceneShadows (const FSceneView &View, bool bPrecomputedLightingIsValid) const
 Returns the number of view dependent shadows this light will create, not counting distance field shadow cascades.
 
virtual bool GetPerObjectProjectedShadowInitializer (const FBoxSphereBounds &SubjectBounds, class FPerObjectProjectedShadowInitializer &OutInitializer) const
 Sets up a projected shadow initializer for the given subject. 更多...
 
virtual float GetRadius () const
 
virtual float GetSunLightHalfApexAngleRadian () const
 
virtual bool GetViewDependentRsmWholeSceneProjectedShadowInitializer (const class FSceneView &View, const FBox &LightPropagationVolumeBounds, class FWholeSceneProjectedShadowInitializer &OutInitializer) const
 Sets up a projected shadow initializer for a reflective shadow map that's dependent on the current view for shadows from the entire scene. 更多...
 
virtual bool GetViewDependentWholeSceneProjectedShadowInitializer (const class FSceneView &View, int32 InCascadeIndex, bool bPrecomputedLightingIsValid, class FWholeSceneProjectedShadowInitializer &OutInitializer) const
 Sets up a projected shadow initializer that's dependent on the current view for shadows from the entire scene. 更多...
 
virtual bool GetWholeSceneProjectedShadowInitializer (const FSceneViewFamily &ViewFamily, TArray< class FWholeSceneProjectedShadowInitializer, TInlineAllocator< 6 > > &OutInitializers) const
 Sets up a projected shadow initializer for shadows from the entire scene. 更多...
 
virtual bool ShouldCreatePerObjectShadowsForDynamicObjects () const
 Whether this light should create per object shadows for dynamic objects.
 
virtual bool UseCSMForDynamicObjects () const
 Whether this light should create CSM for dynamic objects only (forward renderer)
 

Protected 成员函数

void SetColor (const FLinearColor &InColor)
 Updates the light's color.
 
void SetTransform (const FMatrix &InLightToWorld, const FVector4 &InPosition)
 Updates the light proxy's cached transforms. 更多...
 

Protected 属性

const uint8 AtmosphereSunLightIndex
 The index of the atmospheric light. 更多...
 
const uint8 bAffectDynamicIndirectLighting: 1
 Does the light have dynamic GI?
 
const uint8 bAffectGlobalIllumination: 1
 Whether the light affects global illumination, when ray-traced global illumination is enabled.
 
const uint8 bAffectReflection: 1
 Whether the light affects objects in reflections, when ray-traced reflection is enabled.
 
const uint8 bAffectTranslucentLighting: 1
 Whether the light affects translucency or not. 更多...
 
const uint8 bCastDynamicShadow: 1
 True if the light casts dynamic shadows.
 
uint8 bCastModulatedShadows: 1
 Whether the light will cast modulated shadows when using the forward renderer (mobile).
 
const uint8 bCastRaytracedShadow: 1
 Whether the light shadows are computed with shadow-mapping or ray-tracing (when available).
 
const uint8 bCastStaticShadow: 1
 True if the light casts static shadows.
 
const uint8 bCastTranslucentShadows: 1
 Whether the light is allowed to cast dynamic shadows from translucency.
 
uint8 bContactShadowLengthInWS: 1
 True: length of screen space ray trace for sharp contact shadows is in world space. 更多...
 
bool bMobileMovablePointLightShouldBeRender
 Cached ShouldBeRender for mobile, since if the ShouldBeRender is changed we have to update the movable point lights uniform buffer.
 
bool bMobileMovablePointLightShouldCastShadow
 Cached DynamicShadows show flag for mobile, since if the show flag is changed we have to update the movable point lights uniform buffer.
 
bool bMobileMovablePointLightUniformBufferNeedsUpdate
 If this is TRUE, the light's mobile movable point light uniform buffer needs to be updated before it can be used for mobile base pass rendering.
 
const uint8 bStaticLighting: 1
 Return True if a light's parameters as well as its position is static during gameplay, and can thus use static lighting. 更多...
 
const uint8 bStaticShadowing: 1
 Whether the light has static direct shadowing. 更多...
 
uint8 bTiledDeferredLightingSupported: 1
 Whether the light supports rendering in tiled deferred pass
 
const uint8 bTransmission: 1
 Whether light from this light transmits through surfaces with subsurface scattering profiles. 更多...
 
const uint8 bUsedAsAtmosphereSunLight: 1
 Whether to consider light as a sunlight for atmospheric scattering and exponential height fog.
 
const uint8 bUseRayTracedDistanceFieldShadows: 1
 Whether to use ray traced distance field area shadows.
 
uint8 bUseWholeSceneCSMForMovableObjects: 1
 Whether to render csm shadows for movable objects only (mobile).
 
FLinearColor Color
 The light color.
 
FName ComponentName
 The name of the light component.
 
float ContactShadowLength
 Length of screen space ray trace for sharp contact shadows.
 
float DeepShadowLayerDistribution
 Deep shadow layer distribution.
 
uint32 FarShadowCascadeCount
 Only for whole scene directional lights, 0: no FarShadowCascades, otherwise the count of cascades between WholeSceneDynamicShadowRadius and FarShadowDistance that are covered by distant shadow cascades.
 
float FarShadowDistance
 Only for whole scene directional lights, if FarShadowCascadeCount > 0 and FarShadowDistance >= WholeSceneDynamicShadowRadius, where far shadow cascade should end.
 
UTextureLightProfile * IESTexture
 IES texture (light profiles from real world measured data) We are safe to store a U pointer as those objects get deleted deferred, storing an FTexture pointer would crash if we recreate the texture
 
float IndirectLightingScale
 Scale for indirect lighting from this light. 更多...
 
FName LevelName
 The name of the level the light is in.
 
const ULightComponent * LightComponent
 The light component.
 
FVector LightFunctionScale
 Light function parameters.
 
FGuid LightGuid
 The light's persistent shadowing GUID.
 
class FLightSceneInfo * LightSceneInfo
 The light's scene info.
 
FMatrix LightToWorld
 A transform from light space into world space.
 
const uint8 LightType
 The light type (ELightComponentType)
 
FVector4 MobileMovablePointLightShadowmapMinMax
 Cached the spotlight shadow map min and max value for mobile, since if the value is changed we have to update the movable point lights uniform buffer.
 
TUniformBufferRef< FMobileMovablePointLightUniformShaderParameters > MobileMovablePointLightUniformBuffer
 The movable point light's uniform buffer for mobile.
 
FLinearColor ModulatedShadowColor
 Modulated shadow color.
 
FVector4 Position
 The homogenous position of the light.
 
int32 PreviewShadowMapChannel
 Transient shadowmap channel used to preview the results of stationary light shadowmap packing.
 
uint32 SamplesPerPixel
 Samples per pixel for ray tracing
 
FSceneInterface * SceneInterface
 The scene the primitive is in.
 
float ShadowAmount
 Control the amount of shadow occlusion.
 
float ShadowBias
 User setting from light component, 0:no bias, 0.5:reasonable, larger object might appear to float
 
int32 ShadowMapChannel
 Shadow map channel which is used to match up with the appropriate static shadowing during a deferred shading pass. 更多...
 
float ShadowSharpen
 Sharpen shadow filtering
 
float ShadowSlopeBias
 User setting from light component, 0:no bias, 0.5:reasonable, larger object might appear to float
 
float SpecularScale
 Specular scale
 
TStatId StatId
 Used for dynamic stats
 
float VolumetricScatteringIntensity
 Scales this light's intensity for volumetric scattering.
 
FMatrix WorldToLight
 A transform from world space into light space.
 

详细描述

Encapsulates the data which is used to render a light by the rendering thread.

The constructor is called from the game thread, and after that the rendering thread owns the object. FLightSceneProxy is in the engine module and is subclassed to implement various types of lights.

成员函数说明

◆ AffectsBounds()

virtual bool FLightSceneProxy::AffectsBounds ( const FBoxSphereBounds &  Bounds) const
inlinevirtual

Tests whether the light affects the given bounding volume.

参数
Bounds- The bounding volume to test.
返回
True if the light affects the bounding volume

被 FLocalLightSceneProxy 重载.

◆ ApplyWorldOffset()

virtual void FLightSceneProxy::ApplyWorldOffset ( FVector  InOffset)
virtual

Shifts light position and all relevant data by an arbitrary delta.

Called on world origin changes

参数
InOffset- The delta to shift by

◆ GetLightComponent()

const ULightComponent * FLightSceneProxy::GetLightComponent ( ) const
inline

Note: The Rendering thread must not dereference UObjects!
The game thread owns UObject state and may be writing to them at any time.

Mirror the data in the scene proxy and access that instead.

◆ GetPerObjectProjectedShadowInitializer()

virtual bool FLightSceneProxy::GetPerObjectProjectedShadowInitializer ( const FBoxSphereBounds &  SubjectBounds,
class FPerObjectProjectedShadowInitializer &  OutInitializer 
) const
inlinevirtual

Sets up a projected shadow initializer for the given subject.

参数
SubjectBounds- The bounding volume of the subject.
OutInitializer- Upon successful return, contains the initialization parameters for the shadow.
返回
True if a projected shadow should be cast by this subject-light pair.

被 FLocalLightSceneProxy 重载.

◆ GetRadius()

virtual float FLightSceneProxy::GetRadius ( ) const
inlinevirtual
返回
radius of the light

被 FLocalLightSceneProxy 重载.

◆ GetSunLightHalfApexAngleRadian()

virtual float FLightSceneProxy::GetSunLightHalfApexAngleRadian ( ) const
inlinevirtual
返回
the light half apex angle (half angular diameter) in radian.

◆ GetViewDependentRsmWholeSceneProjectedShadowInitializer()

virtual bool FLightSceneProxy::GetViewDependentRsmWholeSceneProjectedShadowInitializer ( const class FSceneView &  View,
const FBox &  LightPropagationVolumeBounds,
class FWholeSceneProjectedShadowInitializer &  OutInitializer 
) const
inlinevirtual

Sets up a projected shadow initializer for a reflective shadow map that's dependent on the current view for shadows from the entire scene.

返回
True if the whole-scene projected shadow should be used.

◆ GetViewDependentWholeSceneProjectedShadowInitializer()

virtual bool FLightSceneProxy::GetViewDependentWholeSceneProjectedShadowInitializer ( const class FSceneView &  View,
int32  InCascadeIndex,
bool  bPrecomputedLightingIsValid,
class FWholeSceneProjectedShadowInitializer &  OutInitializer 
) const
inlinevirtual

Sets up a projected shadow initializer that's dependent on the current view for shadows from the entire scene.

参数
InCascadeIndexcascade index or INDEX_NONE for the distance field cascade
返回
True if the whole-scene projected shadow should be used.

◆ GetWholeSceneProjectedShadowInitializer()

virtual bool FLightSceneProxy::GetWholeSceneProjectedShadowInitializer ( const FSceneViewFamily &  ViewFamily,
TArray< class FWholeSceneProjectedShadowInitializer, TInlineAllocator< 6 > > &  OutInitializers 
) const
inlinevirtual

Sets up a projected shadow initializer for shadows from the entire scene.

返回
True if the whole-scene projected shadow should be used.

◆ SetTransform()

void FLightSceneProxy::SetTransform ( const FMatrix &  InLightToWorld,
const FVector4 &  InPosition 
)
protected

Updates the light proxy's cached transforms.

参数
InLightToWorld- The new light-to-world transform.
InPosition- The new position of the light.

类成员变量说明

◆ AtmosphereSunLightIndex

const uint8 FLightSceneProxy::AtmosphereSunLightIndex
protected

The index of the atmospheric light.

Multiple lights can be considered when computing the sky/atmospheric scattering.

◆ bAffectTranslucentLighting

const uint8 FLightSceneProxy::bAffectTranslucentLighting
protected

Whether the light affects translucency or not.

Disabling this can save GPU time when there are many small lights.

◆ bContactShadowLengthInWS

uint8 FLightSceneProxy::bContactShadowLengthInWS
protected

True: length of screen space ray trace for sharp contact shadows is in world space.

False: in screen space.

◆ bStaticLighting

const uint8 FLightSceneProxy::bStaticLighting
protected

Return True if a light's parameters as well as its position is static during gameplay, and can thus use static lighting.

A light with HasStaticLighting() == true will always have HasStaticShadowing() == true as well.

◆ bStaticShadowing

const uint8 FLightSceneProxy::bStaticShadowing
protected

Whether the light has static direct shadowing.


The light may still have dynamic brightness and color. The light may or may not also have static lighting.

◆ bTransmission

const uint8 FLightSceneProxy::bTransmission
protected

Whether light from this light transmits through surfaces with subsurface scattering profiles.

Requires light to be movable.

◆ IndirectLightingScale

float FLightSceneProxy::IndirectLightingScale
protected

Scale for indirect lighting from this light.

When 0, indirect lighting is disabled.

◆ ShadowMapChannel

int32 FLightSceneProxy::ShadowMapChannel
protected

Shadow map channel which is used to match up with the appropriate static shadowing during a deferred shading pass.

This is generated during a lighting build.


该类的文档由以下文件生成: