Browse Source

turn off depth write for transparent parts of M_dual

David Rose 22 years ago
parent
commit
8fd4a2fac2
1 changed files with 2 additions and 0 deletions
  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.
     // ones that may have been decaled onto.
     state = RenderState::make(AlphaTestAttrib::make(AlphaTestAttrib::M_greater, 0.0f),
     state = RenderState::make(AlphaTestAttrib::make(AlphaTestAttrib::M_greater, 0.0f),
                               TransparencyAttrib::make(TransparencyAttrib::M_alpha),
                               TransparencyAttrib::make(TransparencyAttrib::M_alpha),
+                              DepthWriteAttrib::make(DepthWriteAttrib::M_off),
                               RenderState::get_max_priority());
                               RenderState::get_max_priority());
   }
   }
 
 
@@ -300,6 +301,7 @@ get_dual_transparent_state_decals() {
     // the decals where the pixels are 1.0.
     // the decals where the pixels are 1.0.
     state = RenderState::make(AlphaTestAttrib::make(AlphaTestAttrib::M_less, dual_opaque_level),
     state = RenderState::make(AlphaTestAttrib::make(AlphaTestAttrib::M_less, dual_opaque_level),
                               TransparencyAttrib::make(TransparencyAttrib::M_alpha),
                               TransparencyAttrib::make(TransparencyAttrib::M_alpha),
+                              DepthWriteAttrib::make(DepthWriteAttrib::M_off),
                               RenderState::get_max_priority());
                               RenderState::get_max_priority());
   }
   }