Skip to content

Commit

Permalink
VK: Output color in srgb or linear depending on -srgb option.
Browse files Browse the repository at this point in the history
  • Loading branch information
jamievlin committed Feb 16, 2024
1 parent c60480c commit 252b534
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions include/vkrender.h
Original file line number Diff line number Diff line change
Expand Up @@ -547,6 +547,7 @@ class AsyVkRender
bool interlock=false;
bool GPUcompress=false;
bool fxaa=false;
bool srgb=false;

#if defined(DEBUG)
bool hasDebugMarker=false;
Expand Down
6 changes: 6 additions & 0 deletions src/vkrender.cc
Original file line number Diff line number Diff line change
Expand Up @@ -687,6 +687,7 @@ void AsyVkRender::vkrender(const string& prefix, const picture* pic, const strin

interlock=settings::getSetting<bool>("GPUinterlock");
fxaa=settings::getSetting<bool>("fxaa");
srgb=settings::getSetting<bool>("srgb");

#ifdef HAVE_VULKAN
Aspect=((double) width)/height;
Expand Down Expand Up @@ -3031,6 +3032,11 @@ void AsyVkRender::modifyShaderOptions(std::vector<std::string>& options, Pipelin
{
options.emplace_back("ENABLE_FXAA");
}

if (srgb)
{
options.emplace_back("OUTPUT_AS_SRGB");
}
}

template<typename V>
Expand Down

0 comments on commit 252b534

Please sign in to comment.