// Emissive
public static string emissiveLabelText = "Emissive Inputs" ;
public static GUIContent emissiveText = new GUIContent ( "Emissive Color" , "Emissive" ) ;
public static GUIContent emissiveIntensityText = new GUIContent ( "Emissive Intensity" , "Emissive" ) ;
public static GUIContent emissiveText = new GUIContent ( "Emissive Color" , "Emissive Color (linear RGB) in nits unit" ) ;
public static GUIContent albedoAffectEmissiveText = new GUIContent ( "Albedo Affect Emissive" , "Specifies whether or not the emissive color is multiplied by the albedo." ) ;
public static GUIContent normalMapSpaceWarning = new GUIContent ( "Object space normal can't be use with triplanar mapping." ) ;
protected const string kEmissiveColor = "_EmissiveColor" ;
protected MaterialProperty emissiveColorMap = null ;
protected const string kEmissiveColorMap = "_EmissiveColorMap" ;
protected MaterialProperty emissiveIntensity = null ;
protected const string kEmissiveIntensity = "_EmissiveIntensity" ;
protected MaterialProperty albedoAffectEmissive = null ;
protected const string kAlbedoAffectEmissive = "_AlbedoAffectEmissive" ;
protected MaterialProperty UVEmissive = null ;
emissiveColorMode = FindProperty ( kEmissiveColorMode , props ) ;
emissiveColor = FindProperty ( kEmissiveColor , props ) ;
emissiveColorMap = FindProperty ( kEmissiveColorMap , props ) ;
emissiveIntensity = FindProperty ( kEmissiveIntensity , props ) ;
albedoAffectEmissive = FindProperty ( kAlbedoAffectEmissive , props ) ;
UVEmissive = FindProperty ( kUVEmissive , props ) ;
EditorGUI . indentLevel - - ;
}
m_MaterialEditor . ShaderProperty ( emissiveIntensity , Styles . emissiveIntensityText ) ;
m_MaterialEditor . ShaderProperty ( albedoAffectEmissive , Styles . albedoAffectEmissiveText ) ;
EditorGUI . indentLevel - - ;
}
m_MaterialEditor . ShaderProperty ( enableSpecularOcclusion , Styles . enableSpecularOcclusionText ) ;
}
protected override bool ShouldEmissionBeEnabled ( Material mat )
protected override bool ShouldEmissionBeEnabled ( Material material )
return mat . GetFloat ( kEmissiveIntensity ) > 0.0f ;
return ( material . GetColor ( kEmissiveColor ) ! = Color . black ) | | material . GetTexture ( kEmissiveColorMap ) ;
}
protected override void SetupMaterialKeywordsAndPassInternal ( Material material )