Add Transparent Lighting Modes for material with option to use non-directional shading

This commit is contained in:
Wojciech Figat
2022-07-14 09:21:09 +02:00
parent 047821f7d2
commit 85f351663b
14 changed files with 254 additions and 52 deletions

View File

@@ -18,6 +18,7 @@ namespace FlaxEngine
UsageFlags = MaterialUsageFlags.None,
FeaturesFlags = MaterialFeaturesFlags.None,
DecalBlendingMode = MaterialDecalBlendingMode.Translucent,
TransparentLightingMode = MaterialTransparentLightingMode.SurfaceNonDirectional,
PostFxLocation = MaterialPostFxLocation.AfterPostProcessingPass,
MaskThreshold = 0.3f,
OpacityThreshold = 0.12f,
@@ -61,6 +62,7 @@ namespace FlaxEngine
&& UsageFlags == other.UsageFlags
&& FeaturesFlags == other.FeaturesFlags
&& DecalBlendingMode == other.DecalBlendingMode
&& TransparentLightingMode == other.TransparentLightingMode
&& PostFxLocation == other.PostFxLocation
&& Mathf.NearEqual(MaskThreshold, other.MaskThreshold)
&& Mathf.NearEqual(OpacityThreshold, other.OpacityThreshold)
@@ -86,6 +88,7 @@ namespace FlaxEngine
hashCode = (hashCode * 397) ^ (int)FeaturesFlags;
hashCode = (hashCode * 397) ^ (int)PostFxLocation;
hashCode = (hashCode * 397) ^ (int)DecalBlendingMode;
hashCode = (hashCode * 397) ^ (int)TransparentLightingMode;
hashCode = (hashCode * 397) ^ (int)(MaskThreshold * 1000.0f);
hashCode = (hashCode * 397) ^ (int)(OpacityThreshold * 1000.0f);
hashCode = (hashCode * 397) ^ (int)TessellationMode;