kokoko3k / koko-aio-slang

Multi purpose crt shader for retroarch
GNU General Public License v3.0
57 stars 2 forks source link

Latest GitHub - Vignette Enable Affects Background #3

Closed estefan3112 closed 1 year ago

estefan3112 commented 1 year ago

EDIT: Only occurs in vertical games, not horizontal games. Both FinalBurn Neo and MAME2003.

Hi, I just pulled the changes of last week, and Vignette Enable causes this effect:

Bildschirm­foto 2023-02-10 um 22 06 20

Configuration:

reference "../../shaders/shaders_slang/bezel/koko-aio/monitor-slotmask-bloom-bezel.slangp"

LUMINANCE = "0.000000" BEZEL_R = "-0.220000" BEZEL_G = "-0.220000" BEZEL_B = "-0.220000" BEZEL_INNER_ZOOM = "-0.110000" BEZEL_FRAME_ZOOM = "0.090000" DO_BG_IMAGE = "1.000000" BG_IMAGE_OFFX = "0.000500" BG_IMAGE_OFFY = "0.009500" BG_IMAGE_ZOOM = "0.999500" BG_IMAGE_ROTATION = "1.000000" DO_AMBILIGHT = "0.000000" bg_under = "../../shaders/shaders_slang/bezel/koko-aio/textures/arcade_textures/1942.png"

kokoko3k commented 1 year ago

Wops! I know what i changed, so rolling back is definitely possible, but I've to understand why it actually happens and i'll do by the start of the next week.

Thank you for spotting the bug!

On 10 February 2023 22:09:11 CET, estefan3112 @.***> wrote:

Hi, I just pulled the changes of last week, and Vignette Enable causes this effect:>

<img width="1440" alt="Bildschirm­foto 2023-02-10 um 22 06 20" src="https://user-images.githubusercontent.com/24915559/218197612-d9f5842b-3014-433d-9beb-9b86faf90c4c.png">>

Configuration:>

reference

"../../shaders/shaders_slang/bezel/koko-aio/monitor-slotmask-bloom-bezel.slangp"> LUMINANCE = "0.000000"> BEZEL_R = "-0.220000"> BEZEL_G = "-0.220000"> BEZEL_B = "-0.220000"> BEZEL_INNER_ZOOM = "-0.110000"> BEZEL_FRAME_ZOOM = "0.090000"> DO_BG_IMAGE = "1.000000"> BG_IMAGE_OFFX = "0.000500"> BG_IMAGE_OFFY = "0.009500"> BG_IMAGE_ZOOM = "0.999500"> BG_IMAGE_ROTATION = "1.000000"> DO_AMBILIGHT = "0.000000"> bg_under = "../../shaders/shaders_slang/bezel/koko-aio/textures/arcade_textures/1942.png">

-- > Reply to this email directly or view it on GitHub:> https://github.com/kokoko3k/koko-aio-slang/issues/3> You are receiving this because you are subscribed to this thread.>

Message ID: @.***>

estefan3112 commented 1 year ago

My previous branch merge was 1 February, so the change must have been thereafter.

kokoko3k commented 1 year ago

Sorry, pal, this is going to be harder than expected, because it works fine here: image

Could you try to bisect the issue by identifying the exact commit that broke it for you?

There is a commit on vignette and spot that could be relevant, i'd start from there: https://github.com/kokoko3k/koko-aio-slang/commit/6667407933b1cc20f09f07312eae6d5dab971f43

estefan3112 commented 1 year ago

Bingo - I downloaded: 6667407933b1cc20f09f07312eae6d5dab971f43 - the problem arises. Then I downloaded one commit earlier: 8bcaf436d08f80bbd938529216ae35ff73aadb49 - still works Curious now whether there comes something in the logfiles (probably not).

estefan3112 commented 1 year ago

Just infos in the logfiles. To be on the safe side, I also checked your stock slotmask shader with stock background.

Easy workaround for the time being: turning off vignette.

Bildschirm­foto 2023-02-11 um 16 11 25
kokoko3k commented 1 year ago

still weird i cannot reproduce... I think i'll make a branch to debug this issue, but i'd have to ask you to do tests on it on my blind commits there to try to understand what causes the issue. Meanwhile, is there something out of ordinary on your setup?

kokoko3k commented 1 year ago

Also, what puzzles me is that it "cuts" even your bezel corners. Does the issue happen to you only when enabling background images?

estefan3112 commented 1 year ago

Oh - here are some further interesting findings

This happens both with the Vulkan and the OpenGL driver, while the Metal driver produces a completely distorted video across the window, useless. It's rather nightmarish to envisage that this is MacOS-specific.

Hoping that this helps you further.

kokoko3k commented 1 year ago

Sorry to hear that. Did you manage to test on Windows too?

From a code point of view, I'm still completely clueless on why this happen. Anyway, i introduced a specific workaround that reverts the MacOS problematic commit. Since the workaround should not impact performance on systems that work fine, it has to be manually enabled in the code by uncommenting a line in shaders/config.inc. Please, search for:

    //Workaround for https://github.com/kokoko3k/koko-aio-slang/issues/3
//#define MAC_VIGNETTE_CURVATURE_WORKAROUND 1.0

And turn it into:

    //Workaround for https://github.com/kokoko3k/koko-aio-slang/issues/3
#define MAC_VIGNETTE_CURVATURE_WORKAROUND 1.0

Let me know if this is enough to make it behave like before on MacOS

estefan3112 commented 1 year ago

Ok, this now comes as a real surprise: Same effect under Windows 11 with today's Github code (both FinalBurn Neo and MAME2003, RetroArch Nightly of 11 January 2023), exactly the same behavior: 1942-230213-184256 Also stock slangp with background: 1942-230213-185857

The workaround resolves the problem here under Windows 11. As in MacOS, only vertical games are affected. Now heading back to MacOS. I need to re-test iOS, i.e. whether I applied the newest shader code correctly. Cheers!

kokoko3k commented 1 year ago

Does windows and macos use the same output resolution? Does things change if running in a smaller window or at 1920x1080 in fullscreen? Also, what hapoens if you set the corner sharpness to a very low value? I think the corner is the only setting that could actually produce the issue... And last question: are you testing without any modification to the cores stock configuration?

kokoko3k commented 1 year ago

Ooh, half/good news. I reproduced under Linux, with amd drivers, but i don't develop on this machine. I'll try nvidia drivers asap.

estefan3112 commented 1 year ago

Does windows and macos use the same output resolution? No. Windows 11 has a 2560 x 1440 — QHD (Quad HD) / 2K 1440p (144Hz gaming monitor) MacOS runs 3840 x 2160 — UHD (Ultra HD) / 4K 2160p (4K dell monitor)

Does things change if running in a smaller window or at 1920x1080 in fullscreen? Windowed mode and fullscreen mode results in identical results. I would still have to check 1080p, though.

Also, what hapoens if you set the corner sharpness to a very low value? Corner sharpness down to 15 results in a nearly black screen, you hardly see the video. On the screenshot, you actually see nothing, but in fact there is some nearly black movement on the screen.

Bildschirm­foto 2023-02-13 um 19 25 56

I think the corner is the only setting that could actually produce the issue...

And last question: are you testing without any modification to the cores stock configuration? MAME2003 is without any Core Setting changes. FinalBurn Neo: Force 60hz ON and Allow Patched Romsets OFF, but no change in standard settings, just tried.

Cheers!

kokoko3k commented 1 year ago

It turned out intel drivers were the only ones where it worked fine. It's ok, i've an nvidia card i can test on easilly, and i hope to fix this mess in a couple of days. Thank you for reporting!

estefan3112 commented 1 year ago

Ooh, half/good news. I reproduced under Linux, with amd drivers, but i don't develop on this machine. I'll try nvidia drivers asap.

My Windows 11 PC (actually, that of my son) runs a GeForce RTX 2070 Super and produces those results.

estefan3112 commented 1 year ago

And eventually reconfirming: RetroArch iOS on my iPad is not affected, the backgrounds just work without the static workaround (same codebase as tested under MacOS). So strange.

kokoko3k commented 1 year ago

I'm still not 100% sure to have understood why that happens, but i managed to find a way to make it stop, at least on intel and nvidia. Can you test please?

estefan3112 commented 1 year ago

Hi, I could only test under MacOS today, and the regular shader presets work!!!

However, there is now a problem with the backdrop configuration - backdrops are not shown, I checked against yesterday's codebase, where the backdrops still work. Foreground artwork works.

Bildschirm­foto 2023-02-14 um 22 46 45
estefan3112 commented 1 year ago

One second, I think I simply forgot the static setting for backdrops, sorry! Will check again

kokoko3k commented 1 year ago

It is working fine here. (nvidia and intel)

estefan3112 commented 1 year ago

I checked again with today's codebase, and it all works properly on MacOS! No time for Windows tests, but no worries, I guess. So you will probably delete this Mac workaround from config.inc and close here, right?

kokoko3k commented 1 year ago

Yes ofc, i think I Already did that ;)