2025-03-20 18:06:50 +08:00
|
|
|
|
---
|
|
|
|
|
title: ToonReflection
|
|
|
|
|
date: 2025-03-20 17:04:16
|
|
|
|
|
excerpt:
|
|
|
|
|
tags:
|
|
|
|
|
rating: ⭐
|
|
|
|
|
---
|
|
|
|
|
# 反射功能相关Pass
|
2025-03-21 20:01:46 +08:00
|
|
|
|
- ReflectionIndirect(None)
|
|
|
|
|
- [[#ReflectionEnvironmentAndSky]]
|
|
|
|
|
- DiffuseIndirectAndAO(Lumen/SSR)
|
|
|
|
|
- LumenReflections
|
|
|
|
|
- [[#DiffuseIndirectComposite]]
|
|
|
|
|
|
|
|
|
|
## ReflectionEnvironmentAndSky
|
2025-03-21 23:40:59 +08:00
|
|
|
|
位于IndirectLightRendering.cpp的RenderDeferredReflectionsAndSkyLighting() => `AddSkyReflectionPass()`
|
2025-03-21 20:01:46 +08:00
|
|
|
|
|
2025-03-21 23:40:59 +08:00
|
|
|
|
当`DiffuseIndirectMethod = EDiffuseIndirectMethod::Lumen`(也就是开启Lumen GI),如果反射方法为Lumen或者SSR则不会执行后续逻辑。
|
|
|
|
|
|
|
|
|
|
不开启Lumen GI,反射方法为:
|
|
|
|
|
- Lumen:`RenderLumenReflections()`
|
|
|
|
|
- Rtx Reflection:`RenderRayTracingReflections()`
|
|
|
|
|
- SSR:`ScreenSpaceRayTracing::RenderScreenSpaceReflections()`
|
|
|
|
|
|
|
|
|
|
执行完上述反射方法后,最后执行`AddSkyReflectionPass()`
|
2025-03-21 20:01:46 +08:00
|
|
|
|
## DiffuseIndirectComposite
|
|
|
|
|
位于IndirectLightRendering.cpp的`RenderDiffuseIndirectAndAmbientOcclusion()`
|