2023-06-29 11:55:02 +08:00

45 lines
1.4 KiB
Markdown

---
title: RenderLights
date: 2023-04-09 10:23:21
excerpt:
tags:
rating: ⭐
---
# 关键函数
取得所有ShadowMap的投影信息
```c++
const FVisibleLightInfo& VisibleLightInfo = VisibleLightInfos[LightSceneInfo->Id];
const TArray<FProjectedShadowInfo*, SceneRenderingAllocator>& ShadowMaps = VisibleLightInfo.ShadowsToProject;
for (int32 ShadowIndex = 0; ShadowIndex < ShadowMaps.Num(); ShadowIndex++)
{
const FProjectedShadowInfo* ProjectedShadowInfo = ShadowMaps[ShadowIndex];
}
```
# 透明体积图元渲染
## InjectSimpleTranslucencyLightingVolumeArray
插入简单透明体积物体渲染。应该是根据3D贴图渲染体积效果。默认状态下不运行。
- InjectSimpleLightsTranslucentLighting
- InjectSimpleTranslucentLightArray
## InjectTranslucencyLightingVolume
在收集用于渲染透明体积的灯光代理信息后进行渲染,主要用于云的渲染。
- InjectTranslucencyLightingVolume
# 直接光照
## RenderVirtualShadowMapProjectionMaskBits
- VirtualShadowMapProjectionMaskBits
- VirtualShadowMapProjection(RayCount:%u(%s),SamplesPerRay:%u,Input:%s%s)
输出到名为`Shadow.Virtual.MaskBits`与`Shadow.Virtual.MaskBits(HairStrands)`的UAV。
## AddClusteredDeferredShadingPass
## RenderSimpleLightsStandardDeferred
## RenderLight
针对每个灯在ShadowProjectionOnOpaque渲染ShadowMask
- VirualShadowMapProjection
- CompositeVirtualShadowMapMask