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) {