- for some reason using world coordinates for clipping in the shader is somewhat imprecise so the clip plane heights have to be adjusted a bit for it.

This commit is contained in:
Christoph Oelckers 2014-07-13 13:25:42 +02:00
commit 00fcf4bc06
8 changed files with 52 additions and 27 deletions

View file

@ -83,7 +83,8 @@ void FRenderState::Reset()
mColormapState = CM_DEFAULT;
mLightParms[3] = -1.f;
mSpecialEffect = EFF_NONE;
mClipHeight = 0.f;
mClipHeightTop = 65536.f;
mClipHeightBottom = -65536.f;
}
@ -145,7 +146,8 @@ bool FRenderState::ApplyShader()
activeShader->muObjectColor.Set(mObjectColor);
activeShader->muDynLightColor.Set(mDynColor.vec);
activeShader->muInterpolationFactor.Set(mInterpolationFactor);
activeShader->muClipHeight.Set(mClipHeight);
activeShader->muClipHeightTop.Set(mClipHeightTop);
activeShader->muClipHeightBottom.Set(mClipHeightBottom);
if (mGlowEnabled)
{