mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-18 02:12:00 +00:00
- fixed positioning for sky textures that are less than 128 pixels tall.
This commit is contained in:
parent
97947f9e10
commit
fad3a54100
1 changed files with 8 additions and 1 deletions
|
@ -278,7 +278,14 @@ void RenderDome(FMaterial * tex, float x_offset, float y_offset, bool mirror, in
|
||||||
|
|
||||||
float xscale = 1024.f / float(texw);
|
float xscale = 1024.f / float(texw);
|
||||||
float yscale = 1.f;
|
float yscale = 1.f;
|
||||||
if (texh < 200)
|
if (texh < 128)
|
||||||
|
{
|
||||||
|
// smaller sky textures must be tiled. We restrict it to 128 sky pixels, though
|
||||||
|
gl_RenderState.mModelMatrix.translate(0.f, -1250.f, 0.f);
|
||||||
|
gl_RenderState.mModelMatrix.scale(1.f, 128/230.f, 1.f);
|
||||||
|
yscale = 128 / texh; // intentionally left as integer.
|
||||||
|
}
|
||||||
|
else if (texh < 200)
|
||||||
{
|
{
|
||||||
gl_RenderState.mModelMatrix.translate(0.f, -1250.f, 0.f);
|
gl_RenderState.mModelMatrix.translate(0.f, -1250.f, 0.f);
|
||||||
gl_RenderState.mModelMatrix.scale(1.f, texh/230.f, 1.f);
|
gl_RenderState.mModelMatrix.scale(1.f, texh/230.f, 1.f);
|
||||||
|
|
Loading…
Reference in a new issue