diff options
Diffstat (limited to 'source/blender/gpu/intern/gpu_material.c')
-rw-r--r-- | source/blender/gpu/intern/gpu_material.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/gpu/intern/gpu_material.c b/source/blender/gpu/intern/gpu_material.c index 4b991a36626..250ea51f8c8 100644 --- a/source/blender/gpu/intern/gpu_material.c +++ b/source/blender/gpu/intern/gpu_material.c @@ -321,9 +321,9 @@ void GPU_material_bind_uniforms(GPUMaterial *material, float obmat[][4], float v } if(material->dynproperty & DYN_LAMP_IMAT) - mul_m4_m4m4(lamp->dynimat, viewinv, lamp->imat); + mult_m4_m4m4(lamp->dynimat, lamp->imat, viewinv); if(material->dynproperty & DYN_LAMP_PERSMAT) - mul_m4_m4m4(lamp->dynpersmat, viewinv, lamp->persmat); + mult_m4_m4m4(lamp->dynpersmat, lamp->persmat, viewinv); } GPU_pass_update_uniforms(material->pass); @@ -1671,7 +1671,7 @@ void GPU_lamp_shadow_buffer_bind(GPULamp *lamp, float viewmat[][4], int *winsize normalize_v3(lamp->viewmat[2]); /* makeshadowbuf */ - mul_m4_m4m4(persmat, lamp->viewmat, lamp->winmat); + mult_m4_m4m4(persmat, lamp->winmat, lamp->viewmat); /* opengl depth buffer is range 0.0..1.0 instead of -1.0..1.0 in blender */ unit_m4(rangemat); @@ -1682,7 +1682,7 @@ void GPU_lamp_shadow_buffer_bind(GPULamp *lamp, float viewmat[][4], int *winsize rangemat[3][1] = 0.5f; rangemat[3][2] = 0.5f; - mul_m4_m4m4(lamp->persmat, persmat, rangemat); + mult_m4_m4m4(lamp->persmat, rangemat, persmat); /* opengl */ glDisable(GL_SCISSOR_TEST); |