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:
authorAntony Riakiotakis <kalast@gmail.com>2014-10-21 17:00:12 +0400
committerAntony Riakiotakis <kalast@gmail.com>2014-10-21 17:00:29 +0400
commit64dc1fd4082baaf7064505d8aff679ffabede8c3 (patch)
tree76f0b2ae6bfda598864654635551468f39faa4a4 /source/blender/gpu/intern/gpu_codegen.c
parentbae0f904eece736e27ab379d73d78ffd90de626e (diff)
Simplify GLSL in bump mapping, use gl_NormalMatrix where appropriate.
tangents are directions and should be transformed like directions.
Diffstat (limited to 'source/blender/gpu/intern/gpu_codegen.c')
-rw-r--r--source/blender/gpu/intern/gpu_codegen.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/gpu/intern/gpu_codegen.c b/source/blender/gpu/intern/gpu_codegen.c
index 322d37055db..4182f51561b 100644
--- a/source/blender/gpu/intern/gpu_codegen.c
+++ b/source/blender/gpu/intern/gpu_codegen.c
@@ -665,7 +665,7 @@ static char *code_generate_vertex(ListBase *nodes)
for (input=node->inputs.first; input; input=input->next)
if (input->source == GPU_SOURCE_ATTRIB && input->attribfirst) {
if (input->attribtype == CD_TANGENT) { /* silly exception */
- BLI_dynstr_appendf(ds, "\tvar%d.xyz = normalize((gl_ModelViewMatrix * vec4(att%d.xyz, 0)).xyz);\n", input->attribid, input->attribid);
+ BLI_dynstr_appendf(ds, "\tvar%d.xyz = normalize(gl_NormalMatrix * att%d.xyz);\n", input->attribid, input->attribid);
BLI_dynstr_appendf(ds, "\tvar%d.w = att%d.w;\n", input->attribid, input->attribid);
}
else