mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-16 09:31:14 +00:00
- fixed math imprecisions in horizon vertex generation.
Floats are not precise enough to be used as a loop counter.
This commit is contained in:
parent
f557fa4296
commit
7848bab7b3
1 changed files with 4 additions and 2 deletions
|
@ -1101,10 +1101,12 @@ GLHorizonPortal::GLHorizonPortal(GLHorizonInfo * pt, bool local)
|
|||
// Draw to some far away boundary
|
||||
// This is not drawn as larger strips because it causes visual glitches.
|
||||
FFlatVertex *ptr = GLRenderer->mVBO->GetBuffer();
|
||||
for (float x = -32768 + vx; x<32768 + vx; x += 4096)
|
||||
for (int xx = -32768; xx < 32768; xx += 4096)
|
||||
{
|
||||
for (float y = -32768 + vy; y<32768 + vy; y += 4096)
|
||||
float x = xx + vx;
|
||||
for (int yy = -32768; yy < 32768; yy += 4096)
|
||||
{
|
||||
float y = yy + vy;
|
||||
ptr->Set(x, z, y, x / 64, -y / 64);
|
||||
ptr++;
|
||||
ptr->Set(x + 4096, z, y, x / 64 + 64, -y / 64);
|
||||
|
|
Loading…
Reference in a new issue