Skip to content

Commit

Permalink
fix: workaround for _ST issues / bugs in SG 2021.2+
Browse files Browse the repository at this point in the history
  • Loading branch information
hybridherbst committed Sep 12, 2022
1 parent a3d2789 commit 6b39fcc
Show file tree
Hide file tree
Showing 3 changed files with 759 additions and 124 deletions.
Expand Up @@ -308,6 +308,12 @@ private void DrawProperties(Material targetMaterial, MaterialProperty[] properti
{
propertyList.RemoveAll(x => x.name.EndsWith("_ST", StringComparison.Ordinal) || x.name.EndsWith("Rotation", StringComparison.Ordinal));
}
// want to remove the _ST properties since they are drawn inline already on 2021.2+
#if UNITY_2021_2_OR_NEWER
{
propertyList.RemoveAll(x => x.name.EndsWith("_ST", StringComparison.Ordinal));
}
#endif
if (!targetMaterial.IsKeywordEnabled("_VOLUME_TRANSMISSION_ON"))
{
propertyList.RemoveAll(x => x.name.StartsWith("thickness", StringComparison.Ordinal) || x.name.StartsWith("attenuation", StringComparison.Ordinal) || x.name.StartsWith("transmission", StringComparison.Ordinal));
Expand Down

0 comments on commit 6b39fcc

Please sign in to comment.