Skip to content

Instantly share code, notes, and snippets.

## USD 格式 特色
@2youyou2
2youyou2 / gist:d2244f33c28e1eb20cff2e302b50c796
Created December 17, 2020 09:35
unreal 4.25 subsurface shader 流程
- ShadowProjectionPixelShader.usf/Main (画阴影到 Common.ush/LightAttenuationTexture 中)
- SSSTransmission = ManualPCF(ShadowPosition.xy, Settings); (输出到 FadedSSSShadow)
- OutColor = EncodeLightAttenuation(half4(FadedShadow, FadedSSSShadow, FadedShadow, FadedSSSShadow)) (最终输出)
- BasePassPixelShader.usf/FPixelShaderInOut_MainPS (画基本物体的 pass)
- 调用 MaterialTemplate.ush 提供的方法(材质蓝图会根据 MaterialTemplate.ush 填充对应的方法)
GetMaterialBaseColor
GetMaterialMetallic
GetMaterialSpecular