From 63317e423282c1d8a7965743b20a9059a8086e67 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Sun, 11 Dec 2016 01:01:31 +0200 Subject: [PATCH] Also re-apply standard shader data when the shader program changes --- source/renderer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/renderer.cpp b/source/renderer.cpp index c744ac5a..c3a6923f 100644 --- a/source/renderer.cpp +++ b/source/renderer.cpp @@ -330,13 +330,13 @@ void Renderer::apply_state() changed = (changed&~MODERN_MATRIX)|STANDARD_SHDATA; } - if(state->material && (changed&MATERIAL_SHDATA)) + if(state->material && ((changed&MATERIAL_SHDATA) || shprog_changed)) { state->material->get_shader_data().apply(); changed &= ~MATERIAL_SHDATA; } - if(changed&STANDARD_SHDATA) + if((changed&STANDARD_SHDATA) || shprog_changed) { standard_shdata.apply(); changed &= ~STANDARD_SHDATA; -- 2.45.2