vault backup: 2025-02-11 15:54:25
This commit is contained in:
@@ -7,7 +7,6 @@ rating: ⭐
|
||||
---
|
||||
|
||||
# FSortedLightSetSceneInfo
|
||||
|
||||
有序的光源集合相关定义:
|
||||
```c++
|
||||
/** Data for a simple dynamic light. */
|
||||
@@ -158,7 +157,14 @@ void FDeferredShadingSceneRenderer::Render(FRHICommandListImmediate& RHICmdList)
|
||||
}
|
||||
```
|
||||
|
||||
##
|
||||
PS. 简单光源都可以被分块或分簇渲染,但对于非简单光源,只有满足以下条件的光源才可被分块或分簇渲染:
|
||||
- 没有使用光源的附加特性(TextureProfile、LightFunction、LightingChannel)。
|
||||
- 没有开启阴影。
|
||||
- 非平行光或矩形光。
|
||||
|
||||
另外,是否支持分块渲染,还需要光源场景代理的`IsTiledDeferredLightingSupported`返回true,长度为0的点光源才支持分块渲染。
|
||||
|
||||
## GatherLightsAndComputeLightGrid
|
||||
```c++
|
||||
FComputeLightGridOutput FDeferredShadingSceneRenderer::GatherLightsAndComputeLightGrid(FRDGBuilder& GraphBuilder, bool bNeedLightGrid, FSortedLightSetSceneInfo& SortedLightSet)
|
||||
{
|
||||
@@ -199,4 +205,11 @@ FComputeLightGridOutput FDeferredShadingSceneRenderer::GatherLightsAndComputeLig
|
||||
|
||||
return Result;
|
||||
}
|
||||
```
|
||||
```
|
||||
|
||||
- GatherAndSortLights:收集与排序当前场景中所有的可见光源(当前View)。
|
||||
- ComputeLightGrid:是在锥体空间(frustum space)裁剪局部光源和反射探针到3D格子中,构建每个视图相关的光源列表和格子。
|
||||
|
||||
# RenderLights() -> RenderLight()
|
||||
|
||||
## InternalRenderLight()
|
||||
|
Reference in New Issue
Block a user