diff --git a/03-UnrealEngine/卡通渲染相关资料/渲染功能/ShaderModel/GBuffer&Material&BasePass.md b/03-UnrealEngine/卡通渲染相关资料/渲染功能/ShaderModel/GBuffer&Material&BasePass.md index 7c9c110..c64343f 100644 --- a/03-UnrealEngine/卡通渲染相关资料/渲染功能/ShaderModel/GBuffer&Material&BasePass.md +++ b/03-UnrealEngine/卡通渲染相关资料/渲染功能/ShaderModel/GBuffer&Material&BasePass.md @@ -222,10 +222,20 @@ else if (Mat.IS_BASE_PASS) ### MaterialTemplate.ush MaterialTemplate.ush中定义许多模版函数,里面的具体内容会在HLSLMaterialTranslator.h中的**GetMaterialShaderCode()** 中添加。最后这些函数会在BassPassPixelShader.usf中调用。 +#### FMaterialAttributes MaterialTemplate.ush有一处`/** Material declarations */`之后会生成对应FMaterialAttributes结构体,可以在材质编辑器的HLSL中查看生成结果。这与 - MaterialAttributeDefinitionMap.cpp:FMaterialAttributeDefinitionMap::InitializeAttributeMap()中定义属性。 - HLSLMaterialTranslator.cpp:GetMaterialShaderCode()中的`for (const FGuid& AttributeID : OrderedVisibleAttributes)`:生成对应属性结构体以及属性获取函数。 +#### DerivativeAutogen.GenerateUsedFunctions() +```c++ +{ + FString DerivativeHelpers = DerivativeAutogen.GenerateUsedFunctions(*this); + FString DerivativeHelpersAndResources = DerivativeHelpers + ResourcesString; + //LazyPrintf.PushParam(*ResourcesString); + LazyPrintf.PushParam(*DerivativeHelpersAndResources); +} +``` ### 是否需要Toon 在材质中: diff --git a/07-Other/生活/装修/客厅玻璃隔间书房/微信图片_20240312183541.jpg b/07-Other/生活/装修/客厅玻璃隔间书房/微信图片_20240312183541.jpg new file mode 100644 index 0000000..17d4d31 Binary files /dev/null and b/07-Other/生活/装修/客厅玻璃隔间书房/微信图片_20240312183541.jpg differ diff --git a/07-Other/生活/装修/客厅玻璃隔间书房/微信图片_20240312183547.jpg b/07-Other/生活/装修/客厅玻璃隔间书房/微信图片_20240312183547.jpg new file mode 100644 index 0000000..a98425a Binary files /dev/null and b/07-Other/生活/装修/客厅玻璃隔间书房/微信图片_20240312183547.jpg differ