diff --git a/CHANGELOG.md b/CHANGELOG.md index b12e299211..e33dde52e5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -33,6 +33,8 @@ Version History - Both geometric and volumetric models can now have their child geometry/volume objects rebound using an object parameter - Fix light leaking artifacts at poles of HDRI (and Sun-Sky) light +- Add sRGB conversion to `ospExamples` such that the color of the + widget for `backgroundColor` actually matches - Dropping support for MSVC14, new minimum compiler on Windows is MSVC15 (Visual Studio 2017) diff --git a/apps/ospExamples/GLFWOSPRayWindow.cpp b/apps/ospExamples/GLFWOSPRayWindow.cpp index dbd680693d..1edcda7c10 100644 --- a/apps/ospExamples/GLFWOSPRayWindow.cpp +++ b/apps/ospExamples/GLFWOSPRayWindow.cpp @@ -1,4 +1,4 @@ -// Copyright 2018-2020 Intel Corporation +// Copyright 2018-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #include "GLFWOSPRayWindow.h" @@ -561,7 +561,11 @@ void GLFWOSPRayWindow::buildUI() addObjectToCommit(renderer->handle()); } - if (ImGui::ColorEdit3("backgroundColor", bgColor)) { + static vec3f bgColorSRGB{0.0f}; // imGUI's widget implicitely uses sRGB + if (ImGui::ColorEdit3("backgroundColor", bgColorSRGB)) { + bgColor = vec3f(std::pow(bgColorSRGB.x, 2.2f), + std::pow(bgColorSRGB.y, 2.2f), + std::pow(bgColorSRGB.z, 2.2f)); // approximate rendererPT.setParam("backgroundColor", bgColor); rendererSV.setParam("backgroundColor", bgColor); rendererAO.setParam("backgroundColor", bgColor);