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>2011-06-20 13:08:41 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2011-06-20 13:08:41 +0400
commitc27fa83cf7893a824a2a72fae195989283aeebdb (patch)
tree5489e7322c42e4f482872e717e70d933d8156415
parent57ed59eac217ec79da7c886fd7074449fe168d68 (diff)
Fix #27703: reflection texture coordinates + nodes not working right in GLSL.
-rw-r--r--source/blender/gpu/intern/gpu_material.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/gpu/intern/gpu_material.c b/source/blender/gpu/intern/gpu_material.c
index e936f35574d..3804aad6848 100644
--- a/source/blender/gpu/intern/gpu_material.c
+++ b/source/blender/gpu/intern/gpu_material.c
@@ -942,8 +942,10 @@ static void do_material_tex(GPUShadeInput *shi)
texco= texco_object;
else if(mtex->texco==TEXCO_GLOB)
texco= texco_global;
- else if(mtex->texco==TEXCO_REFL)
+ else if(mtex->texco==TEXCO_REFL) {
+ GPU_link(mat, "texco_refl", shi->vn, shi->view, &shi->ref);
texco= shi->ref;
+ }
else if(mtex->texco==TEXCO_UV) {
if(1) { //!(texco_uv && strcmp(mtex->uvname, lastuvname) == 0)) {
GPU_link(mat, "texco_uv", GPU_attribute(CD_MTFACE, mtex->uvname), &texco_uv);
@@ -1173,7 +1175,6 @@ static void do_material_tex(GPUShadeInput *shi)
}
GPU_link(mat, "vec_math_negate", shi->vn, &orn);
- GPU_link(mat, "texco_refl", shi->vn, shi->view, &shi->ref);
}
if((mtex->mapto & MAP_VARS)) {