DadSchoorse / vkBasalt

a vulkan post processing layer for linux
zlib License
1.25k stars 52 forks source link

Using ReShade shaders causes crash #83

Closed Merrit closed 4 years ago

Merrit commented 4 years ago

Running with default vkBasalt works fine, as soon as I try to use ReShade - from AUR or downloading directly from repo - it crashes:

[merritt@SHODAN ~]$ ENABLE_VKBASALT=1 vkcube
vkBasalt info:  config file: /home/merritt/.config/vkBasalt/vkBasalt.conf
vkBasalt info:  effects = cas:colorfulness
vkBasalt info:  curves = /usr/share/reshade/shaders/Curves.fx
vkBasalt info:  colorfulness = /usr/share/reshade/shaders/Colorfulness.fx
vkBasalt info:  vibrance = /usr/share/reshade/shaders/Vibrance.fx
vkBasalt info:  bloom = /usr/share/reshade/shaders/Bloom.fx
vkBasalt info:  casSharpness = 1.0
vkBasalt info:  fxaaQualitySubpix = 0.75
vkBasalt info:  fxaaQualityEdgeThreshold = 0.125
vkBasalt info:  fxaaQualityEdgeThresholdMin = 0.0312
vkBasalt info:  smaaEdgeDetection = luma
vkBasalt info:  smaaThreshold = 0.05
vkBasalt info:  smaaMaxSearchSteps = 32
vkBasalt info:  smaaMaxSearchStepsDiag = 16
vkBasalt info:  smaaCornerRounding = 25
vkBasalt info:  debandAvgdiff = 1.8
vkBasalt info:  debandMaxdiff = 4.0
vkBasalt info:  debandMiddiff = 2.0
vkBasalt info:  debandRange = 24.0
vkBasalt info:  debandIterations = 1
vkBasalt info:  lutFile = /path/to/lut/without/spaces
vkcube: ../src/reshade/effect_preprocessor.cpp:116: void reshadefx::preprocessor::add_include_path(const std::filesystem::__cxx11::path&): Assertion `!path.empty()' failed.
Aborted (core dumped)

vkBasalt.conf:

#effects is a colon seperated list of effect to use
#e.g.: effects = fxaa:cas
#effects will be run in order from left to right
#one effect can be run multiple times e.g. smaa:smaa:cas
#cas    - Contrast Adaptive Sharpening
#fxaa   - Fast Approximate Anti-Aliasing
#smaa   - Enhanced Subpixel Morphological Antialiasing
#deband - Effects against banding artefacts
#lut    - color LookUp Table
effects = cas

#reshadeTexturePath = /usr/share/reshade/textures/
#reshadeIncludePath = /usr/share/reshade/shaders/
#depthCapture = off

curves = /usr/share/reshade/shaders/Curves.fx
colorfulness = /usr/share/reshade/shaders/Colorfulness.fx
vibrance = /usr/share/reshade/shaders/Vibrance.fx
bloom = /usr/share/reshade/shaders/Bloom.fx

#casSharpness specifies the amount of sharpning in the CAS shader.
#0.0 less sharp, less artefacts, but not off
#1.0 maximum sharp more artefacts
#Everything in between is possible
#negative values sharpen even less, up to -1.0 make a visible difference
casSharpness = 1.0

#fxaaQualitySubpix can effect sharpness.
#1.00 - upper limit (softer)
#0.75 - default amount of filtering
#0.50 - lower limit (sharper, less sub-pixel aliasing removal)
#0.25 - almost off
#0.00 - completely off
fxaaQualitySubpix = 0.75

#fxaaQualityEdgeThreshold is the minimum amount of local contrast required to apply algorithm.
#0.333 - too little (faster)
#0.250 - low quality
#0.166 - default
#0.125 - high quality 
#0.063 - overkill (slower)
fxaaQualityEdgeThreshold = 0.125

#fxaaQualityEdgeThresholdMin trims the algorithm from processing darks.
#0.0833 - upper limit (default, the start of visible unfiltered edges)
#0.0625 - high quality (faster)
#0.0312 - visible limit (slower)
#Special notes: due to the current implementation you
#Likely want to set this to zero.
#As colors that are mostly not-green
#will appear very dark in the green channel!
#Tune by looking at mostly non-green content,
#then start at zero and increase until aliasing is a problem.
fxaaQualityEdgeThresholdMin = 0.0312

#smaaEdgeDetection changes the edge detection shader
#luma  - default
#color - might catch more edges, but is more expensive
smaaEdgeDetection = luma

#smaaThreshold specifies the threshold or sensitivity to edges
#Lowering this value you will be able to detect more edges at the expense of performance.
#Range: [0, 0.5]
#0.1 is a reasonable value, and allows to catch most visible edges.
#0.05 is a rather overkill value, that allows to catch 'em all.
smaaThreshold = 0.05

#smaaMaxSearchSteps specifies the maximum steps performed in the horizontal/vertical pattern searches
#Range: [0, 112]
#4  - low
#8  - medium
#16 - high
#32 - ultra
smaaMaxSearchSteps = 32

#smaaMaxSearchStepsDiag specifies the maximum steps performed in the diagonal pattern searches
#Range: [0, 20]
#0  - low, medium
#8  - high
#16 - ultra
smaaMaxSearchStepsDiag = 16

#smaaCornerRounding specifies how much sharp corners will be rounded
#Range: [0, 100]
#25 is a reasonable value
smaaCornerRounding = 25

#debandAvgdiff is the average threshold
#Threshold for the difference between the average of reference pixel values and the original pixel value.
#Higher numbers increase the debanding strength but progressively diminish image details. In pixel shaders a 8-bit color step equals to 1.0/255.0
#0.6 - low
#1.8 - medium
#3.4 - high
debandAvgdiff = 1.8

#debandMaxdiff is the maximum threshold
#Threshold for the difference between the maximum difference of one of the reference pixel values and the original pixel value.
#Higher numbers increase the debanding strength but progressively diminish image details. In pixel shaders a 8-bit color step equals to 1.0/255.0
#1.9 - low
#4.0 - medium
#6.8 - high
debandMaxdiff = 4.0

#debandMiddiff  is the middle threshold
#Threshold for the difference between the average of diagonal reference pixel values and the original pixel value.
#Higher numbers increase the debanding strength but progressively diminish image details. In pixel shaders a 8-bit color step equals to 1.0/255.0
#1.2 - low
#2.0 - medium
#3.3 -high
debandMiddiff = 2.0

#debandRange is the inital radius
#The radius increases linearly for each iteration.
#A higher radius will find more gradients, but a lower radius will smooth more aggressively.
#Range: [0.0, 32.0]
debandRange = 24.0

#debandIterations is the number of steps
#The number of debanding steps to perform per sample.
#Each step reduces a bit more banding, but takes time to compute.
#Range: [1, 4]
debandIterations = 1

#lutFile is the path to the LUT file that will be used
#supported are .CUBE files and .png with width == height * height
#the path should not include spaces
lutFile = /path/to/lut/without/spaces
DadSchoorse commented 4 years ago
#reshadeTexturePath = /usr/share/reshade/textures/
#reshadeIncludePath = /usr/share/reshade/shaders/

There's your problem, un-comment those lines.

Merrit commented 4 years ago

Alrighty, I am officially confirmed to be a blind woman. I swear I spent several hours trying to make this work myself. It works just fine now. My bad!

Thanks for making this awesome project :)