summaryrefslogtreecommitdiff
path: root/Runtime/Shaders/MaterialIsTransparent.h
diff options
context:
space:
mode:
Diffstat (limited to 'Runtime/Shaders/MaterialIsTransparent.h')
-rw-r--r--Runtime/Shaders/MaterialIsTransparent.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/Runtime/Shaders/MaterialIsTransparent.h b/Runtime/Shaders/MaterialIsTransparent.h
new file mode 100644
index 0000000..072b054
--- /dev/null
+++ b/Runtime/Shaders/MaterialIsTransparent.h
@@ -0,0 +1,14 @@
+#include "Material.h"
+
+inline bool IsTransparentOrCutoutMaterial (Material& material)
+{
+ string tag = material.GetTag("RenderType", false, string());
+
+ if (material.GetActualRenderQueue() >= kAlphaTestRenderQueue)
+ return true;
+
+ if (tag == "TreeTransparentCutout" || tag == "GrassBillboard" || tag == "Grass" || tag == "TreeLeaf" || tag == "TranparentCutout" || tag == "Tranparent")
+ return true;
+
+ return false;
+}