|
|
|
|
|
|
SurfaceType surfaceType = (SurfaceType)material.GetFloat(kSurfaceType); |
|
|
|
CoreUtils.SetKeyword(material, "_SURFACE_TYPE_TRANSPARENT", surfaceType == SurfaceType.Transparent); |
|
|
|
|
|
|
|
bool enableBlendModePreserveSpecularLighting = material.HasProperty(kEnableBlendModePreserveSpecularLighting) && material.GetFloat(kEnableBlendModePreserveSpecularLighting) > 0.0f; |
|
|
|
bool enableBlendModePreserveSpecularLighting = (surfaceType == SurfaceType.Transparent) && material.HasProperty(kEnableBlendModePreserveSpecularLighting) && material.GetFloat(kEnableBlendModePreserveSpecularLighting) > 0.0f; |
|
|
|
CoreUtils.SetKeyword(material, "_BLENDMODE_PRESERVE_SPECULAR_LIGHTING", enableBlendModePreserveSpecularLighting); |
|
|
|
|
|
|
|
// These need to always been set either with opaque or transparent! So a users can switch to opaque and remove the keyword correctly
|
|
|
|