Add support for the poor souls on a 386 that can't afford to use full screen
This commit is contained in:
parent
827360e5e2
commit
b2040a0892
4 changed files with 8 additions and 1 deletions
|
|
@ -20,6 +20,9 @@ struct HWViewpointUniforms
|
|||
VSMatrix mNormalViewMatrix;
|
||||
FVector4 mCameraPos;
|
||||
FVector4 mClipLine;
|
||||
|
||||
int mViewOffsetX = 0;
|
||||
int mViewOffsetY = 0;
|
||||
|
||||
float mGlobVis = 1.f;
|
||||
int mPalLightLevels = 0;
|
||||
|
|
|
|||
|
|
@ -111,6 +111,8 @@ void HWDrawInfo::StartScene(FRenderViewpoint &parentvp, HWViewpointUniforms *uni
|
|||
VPUniforms.mProjectionMatrix.loadIdentity();
|
||||
VPUniforms.mViewMatrix.loadIdentity();
|
||||
VPUniforms.mNormalViewMatrix.loadIdentity();
|
||||
VPUniforms.mViewOffsetX = -screen->mSceneViewport.left;
|
||||
VPUniforms.mViewOffsetY = -screen->mSceneViewport.top;
|
||||
VPUniforms.mViewHeight = viewheight;
|
||||
if (lightmode == ELightMode::Build)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -9,6 +9,8 @@ layout(set = 1, binding = 0, std140) uniform ViewpointUBO
|
|||
vec4 uCameraPos;
|
||||
vec4 uClipLine;
|
||||
|
||||
ivec2 uViewOffset;
|
||||
|
||||
float uGlobVis; // uGlobVis = R_GetGlobVis(r_visibility) / 32.0
|
||||
int uPalLightLevels;
|
||||
int uViewHeight; // Software fuzz scaling
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ void main()
|
|||
#endif
|
||||
|
||||
#ifdef USE_DEPTHFADEFALLOFF
|
||||
float behindFragmentDepth = texelFetch(LinearDepth, ivec2(gl_FragCoord.xy), 0).r;
|
||||
float behindFragmentDepth = texelFetch(LinearDepth, uViewOffset + ivec2(gl_FragCoord.xy), 0).r;
|
||||
material.Base.a *= clamp((behindFragmentDepth - pixelpos.w) / uDepthFadeFalloff, 0.0, 1.0);
|
||||
#endif
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue