Skip to content

Commit fb7fcde

Browse files
MD3: Bake scale into model transform
1 parent e8b74f9 commit fb7fcde

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Quake/gl_model.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4920,7 +4920,7 @@ static void Mod_LoadMD3Model (qmodel_t* mod, const char* buffer)
49204920
hdr->numtris = numTris;
49214921
hdr->numposes = in_header->numFrames;
49224922
VectorSet (hdr->scale_origin, 0, 0, 0);
4923-
VectorSet (hdr->scale, 1, 1, 1);
4923+
VectorSet (hdr->scale, MD3_XYZ_SCALE, MD3_XYZ_SCALE, MD3_XYZ_SCALE);
49244924
hdr->meshdesc = (byte*)out_meshdesc - (byte*)hdr;
49254925
hdr->indexes = (byte*)poutindexes - (byte*)hdr;
49264926
if (surf_i < in_header->numSurfaces - 1) {

Quake/gl_shaders.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1110,7 +1110,7 @@ ALIAS_INSTANCE_BUFFER
11101110
" int index = int(safePose) * u_numVerts + gl_VertexID;\n"
11111111
" uvec2 data = PackedPosNor[index];\n"
11121112
" PoseVertex ret;\n"
1113-
" ret.pos = vec3((ivec3(data.xxy >> uvec3(0, 16, 0)) & 65535) - 32768) * (1.0 / 64.0);\n"
1113+
" ret.pos = vec3((ivec3(data.xxy >> uvec3(0, 16, 0)) & 65535) - 32768);\n"
11141114
" vec2 spherical = vec2((data.yy >> uvec2(16, 24)) & 255) * (2.0 * 3.14159265 / 255.0);\n"
11151115
" float sinlat = sin(spherical.x);\n"
11161116
" float coslat = cos(spherical.x);\n"

0 commit comments

Comments
 (0)