Cemu 2.0 - BoTW: Graphic Pack, Clarity Enhacement, presets don't work with linux native. #387

Closed
opened 2022-10-18 10:53:13 -03:00 by joao-pedro-barbosa · 16 comments
joao-pedro-barbosa commented 2022-10-18 10:53:13 -03:00 (Migrated from github.com)

Hi.

I'm running version 2, under last linux native version and I noticed Zelda BOTW graphic pack "Enhacement", Clarity presets don't work. It does on windows version, but no on new 2.0 on linux native binary.

My setup is
Intel i5-11400f
16G RAM DDR4
Gigabyte GTX 1060 6GB DDR5

The game I'm running is The legend of Zelda - BOTW 1.5

Thanks!

Hi. I'm running version 2, under last linux native version and I noticed Zelda BOTW graphic pack "Enhacement", Clarity presets don't work. It does on windows version, but no on new 2.0 on linux native binary. My setup is Intel i5-11400f 16G RAM DDR4 Gigabyte GTX 1060 6GB DDR5 The game I'm running is The legend of Zelda - BOTW 1.5 Thanks!
Squall-Leonhart commented 2022-10-18 10:55:21 -03:00 (Migrated from github.com)

presets should work as of latest code, compile latest or use the experimental ubuntu release.

presets should work as of latest code, compile latest or use the experimental ubuntu release.
joao-pedro-barbosa commented 2022-10-18 14:01:27 -03:00 (Migrated from github.com)

Sorry. Maybe it's my fault. I'm not able to see the difference now.

Sorry. Maybe it's my fault. I'm not able to see the difference now.
gurrgur commented 2022-10-19 13:29:06 -03:00 (Migrated from github.com)

Can we reopen this issue? I just tested this on latest master and BoTW Clarity still doesn't work correctly. Most if not all shader based graphic packs do not seem work on linux native (both opengl and vulkan), while fps++ and resolution changes work just fine.

I am aware of #375 but it seems to me that this issue is caused by the graphic pack shader code not working correctly rather than crc errors.

Can we reopen this issue? I just tested this on latest master and BoTW Clarity still doesn't work correctly. Most if not all shader based graphic packs do not seem work on linux native (both opengl and vulkan), while fps++ and resolution changes work just fine. I am aware of #375 but it seems to me that this issue is caused by the graphic pack shader code not working correctly rather than crc errors.
joao-pedro-barbosa commented 2022-10-19 13:35:03 -03:00 (Migrated from github.com)

Of course yes!

Of course yes!
jn64 commented 2022-10-22 12:14:41 -03:00 (Migrated from github.com)

Can repro on latest ffa213c. Clarity presets don't work. Didn't notice before because I don't use them.

OS: Fedora 36
GPU: NVIDIA GeForce GTX 1050 Ti
Driver version: 520.56.06
Game: Breath of the Wild (EU, v208 / 1.5.0)

log-filmic.txt

Can repro on latest ffa213c. Clarity presets don't work. Didn't notice before because I don't use them. OS: Fedora 36 GPU: NVIDIA GeForce GTX 1050 Ti Driver version: 520.56.06 Game: Breath of the Wild (EU, v208 / 1.5.0) [log-filmic.txt](https://github.com/cemu-project/Cemu/files/9844643/log-filmic.txt)
v-fox commented 2022-10-24 17:54:40 -03:00 (Migrated from github.com)

And here I naively thought that they just that "subtle"… until I watched a comparison video, so no presets for me either. Would really go for some more contrast and less default wash-out.

And here I naively thought that they just that "subtle"… until I watched [a comparison video](https://www.youtube.com/watch?v=aGV55Xcdg1M), so no presets for me either. Would really go for some more contrast and less default wash-out.
jn64 commented 2022-10-25 03:06:58 -03:00 (Migrated from github.com)

@v-fox You can use vkBasalt with some known working shaders in the meantime.

(random example, obviously can be tweaked better)
montage

@v-fox You can use [vkBasalt](https://github.com/DadSchoorse/vkBasalt) with some [known working shaders](https://github.com/gripped/vkBasalt-working-reshade-shaders) in the meantime. (random example, obviously can be tweaked better) ![montage](https://user-images.githubusercontent.com/23169302/197695025-aad27cce-63a7-439e-b440-d0cc8bcc6a53.png)
v-fox commented 2022-10-25 03:49:53 -03:00 (Migrated from github.com)

You can use vkBasalt with some known working shaders in the meantime.

I'm using it… but for SMAA+CAS which makes it smooooth as hell.
But Reshade support in it is half-baked and experimental. While BOTW Reshade workaround pack says that they need to have depth buffer forcibly enabled for it to work which in turn causes nasty geometry flickering artefacts. So, making it decent is a project in itself.

> You can use [vkBasalt](https://github.com/DadSchoorse/vkBasalt) with some [known working shaders](https://github.com/gripped/vkBasalt-working-reshade-shaders) in the meantime. I'm using it… but for SMAA+CAS which makes it smooooth as hell. But Reshade support in it is half-baked and experimental. While BOTW Reshade workaround pack says that they need to have depth buffer forcibly enabled for it to work which in turn causes nasty geometry flickering artefacts. So, making it decent is a project in itself.
jn64 commented 2022-10-25 05:11:49 -03:00 (Migrated from github.com)

Simple colour/contrast-related shaders usually don't use depth buffer. In above example, BotW Reshade workaround is disabled, and depthCapture = off in vkBasalt.conf.

Although at that point, you could also just change monitor/GPU settings (I forgot about it, but I should bump up Nvidia's Digital Vibrance more for BotW).

Simple colour/contrast-related shaders usually don't use depth buffer. In above example, BotW Reshade workaround is disabled, and `depthCapture = off` in vkBasalt.conf. Although at that point, you could also just change monitor/GPU settings (I forgot about it, but I should bump up Nvidia's Digital Vibrance more for BotW).
v-fox commented 2022-10-25 09:23:19 -03:00 (Migrated from github.com)

Simple colour/contrast-related shaders usually don't use depth buffer. In above example, BotW Reshade workaround is disabled, and depthCapture = off in vkBasalt.conf.
Although at that point, you could also just change monitor/GPU settings (I forgot about it, but I should bump up Nvidia's Digital Vibrance more for BotW).

Well, you've convinced me. Maybe this is even better than dubious presets with a ton of changes of questionable necessity.

So, for reference I've dusted off my old ReShade preset for NieR: Automata installation on Windows and dug out cemu's preset file (~/.local/share/Cemu/graphicPacks/downloadedGraphicPacks/BreathOfTheWild/Enhancements/37040a485a29d54e_00000000000003c9_ps.txt). But, since my simple VA-monitor is calibrated for "the standard" sRGB/200nit/1:3000/6500K output, I've decided not to screw with colours and ended up with a simple configuration of smaa:cas:Clarity:FakeHDR for now.

Specifically:
  • vkBasalt.conf
effects = smaa:cas:ReClarity:ReFakeHDR
# working paths while vkBasalt-working-reshade-shaders dir is in ~/.config/vkBasalt/
ReClarity = vkBasalt-working-reshade-shaders/allshaders/reshade-shaders-working/Shaders/Clarity.fx
ReFakeHDR = vkBasalt-working-reshade-shaders/allshaders/reshade-shaders-working/Shaders/FakeHDR.fx
reshadeTexturePath = vkBasalt-working-reshade-shaders/allshaders/reshade-shaders-working/Textures
reshadeIncludePath = vkBasalt-working-reshade-shaders/allshaders/reshade-shaders-working/Shaders
depthCapture = on
casSharpness = 0.111
smaaEdgeDetection = color
smaaThreshold = 0.04
smaaMaxSearchSteps = 48
smaaMaxSearchStepsDiag = 16
smaaCornerRounding = 66
  • Clarity.fx:
ClarityOffset = 1.0
ClarityBlendMode = 5
ClarityBlendIfDark = 33
ClarityBlendIfLight = 222
  • FakeHDR.fx
HDRPower = 1.25
radius1 = 0.87
radius2 = 0.93
> Simple colour/contrast-related shaders usually don't use depth buffer. In above example, BotW Reshade workaround is disabled, and depthCapture = off in vkBasalt.conf. > Although at that point, you could also just change monitor/GPU settings (I forgot about it, but I should bump up Nvidia's Digital Vibrance more for BotW). Well, you've convinced me. Maybe this is even better than dubious presets with a ton of changes of questionable necessity. So, for reference I've dusted off my old ReShade preset for NieR: Automata installation on Windows and dug out cemu's preset file (~/.local/share/Cemu/graphicPacks/downloadedGraphicPacks/BreathOfTheWild/Enhancements/37040a485a29d54e_00000000000003c9_ps.txt). But, since my simple VA-monitor is calibrated for "the standard" sRGB/200nit/1:3000/6500K output, I've decided not to screw with colours and ended up with a simple configuration of `smaa:cas:Clarity:FakeHDR` for now. <details><summary>Specifically:</summary> * vkBasalt.conf ```ini effects = smaa:cas:ReClarity:ReFakeHDR # working paths while vkBasalt-working-reshade-shaders dir is in ~/.config/vkBasalt/ ReClarity = vkBasalt-working-reshade-shaders/allshaders/reshade-shaders-working/Shaders/Clarity.fx ReFakeHDR = vkBasalt-working-reshade-shaders/allshaders/reshade-shaders-working/Shaders/FakeHDR.fx reshadeTexturePath = vkBasalt-working-reshade-shaders/allshaders/reshade-shaders-working/Textures reshadeIncludePath = vkBasalt-working-reshade-shaders/allshaders/reshade-shaders-working/Shaders depthCapture = on casSharpness = 0.111 smaaEdgeDetection = color smaaThreshold = 0.04 smaaMaxSearchSteps = 48 smaaMaxSearchStepsDiag = 16 smaaCornerRounding = 66 ``` * Clarity.fx: ```ini ClarityOffset = 1.0 ClarityBlendMode = 5 ClarityBlendIfDark = 33 ClarityBlendIfLight = 222 ``` * FakeHDR.fx ```ini HDRPower = 1.25 radius1 = 0.87 radius2 = 0.93 ``` </details>
gurrgur commented 2022-10-25 11:00:41 -03:00 (Migrated from github.com)

Okay, so I found the cause of this issue!

It is caused by compiler discrepancies for printf formatting. Cemu uses %I64x for reading the shader base and aux hash from the filename which does not work on linux.

Here is a related stackoverflow answer where they suggest replacing %I64x with %llx which solves the issue for me.

They also suggest creating a preprocessor constant to switch between both variants depending on the platform.

Okay, so I found the cause of this issue! It is caused by compiler discrepancies for printf formatting. Cemu uses `%I64x` for reading the shader base and aux hash from the filename which does not work on linux. Here is a related [stackoverflow answer](https://stackoverflow.com/a/14071804) where they suggest replacing `%I64x` with `%llx` which solves the issue for me. They also suggest creating a preprocessor constant to switch between both variants depending on the platform.
joao-pedro-barbosa commented 2022-10-26 06:54:13 -03:00 (Migrated from github.com)

Hi. First of all. Thanks for your effort.
I test it, and it seems Clarity preset is applied, but with some glitches for me.
Anyone can test it?

2022-10-26 11 50 10

Only glitches with vulkan! OpenGL is working ok (but slow for me).

Hi. First of all. Thanks for your effort. I test it, and it seems Clarity preset is applied, but with some glitches for me. Anyone can test it? ![2022-10-26 11 50 10](https://user-images.githubusercontent.com/63120284/197995630-60bef00e-bddb-489c-bd80-8543b6f68889.jpg) Only glitches with vulkan! OpenGL is working ok (but slow for me).
jn64 commented 2022-10-26 08:19:06 -03:00 (Migrated from github.com)

I only tested briefly but no glitches here. My settings are the same as my earlier log. Can't try to repro if you don't include logs.

I only tested briefly but no glitches here. My settings are the [same as my earlier log](https://github.com/cemu-project/Cemu/issues/387#issuecomment-1287822783). Can't try to repro if you don't include logs.
joao-pedro-barbosa commented 2022-10-26 10:08:49 -03:00 (Migrated from github.com)

You have reason @jn64. Here's the mine.

OS: batocera x86_64 - 36-dev-58295d08ed
CPU: Intel i5-11400F
RAM: 16G RAM DDR4
GPU: Gigabyte GTX 1060 6GB DDR5
Driver version: 520.56.06
Game: Breath of the Wild (EU, v208 / 1.5.0)

cemu-log-contrasty.txt
I think with linux version and vulkan is enough to reproduce, because with last linux binary and opengl all works fine.

Thanks!

You have reason @jn64. Here's the mine. OS: batocera x86_64 - 36-dev-58295d08ed CPU: Intel i5-11400F RAM: 16G RAM DDR4 GPU: Gigabyte GTX 1060 6GB DDR5 Driver version: 520.56.06 Game: Breath of the Wild (EU, v208 / 1.5.0) [cemu-log-contrasty.txt](https://github.com/cemu-project/Cemu/files/9869701/cemu-log-contrasty.txt) I think with linux version and vulkan is enough to reproduce, because with last linux binary and opengl all works fine. Thanks!
jn64 commented 2022-10-27 00:43:00 -03:00 (Migrated from github.com)

I tried with identical settings as you and didn't get any glitches or errors.
log2.txt

There is this error throughout your log:

GLSL parsing failed for 3a11595b2bcc1e76_00000000ffffffff: "ERROR: 0:183: 'limitations' : Non-constant-index-expression
ERROR: 0:184: 'limitations' : Non-constant-index-expression

which is from d6ba61cf64/src/Cafe/HW/Latte/Renderer/Vulkan/RendererShaderVk.cpp (L340)

I tried with identical settings as you and didn't get any glitches or errors. [log2.txt](https://github.com/cemu-project/Cemu/files/9875601/log2.txt) There is this error throughout your log: ``` GLSL parsing failed for 3a11595b2bcc1e76_00000000ffffffff: "ERROR: 0:183: 'limitations' : Non-constant-index-expression ERROR: 0:184: 'limitations' : Non-constant-index-expression ``` which is from https://github.com/cemu-project/Cemu/blob/d6ba61cf6435a163bf6aea17de32c19d1e61e456/src/Cafe/HW/Latte/Renderer/Vulkan/RendererShaderVk.cpp#L340
joao-pedro-barbosa commented 2022-10-27 03:50:06 -03:00 (Migrated from github.com)

@jn64 today's binary is ok with vulkan. Maybe the yesterday generated binary has just a partial solution. Thanks to everyone! @v-fox @gurrgur @jn64 @Squall-Leonhart

@jn64 today's binary is ok with vulkan. Maybe the yesterday generated binary has just a partial solution. Thanks to everyone! @v-fox @gurrgur @jn64 @Squall-Leonhart
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: cemu-project_Mirror/Cemu-2024-03-05#387
No description provided.