|
|
|
|
|
|
SetKeyword(material, "_REFRACTION_THINPLANE", refractionModeValue == Lit.RefractionMode.ThinPlane); |
|
|
|
SetKeyword(material, "_REFRACTION_THICKPLANE", refractionModeValue == Lit.RefractionMode.ThickPlane); |
|
|
|
SetKeyword(material, "_REFRACTION_THICKSPHERE", refractionModeValue == Lit.RefractionMode.ThickSphere); |
|
|
|
|
|
|
|
var hasRefraction = (!material.HasProperty(kPreRefractionPass) |
|
|
|
|| material.GetFloat(kPreRefractionPass) <= 0.0) |
|
|
|
&& refractionModeValue != Lit.RefractionMode.None; |
|
|
|
SetKeyword(material, "_REFRACTION_ON", hasRefraction); // Refraction is not available for pre refraction (color buffer cannot be fetched)
|
|
|
|
} |
|
|
|
} |
|
|
|
} // namespace UnityEditor
|