mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-15 08:51:24 +00:00
- use correct math to access a texel's center for rendering voxels.
No idea if this was causing problem, but it surely wasn't 100% correct.
This commit is contained in:
parent
8d9d3d5f8f
commit
46d2c52b19
1 changed files with 2 additions and 2 deletions
|
@ -210,8 +210,8 @@ void FVoxelModel::AddFace(int x1, int y1, int z1, int x2, int y2, int z2, int x3
|
|||
unsigned int indx[4];
|
||||
|
||||
vert.packedNormal = 0; // currently this is not being used for voxels.
|
||||
vert.u = (((col & 15) * 255 / 16) + 7) / 255.f;
|
||||
vert.v = (((col / 16) * 255 / 16) + 7) / 255.f;
|
||||
vert.u = (((col & 15) + 0.5f) / 16.f);
|
||||
vert.v = (((col / 16) + 0.5f) / 16.f);
|
||||
|
||||
vert.x = x1 - PivotX;
|
||||
vert.z = -y1 + PivotY;
|
||||
|
|
Loading…
Reference in a new issue