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:
authorClément Foucault <foucault.clem@gmail.com>2019-05-09 00:21:09 +0300
committerClément Foucault <foucault.clem@gmail.com>2019-05-09 00:28:06 +0300
commit7ec7888ff384adccfaca2777c021b40dd726fa8d (patch)
treeee99e9ce2bd72ebb33ce966d6c4e762c25c473f5 /source/blender/gpu/intern/gpu_codegen.c
parentc9537ee5c3f58105f553a32f337f7c5d1be8b1a4 (diff)
Eevee: Fix Tangent vectors using NormalMatrix and make them world space
Making them world space by default remove a lot of legacy conversion from viewspace.
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 310c57fdbee..2c42cc654e2 100644
--- a/source/blender/gpu/intern/gpu_codegen.c
+++ b/source/blender/gpu/intern/gpu_codegen.c
@@ -1118,7 +1118,7 @@ static char *code_generate_vertex(ListBase *nodes, const char *vert_code, bool u
if (input->source == GPU_SOURCE_ATTR && input->attr_first) {
if (input->attr_type == CD_TANGENT) { /* silly exception */
BLI_dynstr_appendf(ds,
- "\tvar%d%s.xyz = NormalMatrix * att%d.xyz;\n",
+ "\tvar%d%s.xyz = transpose(mat3(ModelMatrixInverse)) * att%d.xyz;\n",
input->attr_id,
use_geom ? "g" : "",
input->attr_id);