mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-10-22 03:51:06 +00:00
PickPixel's x and y parameters should be mip-relative
* Previously x and y always ranged from 0,0 to width-1,height-1. Even for lower mips, the value was just effectively shifted. * This is quite unclear at the API level so instead x and y are now relative to the selected mip's dimensions.
This commit is contained in:
5 files changed
+11
-8
No files matched your search
@@ -736,6 +736,9 @@ void TextureViewer::RT_FetchCurrentPixel(uint32_t x, uint32_t y, PixelValue &pic
|
||||
if(m_TexDisplay.flipY)
|
||||
y = (texptr->height - 1) - y;
|
||||
|
||||
x = qMax(0U, x >> m_TexDisplay.mip);
|
||||
y = qMax(0U, y >> m_TexDisplay.mip);
|
||||
|
||||
pickValue = m_Output->PickPixel(m_TexDisplay.resourceId, true, x, y, m_TexDisplay.sliceFace,
|
||||
m_TexDisplay.mip, m_TexDisplay.sampleIdx);
|
||||
|
||||
|
||||
Reference in new issue
Block a user