diff --git a/panda/src/dxgsg9/dxGraphicsStateGuardian9.cxx b/panda/src/dxgsg9/dxGraphicsStateGuardian9.cxx index 6f7a609f3b..18e6409381 100755 --- a/panda/src/dxgsg9/dxGraphicsStateGuardian9.cxx +++ b/panda/src/dxgsg9/dxGraphicsStateGuardian9.cxx @@ -3418,14 +3418,12 @@ set_state_and_transform(const RenderState *target, _state_mask.set_bit(stencil_slot); } - if (_current_shader_context == 0) { - int fog_slot = FogAttrib::get_class_slot(); - if (_target_rs->get_attrib(fog_slot) != _state_rs->get_attrib(fog_slot) || - !_state_mask.get_bit(fog_slot)) { - //PStatTimer timer(_draw_set_state_fog_pcollector); - do_issue_fog(); - _state_mask.set_bit(fog_slot); - } + int fog_slot = FogAttrib::get_class_slot(); + if (_target_rs->get_attrib(fog_slot) != _state_rs->get_attrib(fog_slot) || + !_state_mask.get_bit(fog_slot)) { + //PStatTimer timer(_draw_set_state_fog_pcollector); + do_issue_fog(); + _state_mask.set_bit(fog_slot); } int scissor_slot = ScissorAttrib::get_class_slot(); diff --git a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx index a2c0c9a521..7d71d2ec28 100644 --- a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx +++ b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx @@ -7009,19 +7009,13 @@ set_state_and_transform(const RenderState *target, _state_mask.set_bit(stencil_slot); } -#ifndef OPENGLES_1 - if (_current_shader_context == 0) { -#endif - int fog_slot = FogAttrib::get_class_slot(); - if (_target_rs->get_attrib(fog_slot) != _state_rs->get_attrib(fog_slot) || - !_state_mask.get_bit(fog_slot)) { - //PStatTimer timer(_draw_set_state_fog_pcollector); - do_issue_fog(); - _state_mask.set_bit(fog_slot); - } -#ifndef OPENGLES_1 + int fog_slot = FogAttrib::get_class_slot(); + if (_target_rs->get_attrib(fog_slot) != _state_rs->get_attrib(fog_slot) || + !_state_mask.get_bit(fog_slot)) { + //PStatTimer timer(_draw_set_state_fog_pcollector); + do_issue_fog(); + _state_mask.set_bit(fog_slot); } -#endif int scissor_slot = ScissorAttrib::get_class_slot(); if (_target_rs->get_attrib(scissor_slot) != _state_rs->get_attrib(scissor_slot) ||