You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

18 lines
984 B

using static UnityEngine.Rendering.HighDefinition.HDShaderIDs;
namespace UnityEngine.Rendering.HighDefinition
{
internal static class WaterDecalAPI
{
internal static bool AffectsOutput(Material material, int property) => material.HasProperty(property) && material.GetFloat(property) == 1.0f;
internal static void SetupWaterDecalKeywordsAndProperties(Material material)
{
CoreUtils.SetKeyword(material, "_AFFECTS_DEFORMATION", AffectsOutput(material, _AffectDeformation));
CoreUtils.SetKeyword(material, "_AFFECTS_FOAM", AffectsOutput(material, _AffectsFoam));
CoreUtils.SetKeyword(material, "_AFFECTS_MASK", AffectsOutput(material, _AffectsSimulationMask));
CoreUtils.SetKeyword(material, "_AFFECTS_LARGE_CURRENT", AffectsOutput(material, _AffectsLargeCurrent));
CoreUtils.SetKeyword(material, "_AFFECTS_RIPPLES_CURRENT", AffectsOutput(material, _AffectsRipplesCurrent));
}
}
}