Closed joan31 closed 1 year ago
I've modified the "obs-gamecapture" script (really I created the same name of this script but on my .local/bin/) to this :
#!/bin/sh
# VK layers (MangoHUD workaround) for VK_Capture OBS function
if [ "$#" -eq 0 ]; then
programname=`basename "$0"`
echo "ERROR: No program supplied"
echo
echo "Usage: $programname <program>"
exit 1
fi
exec env LD_LIBRARY_PATH="${LD_LIBRARY_PATH}${LD_LIBRARY_PATH:+:}/usr/\$LIB" \
LD_PRELOAD="${LD_PRELOAD}${LD_PRELOAD:+:}libobs_glcapture.so" \
OBS_VKCAPTURE=1 \
VK_ADD_LAYER_PATH="/usr/share/vulkan/implicit_layer.d" \
VK_LOADER_LAYERS_ENABLE="VK_LAYER_OBS_vkcapture_*" \
"$@"
As you can see, I added this two environment variable :
VK_ADD_LAYER_PATH="/usr/share/vulkan/implicit_layer.d"
VK_LOADER_LAYERS_ENABLE="VK_LAYER_OBS_vkcapture_*"
So I use it on steam option launcher :
obs-gamecapture mangohud SDL_VIDEODRIVER=x11 %command% -vulkan
(SDL_VIDEODRIVER=x11 it is because I'm on wayland but CSGO need to bee launch on xwayland).
So this solution work for all games using vulkan (CS GO too). I can see in the obs the game and mangohud.
But, for opengl games, the problem is still here. Game is captured, steam overlay too, but not mangohud.
As you can see in #14 it depends on the order of loaded layers (eg. vkcapture needs to be loaded last to be able to capture what the layers "before" it rendered).
Hi,
OBS-VKCAPTURE works fine, but Mangohud does not appear...
For example I try this with CS GO :
The gamecapture work, but without mangohud in obs...
I try with an Opengl and SDL games like the old counter strike 1.6
The game appear on OBS but mango hud not.
However, with Apex Legend, all work like a charm :)