public static readonly ShaderKeyword DirectionalShadows = new ShaderKeyword ( LightweightKeywordStrings . DirectionalShadows ) ;
public static readonly ShaderKeyword LocalShadows = new ShaderKeyword ( LightweightKeywordStrings . LocalShadows ) ;
public static readonly ShaderKeyword SoftShadows = new ShaderKeyword ( LightweightKeywordStrings . SoftShadows ) ;
public static readonly ShaderKeyword CascadeShadows = new ShaderKeyword ( LightweightKeywordStrings . CascadeShadows ) ;
public static readonly ShaderKeyword Lightmap = new ShaderKeyword ( "LIGHTMAP_ON" ) ;
public static readonly ShaderKeyword DirectionalLightmap = new ShaderKeyword ( "DIRLIGHTMAP_COMBINED" ) ;
bool StripInvalidVariants ( ShaderCompilerData compilerData )
{
bool isShadowVariant = compilerData . shaderKeywordSet . IsEnabled ( LightweightKeyword . DirectionalShadows ) | |
compilerData . shaderKeywordSet . IsEnabled ( LightweightKeyword . LocalShadows ) ;
bool isDirectionalShadows = compilerData . shaderKeywordSet . IsEnabled ( LightweightKeyword . DirectionalShadows ) ;
bool isShadowVariant = isDirectionalShadows | | compilerData . shaderKeywordSet . IsEnabled ( LightweightKeyword . LocalShadows ) ;
if ( ! isDirectionalShadows & & compilerData . shaderKeywordSet . IsEnabled ( LightweightKeyword . CascadeShadows ) )
return true ;
if ( compilerData . shaderKeywordSet . IsEnabled ( LightweightKeyword . SoftShadows ) & & ! isShadowVariant )
if ( ! isShadowVariant & & compilerData . shaderKeywordSet . IsEnabled ( LightweightKeyword . SoftShadows ) )
return true ;
if ( compilerData . shaderKeywordSet . IsEnabled ( LightweightKeyword . VertexLights ) & &