Only account for mip in slice/face index for 3D textures.

* This prevents arrays or cubemaps from having the slice or face index
  be incorrectly modified by the mip being displayed. Thanks Xavyiy on
  twitter for the report.
  https://twitter.com/Xavyiy/status/574352181190594560
This commit is contained in:
baldurk
2015-03-07 23:58:37 +00:00
parent 94f25edfd0
commit f46e31c4ba
+4 -1
View File
@@ -1297,7 +1297,10 @@ bool GLReplay::RenderTextureInternal(TextureDisplay cfg, bool blendAlpha)
ubo->InverseRangeSize = 1.0f/(cfg.rangemax-cfg.rangemin);
ubo->MipLevel = (float)cfg.mip;
ubo->Slice = (float)(cfg.sliceFace>>cfg.mip);
if(texDetails.curType != eGL_TEXTURE_3D)
ubo->Slice = (float)cfg.sliceFace;
else
ubo->Slice = (float)(cfg.sliceFace>>cfg.mip);
ubo->OutputDisplayFormat = resType;