Koko-aio shader discussions and updates

Roger that. As for Soqueroeu’s stuff I’m only making a pack for him which he himself will post if he wanted, he was kind enough to make the graphics for me upon request anyways. I just didn’t want to keep them for myself and I’m trying to make them utilize the features of koko-aio to the fullest.

2 Likes

Hi @kokoko3k - suddenly problems in Windows11/Geforce RTX 2070 during testing: All games show ugly and flickering pixel artifacts (see screenshot, tested also with today’s changes). The problem does not arise with the koko-aio version of my version 0.1 release (around January 29). It is independent of he presets used, so just switching back to the version 0.1 shader release removes the artifacts. Any idea how I could debug this??? :frowning: Any hint appreciated, many thanks!

EDIT: Ok, it also occurs with your Commodore standard preset as well. Only Windows so far, no troubles on Macs and iPad.

1 Like

No problem, I’ve seen that in the past and fixed, I just need to test on nvidia myself.

-edit-
Found it, it is not (only) a matter of gpu, it is vulkan behaving a way versus glcore behaving the other, i’ve reproduced under intel and amd by switching from glcore to vulkan, didn’t yet on nvidia.

You can confirm the issue is the same by enabling ambient light with the commodore 1084s preset. Doing that should clear the glitches till i’ll fix it properly.

1 Like

Correct! Enabling ambient light removes the glitches. Another reason to head for your most recent edits in the ambient light department :grin:.

1 Like

It should be fixed now.

1 Like

Works - many thanks!

Sorry, another question to #define ALLOW_BG_IMAGE_TEXTURE_WRAP_IN_SHADER

After activation in config.inc, it seems that the default behavior in my own presets is not “mirrored repeat”, but “clamp to border”, which is a mystery to me. I have no special setting in my shader preset, but it nevertheless defaults to “clamp to border”. My presets reference from the “monitor-slotmask-bloom-bezel”-preset (today’s github revision).

Even if I like the result, I would like to understand why this is so…I thought that I would have to add this option to the preset, but it works from alone as well…no mirrored repeat any longer.

Many thanks!

I did not changed anything and it is a mistery for me too, as it works as it should here!

Exploring now the possibility to emulate a sort of dynamic contrast. When the global luminosity of the scene goes up, the global scene illumination goes down:

…to return to full brightness on darker scenes:

This is entirely implemented in the shader, no extra texture required, but i’m not 100% sure it would be useful and probably would need some tweaking (eg: the reflections should stay up).

In the worst case, i could keep the code to tweak the background luminosity as a user parameter.

What do you think?

2 Likes

Wow … but not yet ready for testing, right? Because I think that’s the effect of every Arcade hall … it an Arcade machine lightens up, the hall gets relatively darker… would be very interesting to see how it works out.

I am very sorry for the confusion: Some time ago, I did the following in config.globals.inc. line 200 #define BG_IMAGE_WRAP_MODE 1.0 That’s correct if I want that to be hardcoded?!? Thanks!

Hello kokoko3k, your presets are very good (although I haven’t discovered them long ago). I play on a 27 inch screen in an arcade cabinet and the “bezel” presets shrink the effective play area too much for my liking…is it possible to increase the size of everything in general until it fits with bezels of “the bezel project”?

Correct, i’ve not pushed anything yet.

@fenix76, I’m glad you like them.
The *bezelwider.slangp presets don’t shrink anything, the main content isn’t scaled, you can see that in several screenshots in the very first post.

Btw, here are the parameters that you should tweak to zoom in/out the bezel and the content:

Is this enough for you?

1 Like

Great shader. Lightweight and very configurable. Easily produces good results. I have a few feature requests that might be useful to other users as well.

1). Integer scale. Many of us like to apply intense scanlines. This means uneven scanlines can be more noticeable unfortunately. With integer scale on my 1440p monitor, I can use resolutions such as 1920x1440 (side bezels only), 1792x1344 (SNES games, thinner bezels on top and bottom), 1600x1200 / 1494x1120 (full bezels) and 1706x1280 (Mortal Kombat, etc). This would be really useful.

2). Black level adjustment

3). More background images to choose from (always nice to have more of these!)

EDIT: 4) Independent vertical and horizontal deconvergence controls (I believe the current deconvergence setting adjusts vertical and horizontal convergence altogether)

Hopefully you can consider adding these features. :nerd_face:

1 Like

Yes it is!! Thank you! I have touched the second and third parameters that you put, in addition to the curvature and the alignment of the reflection, and it has turned out quite well (at least to be a first step).

1 Like

Hi there, I’m glad you’re enjoying it.

As for integer scaling, it is something i’m considering to add, but still thinking how.
Since I’ve no use for it, I need to know more specifically what it would be required to do.
Would be ok if I add something like “snap to integer scaling” into an already in place zoom parameter?
So that if one set, say, a zoom of 0.47, it will stay at 1x till the zoom parameter reaches a value that allow for a 2x integer scale and so on, or there is more, maybe?

Black level adjustment: can you elaborate?
The shader already provides brightness, gamma in and out and contrast adjustments, so I fail to understand what would be the use case.

As for more background images, have you seen the repo containing external overlays linked in the first post or maybe do you refer specifically to simple repeating patterns?

Deconvergence already allows for vertical and horizontal adjustments. It is just that, to spare some parameter, it works in a particular way:
it moves over the x and when it reaches the end of the row it goes one row down and start to walk on that row and so on. More or less like a text editor with auto CR when you reaches the end of a line. Not intuitive, i know.

1 Like

Integer scaling. Mega Bezel has this feature, and it seems to work fine. Perhaps you can play with it and see if you can come up with an idea to implement this into your shader.

Black level… I can’t explain this very well. If you raise the black level, true blacks will become brighter and less black (between grays and blacks) so you’ll see scanlines and mask details in the otherwise all black areas. This is used to emulate CRT monitors with non-perfect blacks. Many real CRTs (without calibration) are like that. You can also lower the black level to make colors that are not that black into true blacks. This feature can be found in grade, image adjustment, guest’s shader and probably some other shaders.

And yes I mean repeatable background patterns. :smile:

I’m not a gfx artist so make a pattern takes me too much time, but if you find other royality free or licensable patterns that can be included, I’ll be glad to add them.

What I was asking about black level is why the same cannot be achieved with brightness and contrast options.
Since brightness can translates everything up and contrast modulates the difference between pure black and pure white, you can make black=gray by highering the brightness and lowering the contrast to avoid clipping white.
Trivially, you can crush blacks, if wanted, by lowering the brightness and highering the contrast to keep white.

I’ll add this to the things that can be done, but meanwhile you have an alternative, at least. :slightly_smiling_face:

1 Like

Thanks for the reply :grinning:

Adjusting contrast and brightness usually cannot achieve the same effect as the other colors will be greatly affected (more washed-out look). I suppose that’s why we need this feature as a dedicated option.

EDIT: I guess I can just put grade.slang as the 1st pass to adjust black level the way I wanted. Let me try and see if it works. :nerd_face:

The only way to not affect other colors, is to clamp/clip the black or the white, but i doubt this was what happened on uncalibrated crts.

Here you go, in grade.slang, i see:

> #pragma parameter g_lift         "Black Level"          0.0 -0.5 0.5 0.01
> #define lift            params.g_lift
> contrast += (lift / 20.0) * (1.0 - contrast);

It is understandable what it does, Black level is g_lift, g_lift is lift and lift seems to be just a contrast modifier.

So in the end it seems just a shortcut for the contrast.

The other colors will be affected to some degree. But not linearly/proportionally I suppose. Visually the blacks and near-blacks are affected a lot more.

Thanks for taking your time explaining this. I’ll try to experiment with the options available. :grinning: