mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-28 18:00:40 +00:00
- fixed uninitialized scale variable in sky code.
This commit is contained in:
parent
5030ca50ff
commit
41072eb020
2 changed files with 4 additions and 2 deletions
|
@ -273,7 +273,7 @@ public:
|
||||||
mSpecialEffect = EFF_NONE;
|
mSpecialEffect = EFF_NONE;
|
||||||
mLightIndex = -1;
|
mLightIndex = -1;
|
||||||
mStreamData.uInterpolationFactor = 0;
|
mStreamData.uInterpolationFactor = 0;
|
||||||
mRenderStyle = LegacyRenderStyles[STYLE_Translucent];
|
mRenderStyle = DefaultRenderStyle();
|
||||||
mMaterial.Reset();
|
mMaterial.Reset();
|
||||||
mBias.Reset();
|
mBias.Reset();
|
||||||
mPassType = NORMAL_PASS;
|
mPassType = NORMAL_PASS;
|
||||||
|
|
|
@ -202,7 +202,7 @@ void FSkyVertexBuffer::SkyVertexBuild(int r, int c, bool zflip)
|
||||||
|
|
||||||
// And the texture coordinates.
|
// And the texture coordinates.
|
||||||
if (zflip) r = mRows * 2 - r;
|
if (zflip) r = mRows * 2 - r;
|
||||||
vert.u = 0.5 + (-c / (float)mColumns);
|
vert.u = 0.5f + (-c / (float)mColumns);
|
||||||
vert.v = (r / (float)(2*mRows));
|
vert.v = (r / (float)(2*mRows));
|
||||||
|
|
||||||
// And finally the vertex.
|
// And finally the vertex.
|
||||||
|
@ -413,11 +413,13 @@ void FSkyVertexBuffer::SetupMatrices(FGameTexture *tex, float x_offset, float y_
|
||||||
{
|
{
|
||||||
modelMatrix.translate(0.f, -1250.f, 0.f);
|
modelMatrix.translate(0.f, -1250.f, 0.f);
|
||||||
modelMatrix.scale(1.f, texh / 230.f, 1.f);
|
modelMatrix.scale(1.f, texh / 230.f, 1.f);
|
||||||
|
yscale = 1.f;
|
||||||
}
|
}
|
||||||
else if (texh <= 240)
|
else if (texh <= 240)
|
||||||
{
|
{
|
||||||
modelMatrix.translate(0.f, (200 - texh + texskyoffset) * skyoffsetfactor, 0.f);
|
modelMatrix.translate(0.f, (200 - texh + texskyoffset) * skyoffsetfactor, 0.f);
|
||||||
modelMatrix.scale(1.f, 1.f + ((texh - 200.f) / 200.f) * 1.17f, 1.f);
|
modelMatrix.scale(1.f, 1.f + ((texh - 200.f) / 200.f) * 1.17f, 1.f);
|
||||||
|
yscale = 1.f;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue