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:
baldurk committed 2017-08-28 18:50:17 +01:00
1 parent f295df15f4
commit 00e06d8ff1
35 files changed
+200 -156

No files matched your search

+3 -2
View File
@@ -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);