mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-10-17 01:29:19 +00:00
Make display rendering colours theme-aware.
* In particular this removes hard-coded checkerboard colours that don't look right on dark themes.
This commit is contained in:
35 files changed
+200
-156
No files matched your search
@@ -890,11 +890,12 @@ bool ReplayController::SaveTexture(const TextureSave &saveData, const char *path
|
||||
|
||||
if(sd.alpha != AlphaMapping::Discard)
|
||||
{
|
||||
FloatVector col = sd.alphaCol;
|
||||
Vec4f col = Vec4f(sd.alphaCol.x, sd.alphaCol.y, sd.alphaCol.z);
|
||||
if(sd.alpha == AlphaMapping::BlendToCheckerboard)
|
||||
{
|
||||
bool lightSquare = ((x / 64) % 2) == ((y / 64) % 2);
|
||||
col = lightSquare ? sd.alphaCol : sd.alphaColSecondary;
|
||||
col = lightSquare ? RenderDoc::Inst().LightCheckerboardColor()
|
||||
: RenderDoc::Inst().DarkCheckerboardColor();
|
||||
}
|
||||
|
||||
col.x = powf(col.x, 1.0f / 2.2f);
|
||||
|
||||
Reference in new issue
Block a user