vault backup: 2024-03-13 12:50:59
This commit is contained in:
parent
b79eccb7dd
commit
93450080eb
@ -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
|
||||
在材质中:
|
||||
|
BIN
07-Other/生活/装修/客厅玻璃隔间书房/微信图片_20240312183541.jpg
Normal file
BIN
07-Other/生活/装修/客厅玻璃隔间书房/微信图片_20240312183541.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 818 KiB |
BIN
07-Other/生活/装修/客厅玻璃隔间书房/微信图片_20240312183547.jpg
Normal file
BIN
07-Other/生活/装修/客厅玻璃隔间书房/微信图片_20240312183547.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 MiB |
Loading…
x
Reference in New Issue
Block a user