This commit is contained in:
Steve Williams 2024-08-20 05:56:24 +01:00
parent 6bd997d2bf
commit b2b1940e2a
1 changed files with 2 additions and 2 deletions

View File

@ -54,7 +54,7 @@
#endif
// TODO: Pass in configuration parameter in ImGui standard manner.
bool ImGuiConfigFlags_OutputDegamma = false; // TODO: Enable to degamma into linear target as required.
bool ImGuiConfigFlags_ConvertSRGBToLinear = false; // TODO: Enable to degamma into linear target as required.
// DirectX data
struct ImGui_ImplDX12_RenderBuffers;
@ -643,7 +643,7 @@ float3 RemoveSRGBCurve (float3 x)\
return out_col; \
}";
auto pixelShader = ImGuiConfigFlags_OutputDegamma ? pixelShader_linear_target : pixelShader_straight;
auto pixelShader = ImGuiConfigFlags_ConvertSRGBToLinear ? pixelShader_linear_target : pixelShader_straight;
if (FAILED(D3DCompile(pixelShader, strlen(pixelShader), nullptr, nullptr, nullptr, "main", "ps_5_0", 0, 0, &pixelShaderBlob, nullptr)))
{
vertexShaderBlob->Release();