diff --git a/02-Note/DAWA/ASoul/流程笔记/大世界添加笔记.md b/02-Note/DAWA/ASoul/流程笔记/大世界添加笔记.md new file mode 100644 index 0000000..10eed49 --- /dev/null +++ b/02-Note/DAWA/ASoul/流程笔记/大世界添加笔记.md @@ -0,0 +1,7 @@ +# 添加步骤 +1. 在Maps文件中构建**Map_xxx**文件夹以及同名称的大世界Map。 +2. 在地图中间添加LiveArea,并且设置标题。 + +## 大世界地图添加位置 +在Maps创一个文件文件即可,命名规则为**Map_xxx**。 +**Maps/Scenes/Map_xxx**存放对应大世界的资产。 \ No newline at end of file diff --git a/02-Note/DAWA/ASoul/渲染方案/Shader修改部分.md b/02-Note/DAWA/ASoul/渲染方案/Shader修改部分.md new file mode 100644 index 0000000..021cd8a --- /dev/null +++ b/02-Note/DAWA/ASoul/渲染方案/Shader修改部分.md @@ -0,0 +1,46 @@ + + +# PostProcess +## ToneMapping +c++部分主要修改了: +1. PostProcessing.cpp +2. PostProcessTonemap.cpp +3. PostProcessTonemap.h + +***实现向ToneMaper Shader传递 `TRDGUniformBufferRef`的功能*** + +之后再PostProcessTonemap.usf中,对**CustomStencil**进行判断,如果为true,则直接返回之前渲染结果。 +```c++ +#include "DeferredShadingCommon.ush" + +// pixel shader entry point +void MainPS( + in noperspective float2 UV : TEXCOORD0, + in noperspective float2 InVignette : TEXCOORD1, + in noperspective float4 GrainUV : TEXCOORD2, + in noperspective float2 ScreenPos : TEXCOORD3, + in noperspective float2 FullViewUV : TEXCOORD4, + float4 SvPosition : SV_POSITION, // after all interpolators + out float4 OutColor : SV_Target0 +#if OUTPUT_LUMINANCE + , out float OutLuminance: SV_Target1 +#endif + ) +{ + float Luminance; + FGBufferData SamplerBuffer = GetGBufferData(UV * View.ResolutionFractionAndInv.x, false); + if (SamplerBuffer.CustomStencil > 1.0f && abs(SamplerBuffer.CustomDepth - SamplerBuffer.Depth) < 1) + { + OutColor = SampleSceneColor(UV); + } + else + { + OutColor = TonemapCommonPS(UV, InVignette, GrainUV, ScreenPos, FullViewUV, SvPosition, Luminance); + } +#if OUTPUT_LUMINANCE + OutLuminance = Luminance; +#endif +} +``` + +## Lut \ No newline at end of file