|
|
|
|
|
|
|
|
|
|
namespace UnityEditor.Experimental.Rendering.HDPipeline |
|
|
|
{ |
|
|
|
#if UNITY_2018_2_OR_NEWER
|
|
|
|
class HDRPVariantStripper : IPreprocessShaders |
|
|
|
{ |
|
|
|
// returns true if the variant should be stripped.
|
|
|
|
|
|
|
// FOG_LINEAR, FOG_EXP, FOG_EXP2
|
|
|
|
// STEREO_INSTANCING_ON, STEREO_MULTIVIEW_ON, STEREO_CUBEMAP_RENDER_ON, UNITY_SINGLE_PASS_STEREO
|
|
|
|
// INSTANCING_ON
|
|
|
|
|
|
|
|
|
|
|
|
if (!m_CurrentHDRPAsset.renderPipelineSettings.supportMotionVectors && isMotionPass) |
|
|
|
return true; |
|
|
|
|
|
|
|
|
|
|
if (isTransparentForwardPass) |
|
|
|
return true; |
|
|
|
|
|
|
|
if (!m_CurrentHDRPAsset.renderPipelineSettings.supportForwardOnly && inputData.shaderKeywordSet.IsEnabled(m_ClusterLighting)) |
|
|
|
if (!m_CurrentHDRPAsset.renderPipelineSettings.supportForwardOnly && inputData.shaderKeywordSet.IsEnabled(m_ClusterLighting)) |
|
|
|
return true; |
|
|
|
|
|
|
|
if (!m_CurrentHDRPAsset.renderPipelineSettings.supportForwardOnly) |
|
|
|
|
|
|
inputData.Add(workaround); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
#endif
|
|
|
|
} |