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