From fff6cba6db7ab1c865c2a0537e9014c9b09ccce8 Mon Sep 17 00:00:00 2001 From: baldurk Date: Tue, 23 Dec 2014 23:24:58 +0000 Subject: [PATCH] Fix 3D texture visualisation for GL --- renderdoc/data/glsl/texsample.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/renderdoc/data/glsl/texsample.h b/renderdoc/data/glsl/texsample.h index be6da07ee..524658d4b 100644 --- a/renderdoc/data/glsl/texsample.h +++ b/renderdoc/data/glsl/texsample.h @@ -342,7 +342,7 @@ vec4 SampleTextureFloat4(vec2 pos, int type, bool flipY, int mipLevel, float sli if (flipY) pos.y = size.y - pos.y; - col = textureLod(tex3D, vec3(pos / size.xy, slice), float(mipLevel)); + col = textureLod(tex3D, vec3(pos / size.xy, slice / size.z), float(mipLevel)); } else if (type == RESTYPE_TEXCUBE) {