Skip to content

Commit

Permalink
use fxaa if option is set
Browse files Browse the repository at this point in the history
  • Loading branch information
DadSchoorse committed Nov 1, 2019
1 parent e6aa00f commit 3abe295
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/basalt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@

std::string fullScreenRectFile = std::string(getenv("HOME")) + "/.local/share/vkBasalt/shader/full_screen_rect.vert.spv";
std::string casFragmentFile = std::string(getenv("HOME")) + "/.local/share/vkBasalt/shader/cas.frag.spv";
std::string fxaaFragmentFile = std::string(getenv("HOME")) + "/.local/share/vkBasalt/shader/fxaa.frag.spv";

std::mutex globalLock;
#ifdef _GCC_
Expand Down Expand Up @@ -182,7 +183,7 @@ VK_LAYER_EXPORT VkResult VKAPI_CALL vkBasalt_CreateInstance(
{
layerCreateInfo = (VkLayerInstanceCreateInfo *)layerCreateInfo->pNext;
}
std::cout << "i am doing something" << std::endl;
std::cout << "interrupted create instance" << std::endl;
if(layerCreateInfo == NULL)
{
// No loader instance create info
Expand All @@ -205,6 +206,10 @@ VK_LAYER_EXPORT VkResult VKAPI_CALL vkBasalt_CreateInstance(
{
scoped_lock l(globalLock);
casUBO.sharpness = std::stod(casConfig.getOption("casSharpness"));
if(casConfig.getOption("enableFxaa")==std::string("1"))
{
casFragmentFile = fxaaFragmentFile;
}
instance_dispatch[GetKey(*pInstance)] = dispatchTable;
}

Expand Down

0 comments on commit 3abe295

Please sign in to comment.