Parcourir la source

Re-issue color and colorscale when changed (eliminate flickering in shadergen)

rdb il y a 16 ans
Parent
commit
30b37547b8
1 fichiers modifiés avec 4 ajouts et 0 suppressions
  1. 4 0
      panda/src/dxgsg9/dxGraphicsStateGuardian9.cxx

+ 4 - 0
panda/src/dxgsg9/dxGraphicsStateGuardian9.cxx

@@ -3277,6 +3277,10 @@ set_state_and_transform(const RenderState *target,
     do_issue_color_scale();
     _state_mask.set_bit(color_slot);
     _state_mask.set_bit(color_scale_slot);
+    if (_current_shader_context) {
+      _current_shader_context->issue_parameters(this, Shader::SSD_color);
+      _current_shader_context->issue_parameters(this, Shader::SSD_colorscale);
+    }
   }
 
   int cull_face_slot = CullFaceAttrib::get_class_slot();