fix: softpoly TEXTURES sprites with scale of 2 are tiled

This commit is contained in:
Magnus Norddahl 2018-07-30 22:09:40 +02:00
parent 5b8a016cad
commit 00ada6cf56

View file

@ -147,8 +147,8 @@ void RenderPolySprite::Render(PolyRenderThread *thread, AActor *thing, subsector
vertices[i].y = (float)p.Y; vertices[i].y = (float)p.Y;
vertices[i].z = (float)(posZ + spriteHeight * offsets[i].second); vertices[i].z = (float)(posZ + spriteHeight * offsets[i].second);
vertices[i].w = 1.0f; vertices[i].w = 1.0f;
vertices[i].u = (float)(offsets[i].first * tex->Scale.X); vertices[i].u = (float)offsets[i].first;
vertices[i].v = (float)((1.0f - offsets[i].second) * tex->Scale.Y); vertices[i].v = (float)(1.0f - offsets[i].second);
if (flipTextureX) if (flipTextureX)
vertices[i].u = 1.0f - vertices[i].u; vertices[i].u = 1.0f - vertices[i].u;
} }