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-03-14 01:13:58 +0300
committerClément Foucault <foucault.clem@gmail.com>2019-03-14 01:15:11 +0300
commit7fb7d20c19e2a022cfc776b5fd98f4850ba83ebc (patch)
tree70c0eccf441966322a15fba783d3a9197cc498cb /source/blender/gpu/intern
parentd0fb0d0a9d0d698a499d7e38943696a43a7e456e (diff)
Eevee: Fix black mesh when tangent is not present
In this case, the generic vertex attribute is {0,0,0,1}. So we look for this case. This fixes black text objects with a normal map applied. Also this could help porting sculpt mode drawing to Eevee without supporting normal mapping. Note that will just fix black meshes due to T61870 but objects will not show their normal map. So it's not a fix for this issue.
Diffstat (limited to 'source/blender/gpu/intern')
-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 f3386ec3a65..513dfad9d8a 100644
--- a/source/blender/gpu/intern/gpu_codegen.c
+++ b/source/blender/gpu/intern/gpu_codegen.c
@@ -1001,7 +1001,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 = normalize(NormalMatrix * att%d.xyz);\n",
+ ds, "\tvar%d%s.xyz = NormalMatrix * att%d.xyz;\n",
input->attr_id, use_geom ? "g" : "", input->attr_id);
BLI_dynstr_appendf(
ds, "\tvar%d%s.w = att%d.w;\n",