mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-12 21:10:42 +00:00
Refactor heatmap for quad overdraw/triangle size to be applied late
* Instead of baking these into the overlay texture and trying to decode them afterwards, we instead write a grayscale 16F value into the overlay texture, and add a special decode display mode that will use the heatmap and bucketing provided. * This means that saving these overlay textures now saves grayscale. When saving to an 8-bit format, we remap to 0-255 so that greater than 1.0 values are mapped lower.
This commit is contained in:
@@ -818,11 +818,13 @@ void TextureViewer::UI_UpdateStatusText()
|
||||
bool sintTex = (tex.format.compType == CompType::SInt);
|
||||
|
||||
if(m_TexDisplay.overlay == DebugOverlay::QuadOverdrawPass ||
|
||||
m_TexDisplay.overlay == DebugOverlay::QuadOverdrawDraw)
|
||||
m_TexDisplay.overlay == DebugOverlay::QuadOverdrawDraw ||
|
||||
m_TexDisplay.overlay == DebugOverlay::TriangleSizeDraw ||
|
||||
m_TexDisplay.overlay == DebugOverlay::TriangleSizeDraw)
|
||||
{
|
||||
dsv = false;
|
||||
uintTex = false;
|
||||
sintTex = true;
|
||||
sintTex = false;
|
||||
}
|
||||
|
||||
QColor swatchColor;
|
||||
@@ -3451,6 +3453,15 @@ void TextureViewer::on_saveTex_clicked()
|
||||
if(saveDialog.saveOverlayInstead())
|
||||
{
|
||||
m_SaveConfig.resourceId = overlayTexID;
|
||||
|
||||
if(m_TexDisplay.overlay == DebugOverlay::QuadOverdrawDraw ||
|
||||
m_TexDisplay.overlay == DebugOverlay::QuadOverdrawPass ||
|
||||
m_TexDisplay.overlay == DebugOverlay::TriangleSizeDraw ||
|
||||
m_TexDisplay.overlay == DebugOverlay::TriangleSizePass)
|
||||
{
|
||||
m_SaveConfig.comp.blackPoint = 0.0f;
|
||||
m_SaveConfig.comp.whitePoint = 255.0f;
|
||||
}
|
||||
}
|
||||
|
||||
if(res)
|
||||
|
||||
Reference in New Issue
Block a user