|
|
|
|
|
|
protected ShaderKeyword m_TileLighting; |
|
|
|
protected ShaderKeyword m_ClusterLighting; |
|
|
|
protected ShaderKeyword m_LodFadeCrossFade; |
|
|
|
protected ShaderKeyword m_Decals3RT; |
|
|
|
protected ShaderKeyword m_Decals4RT; |
|
|
|
|
|
|
|
public BaseShaderPreprocessor() |
|
|
|
{ |
|
|
|
|
|
|
m_ClusterLighting = new ShaderKeyword("USE_CLUSTERED_LIGHTLIST"); |
|
|
|
m_LodFadeCrossFade = new ShaderKeyword("LOD_FADE_CROSSFADE"); |
|
|
|
m_Decals3RT = new ShaderKeyword("_DECALS_3RT"); |
|
|
|
m_Decals4RT = new ShaderKeyword("_DECALS_4RT"); |
|
|
|
} |
|
|
|
|
|
|
|
public virtual void AddStripperFuncs(Dictionary<string, VariantStrippingFunc> stripperFuncs) {} |
|
|
|
|
|
|
return true; |
|
|
|
|
|
|
|
if (inputData.shaderKeywordSet.IsEnabled(m_LodFadeCrossFade) && !hdrpAsset.renderPipelineSettings.supportDitheringCrossFade) |
|
|
|
return true; |
|
|
|
|
|
|
|
// Decal case
|
|
|
|
// If no decal, remove decal variant
|
|
|
|
if ((inputData.shaderKeywordSet.IsEnabled(m_Decals3RT) || inputData.shaderKeywordSet.IsEnabled(m_Decals4RT)) && !hdrpAsset.renderPipelineSettings.supportDecals) |
|
|
|
return true; |
|
|
|
|
|
|
|
// If decal but with 4RT remove 3RT variant and vice versa
|
|
|
|
if (inputData.shaderKeywordSet.IsEnabled(m_Decals3RT) && hdrpAsset.renderPipelineSettings.decalSettings.perChannelMask) |
|
|
|
return true; |
|
|
|
|
|
|
|
if (inputData.shaderKeywordSet.IsEnabled(m_Decals4RT) && !hdrpAsset.renderPipelineSettings.decalSettings.perChannelMask) |
|
|
|
return true; |
|
|
|
|
|
|
|
return false; |
|
|
|