diff options
author | chai <chaifix@163.com> | 2019-08-14 22:50:43 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2019-08-14 22:50:43 +0800 |
commit | 15740faf9fe9fe4be08965098bbf2947e096aeeb (patch) | |
tree | a730ec236656cc8cab5b13f088adfaed6bb218fb /Runtime/Shaders/MaterialIsTransparent.h |
Diffstat (limited to 'Runtime/Shaders/MaterialIsTransparent.h')
-rw-r--r-- | Runtime/Shaders/MaterialIsTransparent.h | 14 |
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; +} |