diff options
author | Alexander Romanov <a.romanov@blend4web.com> | 2016-04-26 11:43:02 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2016-04-26 13:43:29 +0300 |
commit | 5abae51a6ef5b0f1b817ef5ce4bff34fef5001cd (patch) | |
tree | ca6d8f3595fd596fe978e4ad69a29bbc647be121 /source/blender/makesdna/DNA_material_types.h | |
parent | 98babfa2b86f768ebc0cff6c0d8ec34e18afd2af (diff) |
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.
Diffstat (limited to 'source/blender/makesdna/DNA_material_types.h')
-rw-r--r-- | source/blender/makesdna/DNA_material_types.h | 5 |
1 files changed, 5 insertions, 0 deletions
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) |