浏览代码

turn off depth write for transparent parts of M_dual

David Rose 22 年之前
父节点
当前提交
8fd4a2fac2
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      panda/src/pgraph/cullResult.cxx

+ 2 - 0
panda/src/pgraph/cullResult.cxx

@@ -263,6 +263,7 @@ get_dual_transparent_state() {
     // ones that may have been decaled onto.
     state = RenderState::make(AlphaTestAttrib::make(AlphaTestAttrib::M_greater, 0.0f),
                               TransparencyAttrib::make(TransparencyAttrib::M_alpha),
+                              DepthWriteAttrib::make(DepthWriteAttrib::M_off),
                               RenderState::get_max_priority());
   }
 
@@ -300,6 +301,7 @@ get_dual_transparent_state_decals() {
     // the decals where the pixels are 1.0.
     state = RenderState::make(AlphaTestAttrib::make(AlphaTestAttrib::M_less, dual_opaque_level),
                               TransparencyAttrib::make(TransparencyAttrib::M_alpha),
+                              DepthWriteAttrib::make(DepthWriteAttrib::M_off),
                               RenderState::get_max_priority());
   }