Always point sample depth textures on display

This commit is contained in:
baldurk
2014-11-02 20:09:35 +00:00
parent bb87949c89
commit f00914bbfd
3 changed files with 6 additions and 1 deletions
+1
View File
@@ -91,4 +91,5 @@ BINDING(0) uniform FontUniforms
#define TEXDISPLAY_TYPEMASK 0x7
#define TEXDISPLAY_UINT_TEX 0x8
#define TEXDISPLAY_SINT_TEX 0x10
#define TEXDISPLAY_DEPTH_TEX 0x20
+2 -1
View File
@@ -268,6 +268,7 @@ void main(void)
{
bool uintTex = (OutputDisplayFormat & TEXDISPLAY_UINT_TEX) != 0;
bool sintTex = (OutputDisplayFormat & TEXDISPLAY_SINT_TEX) != 0;
bool depthTex = (OutputDisplayFormat & TEXDISPLAY_DEPTH_TEX) != 0;
vec4 col;
uvec4 ucol;
@@ -287,7 +288,7 @@ void main(void)
}
else
{
col = SampleTextureFloat4(scr / Scale, OutputDisplayFormat & TEXDISPLAY_TYPEMASK, FlipY == 0, (Scale < 1.0 && MipLevel == 0.0), int(MipLevel), Slice);
col = SampleTextureFloat4(scr / Scale, OutputDisplayFormat & TEXDISPLAY_TYPEMASK, FlipY == 0, (Scale < 1.0 && MipLevel == 0.0 && !depthTex), int(MipLevel), Slice);
}
if(RawOutput != 0)
+3
View File
@@ -388,6 +388,9 @@ bool GLReplay::RenderTexture(TextureDisplay cfg)
ubo->OutputDisplayFormat = resType;
if(dsTexMode != eGL_NONE)
ubo->OutputDisplayFormat |= TEXDISPLAY_DEPTH_TEX;
ubo->RawOutput = cfg.rawoutput ? 1 : 0;
ubo->TextureResolutionPS.x = float(tex_x);