mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-06 10:00:40 +00:00
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:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user