Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/gpu')
-rw-r--r--source/blender/gpu/intern/gpu_material.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/gpu/intern/gpu_material.c b/source/blender/gpu/intern/gpu_material.c
index b0248700824..a793286bceb 100644
--- a/source/blender/gpu/intern/gpu_material.c
+++ b/source/blender/gpu/intern/gpu_material.c
@@ -300,6 +300,9 @@ void GPU_material_bind(GPUMaterial *material, int oblay, int viewlay, double tim
}
}
+ /* note material must be bound before setting uniforms */
+ GPU_pass_bind(material->pass, time, mipmap);
+
/* handle per material built-ins */
if (material->builtins & GPU_VIEW_MATRIX) {
GPU_shader_uniform_vector(shader, material->viewmatloc, 16, 1, (float*)viewmat);
@@ -308,7 +311,6 @@ void GPU_material_bind(GPUMaterial *material, int oblay, int viewlay, double tim
GPU_shader_uniform_vector(shader, material->invviewmatloc, 16, 1, (float*)viewinv);
}
- GPU_pass_bind(material->pass, time, mipmap);
GPU_pass_update_uniforms(material->pass);
material->bound = 1;