Browse Source

Added support for negative glow-maps

Josh Yelon 17 years ago
parent
commit
1d2990a2b5
1 changed files with 4 additions and 2 deletions
  1. 4 2
      panda/src/pgraph/shaderGenerator.cxx

+ 4 - 2
panda/src/pgraph/shaderGenerator.cxx

@@ -144,6 +144,8 @@ void ShaderGenerator::
 analyze_renderstate(const RenderState *rs) {
 analyze_renderstate(const RenderState *rs) {
   clear_analysis();
   clear_analysis();
 
 
+  //  verify_enforce_attrib_lock();
+
   rs->store_into_slots(&_attribs);
   rs->store_into_slots(&_attribs);
 
 
   // Check if there's an alpha test, color blend, or transparency.
   // Check if there's an alpha test, color blend, or transparency.
@@ -850,14 +852,14 @@ synthesize_shader(const RenderState *rs) {
     if (_map_index_glow >= 0) {
     if (_map_index_glow >= 0) {
       text << "\t result.a = tex" << _map_index_glow << ".a;\n";
       text << "\t result.a = tex" << _map_index_glow << ".a;\n";
     } else {
     } else {
-      text << "\t result.a = 0;\n";
+      text << "\t result.a = 0.5;\n";
     }
     }
   }
   }
   if (_out_aux_glow) {
   if (_out_aux_glow) {
     if (_map_index_glow >= 0) {
     if (_map_index_glow >= 0) {
       text << "\t o_aux.a = tex" << _map_index_glow << ".a;\n";
       text << "\t o_aux.a = tex" << _map_index_glow << ".a;\n";
     } else {
     } else {
-      text << "\t o_aux.a = 0;\n";
+      text << "\t o_aux.a = 0.5;\n";
     }
     }
   }
   }