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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2013-05-23 00:18:17 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2013-05-23 00:18:17 +0400
commitb068563ec892fe9fcf942e388610d89b874c8a6e (patch)
treeff23a131e9467096375051bf4d39555540232b0f /source/blender/gpu
parent81dadaf7bfa0e58ae6447695fca51d61da7b9e82 (diff)
Fix #35459: global texture coordinates not working with GLSL shaders. Got broken
in shader uniform binding optimizations in revision 55527.
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;