From 5abae51a6ef5b0f1b817ef5ce4bff34fef5001cd Mon Sep 17 00:00:00 2001 From: Alexander Romanov Date: Tue, 26 Apr 2016 18:43:02 +1000 Subject: Support multiple tangents for BI render & viewport Normal Map node support for GLSL mode and the internal render (multiple tangents support). The Normal Map node is a useful node which is present in the Cycles render. It makes it possible to use normal mapping without additional material node in a node tree. This patch implements Normal Map node for GLSL mode and the internal render. Previously only the active UV layer was used to calculate tangents. --- source/blender/makesdna/DNA_material_types.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source/blender/makesdna/DNA_material_types.h') diff --git a/source/blender/makesdna/DNA_material_types.h b/source/blender/makesdna/DNA_material_types.h index 8790f736600..0c500e366a7 100644 --- a/source/blender/makesdna/DNA_material_types.h +++ b/source/blender/makesdna/DNA_material_types.h @@ -197,6 +197,10 @@ typedef struct Material { short tot_slots; short pad4[3]; + /* multiple tangent (Normal Map node) */ + char nmap_tangent_names[9][64]; /* [MAX_MTFACE+1][MAX_NAME]; +1 for empty name */ + int nmap_tangent_names_count, pad5; + struct TexPaintSlot *texpaintslot; /* cached slot for painting. Make sure to recalculate before use * with refresh_texpaint_image_cache */ ListBase gpumaterial; /* runtime */ @@ -305,6 +309,7 @@ typedef struct Material { /* mode2 (is int) */ #define MA_CASTSHADOW (1 << 0) #define MA_MODE2_PIPELINE (MA_CASTSHADOW) +#define MA_TANGENT_CONCRETE (1 << 1) /* mapflag */ #define MA_MAPFLAG_UVPROJECT (1 << 0) -- cgit v1.2.3