diff options
Diffstat (limited to 'src/renderergl2/tr_local.h')
-rw-r--r-- | src/renderergl2/tr_local.h | 54 |
1 files changed, 22 insertions, 32 deletions
diff --git a/src/renderergl2/tr_local.h b/src/renderergl2/tr_local.h index b56fdf0d..557b285e 100644 --- a/src/renderergl2/tr_local.h +++ b/src/renderergl2/tr_local.h @@ -117,7 +117,6 @@ typedef struct VBO_s uint32_t ofs_lightdir; #ifdef USE_VERT_TANGENT_SPACE uint32_t ofs_tangent; - uint32_t ofs_bitangent; #endif uint32_t stride_xyz; uint32_t stride_normal; @@ -127,7 +126,6 @@ typedef struct VBO_s uint32_t stride_lightdir; #ifdef USE_VERT_TANGENT_SPACE uint32_t stride_tangent; - uint32_t stride_bitangent; #endif uint32_t size_xyz; uint32_t size_normal; @@ -516,19 +514,17 @@ enum ATTR_INDEX_TEXCOORD0 = 1, ATTR_INDEX_TEXCOORD1 = 2, ATTR_INDEX_TANGENT = 3, - ATTR_INDEX_BITANGENT = 4, - ATTR_INDEX_NORMAL = 5, - ATTR_INDEX_COLOR = 6, - ATTR_INDEX_PAINTCOLOR = 7, - ATTR_INDEX_LIGHTDIRECTION = 8, - ATTR_INDEX_BONE_INDEXES = 9, - ATTR_INDEX_BONE_WEIGHTS = 10, + ATTR_INDEX_NORMAL = 4, + ATTR_INDEX_COLOR = 5, + ATTR_INDEX_PAINTCOLOR = 6, + ATTR_INDEX_LIGHTDIRECTION = 7, + ATTR_INDEX_BONE_INDEXES = 8, + ATTR_INDEX_BONE_WEIGHTS = 9, // GPU vertex animations - ATTR_INDEX_POSITION2 = 11, - ATTR_INDEX_TANGENT2 = 12, - ATTR_INDEX_BITANGENT2 = 13, - ATTR_INDEX_NORMAL2 = 14 + ATTR_INDEX_POSITION2 = 10, + ATTR_INDEX_TANGENT2 = 11, + ATTR_INDEX_NORMAL2 = 12 }; enum @@ -614,26 +610,23 @@ enum ATTR_TEXCOORD = 0x0002, ATTR_LIGHTCOORD = 0x0004, ATTR_TANGENT = 0x0008, - ATTR_BITANGENT = 0x0010, - ATTR_NORMAL = 0x0020, - ATTR_COLOR = 0x0040, - ATTR_PAINTCOLOR = 0x0080, - ATTR_LIGHTDIRECTION = 0x0100, - ATTR_BONE_INDEXES = 0x0200, - ATTR_BONE_WEIGHTS = 0x0400, + ATTR_NORMAL = 0x0010, + ATTR_COLOR = 0x0020, + ATTR_PAINTCOLOR = 0x0040, + ATTR_LIGHTDIRECTION = 0x0080, + ATTR_BONE_INDEXES = 0x0100, + ATTR_BONE_WEIGHTS = 0x0200, // for .md3 interpolation - ATTR_POSITION2 = 0x0800, - ATTR_TANGENT2 = 0x1000, - ATTR_BITANGENT2 = 0x2000, - ATTR_NORMAL2 = 0x4000, + ATTR_POSITION2 = 0x0400, + ATTR_TANGENT2 = 0x0800, + ATTR_NORMAL2 = 0x1000, ATTR_DEFAULT = ATTR_POSITION, ATTR_BITS = ATTR_POSITION | ATTR_TEXCOORD | ATTR_LIGHTCOORD | ATTR_TANGENT | - ATTR_BITANGENT | ATTR_NORMAL | ATTR_COLOR | ATTR_PAINTCOLOR | @@ -642,7 +635,6 @@ enum ATTR_BONE_WEIGHTS | ATTR_POSITION2 | ATTR_TANGENT2 | - ATTR_BITANGENT2 | ATTR_NORMAL2 }; @@ -987,8 +979,7 @@ typedef struct vec2_t lightmap; vec3_t normal; #ifdef USE_VERT_TANGENT_SPACE - vec3_t tangent; - vec3_t bitangent; + vec4_t tangent; #endif vec3_t lightdir; vec4_t vertexColors; @@ -999,7 +990,7 @@ typedef struct } srfVert_t; #ifdef USE_VERT_TANGENT_SPACE -#define srfVert_t_cleared(x) srfVert_t (x) = {{0, 0, 0}, {0, 0}, {0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0, 0}} +#define srfVert_t_cleared(x) srfVert_t (x) = {{0, 0, 0}, {0, 0}, {0, 0}, {0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0}, {0, 0, 0, 0}} #else #define srfVert_t_cleared(x) srfVert_t (x) = {{0, 0, 0}, {0, 0}, {0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0, 0}} #endif @@ -2097,10 +2088,9 @@ typedef struct shaderCommands_s { glIndex_t indexes[SHADER_MAX_INDEXES] QALIGN(16); vec4_t xyz[SHADER_MAX_VERTEXES] QALIGN(16); - vec4_t normal[SHADER_MAX_VERTEXES] QALIGN(16); + uint8_t normal[SHADER_MAX_VERTEXES][4] QALIGN(16); #ifdef USE_VERT_TANGENT_SPACE - vec4_t tangent[SHADER_MAX_VERTEXES] QALIGN(16); - vec4_t bitangent[SHADER_MAX_VERTEXES] QALIGN(16); + uint8_t tangent[SHADER_MAX_VERTEXES][4] QALIGN(16); #endif vec2_t texCoords[SHADER_MAX_VERTEXES][2] QALIGN(16); vec4_t vertexColors[SHADER_MAX_VERTEXES] QALIGN(16); |