From 57265a28d5b936c964fca8daf4f68b1834712df4 Mon Sep 17 00:00:00 2001 From: BlueRose <378100977@qq.com> Date: Mon, 20 Jan 2025 22:14:30 +0800 Subject: [PATCH] vault backup: 2025-01-20 22:14:30 --- .../渲染功能/PostProcess/ToonPostProcess.md | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/03-UnrealEngine/卡通渲染相关资料/渲染功能/PostProcess/ToonPostProcess.md b/03-UnrealEngine/卡通渲染相关资料/渲染功能/PostProcess/ToonPostProcess.md index a2c4e07..5212840 100644 --- a/03-UnrealEngine/卡通渲染相关资料/渲染功能/PostProcess/ToonPostProcess.md +++ b/03-UnrealEngine/卡通渲染相关资料/渲染功能/PostProcess/ToonPostProcess.md @@ -196,4 +196,20 @@ void AddPostProcessingPasses() ## PostProcessCombineLUTs.usf 相关变量更新函数位于FCachedLUTSettings::GetCombineLUTParameters() -## PostProcessTonemap.usf \ No newline at end of file +## PostProcessTonemap.usf + +## 实现方法 + +```c++ +//BlueRose Modify +FGBufferData SamplerBuffer = GetGBufferData(UV * View.ResolutionFractionAndInv.x, false); +if (SamplerBuffer.CustomStencil > 1.0f && abs(SamplerBuffer.CustomDepth - SamplerBuffer.Depth) < 1) +{ + // OutColor = SampleSceneColor(UV); + OutColor = TonemapCommonPS(UV, InVignette, GrainUV, ScreenPos, FullViewUV, SvPosition, Luminance); +}else +{ + OutColor = TonemapCommonPS(UV, InVignette, GrainUV, ScreenPos, FullViewUV, SvPosition, Luminance); +} +//BlueRose Modify End +``` \ No newline at end of file