- scale the vertex coordinates that get output to the hardware by 1024.

This is needed to get a coordinate system that is compatible with GZDoom's so that its lighting code can be reused more easily.
This commit is contained in:
Christoph Oelckers 2020-06-01 09:55:28 +02:00
parent 68c97e3c25
commit 350acd2ac3
6 changed files with 15 additions and 12 deletions

View file

@ -1122,7 +1122,9 @@ int32_t polymost_voxdraw(voxmodel_t *m, tspriteptr_t const tspr)
//Let OpenGL (and perhaps hardware :) handle the matrix rotation
mat[3] = mat[7] = mat[11] = 0.f; mat[15] = 1.f;
int matrixindex = GLInterface.SetMatrix(Matrix_Model, mat);
for (int i = 0; i < 15; i++) mat[i] *= 1024.f;
int matrixindex = GLInterface.SetMatrix(Matrix_Model, mat);
const float ru = 1.f/((float)m->mytexx);
const float rv = 1.f/((float)m->mytexy);