Gaussian Blur Glow Effect Help

Finally back. Unfortunately I shouldn’t have gone. Got slammed by police in custody battle stuff AND car broke down AND racism but anywho… Any more progress on the scalefx slang front?

@guest.r: close but not quite:

with reshade

guest translation

Here is my complete reshade setup so that you can decipher it more: https://mega.nz/#!DsVFkTQa!-V2vY-WWZfdlwHw31foU9RozC07iNgjtefotHacKfqI Have a few values turned on in the sweetfx cfg and in the ioxa gaussian file cfg. I don’t believe I have any other values turned on. The rest is in retroarch:

And if you’re interested in ports to future reshades, here is a tutorial for that ioxa gaussian:

https://forums.geforce.com/default/topic/959175/3d-vision/superdepth-3d/post/4967308/#4967308

Thanx for a reply. I’m glad to hear you’re ok, sorry to hear about the trouble. I have changed some settings so the preset would look better without scanlines. If you could set the parameters for “Haze Width” form 1.5 to 2.0 and “Adjust brightness” from 0.4 to 0.5 then i think it would look more authentic.

You can also change the defaults in the shader code:

#pragma parameter GaussStrength “Gauss Strength” 0.45 0.0 1.0 0.01 #pragma parameter BloomStrength “Bloom Strength” 0.33 0.0 1.0 0.01 #pragma parameter BloomIntensity “BloomIntensity” 3.0 1.0 5.0 0.25 #pragma parameter SW “Haze Width” 1.5 1.0 2.5 0.25 (change first number to 2.0) #pragma parameter BRIGHT “Adjust brightness” 0.4 0.3 0.6 0.01 (change first number to 0.5)

The ported code seems to be intact, so we only need to make the preset and the settings right.

Why do we need adjust brightness? I was actually just using bloom for that. If I remove the scanlines from my settings, the image is supposed to be unbearable to look at. The scanlines are what brought the brightness back to normal while still maintaining some bloom xD I was asking because that setting wasn’t in the original thats all.

It would be cool if retroarch let you view the game screen in the menu as a smaller box like that gpsp psp emulator.

I also used vibrance in the sweetfx portion of reshade that helped the colors stay fresh when the scanlines/bloom were on:

////------------// ///VIBRANCE/// //------------//// #define USE_VIBRANCE 1 //[Shared] //-Vibrance : Intelligently saturates (or desaturates if you use negative values) the pixels depending on their original saturation.

//>Vibrance settings<\ #define Vibrance 0.50 //[-1.00:1.00] //-Intelligently saturates (or desaturates if you use negative values) the pixels depending on their original saturation. #define Vibrance_RGB_balance float3(1.00,1.00,1.00) //[-10.00:10.00] //-A per channel multiplier to the Vibrance strength so you can give more boost to certain colors over others. X = Red, Y = Green, Z = Blue

try to port that and I think I can get closer afterward.

There are also 2 scalefx color threshes in the menu.

And is the GaussBloomWarmth automatically set to neutral here? And the slant gaussian and gaussian passes = 5?

If I set brightness greater than 0.35, detail is lost. So the pic above is as close as I can get it currently.

The brightness needs to be adjusted because the original algorithm makes the image too bright by overweighting at wider spreads, which should OK for scanlines. I think, even without the scanlines, the combo is very interesting to try (with slight modifications). But you are right about “stronger settings”, they look much better with some scanlines/masks. As i mentioned, i added the parameters for easier testing so the right combo can be picked. :smiley:

Let’s see the original algorithm version if you still have it. Because if I adjust brightness here over 0.35, details will be lost like their noses and whatnot :stuck_out_tongue:

Utter crap. :stuck_out_tongue:

Here is my RA screenie, very bright:

Here it is, how it looks ingame:

gifs upload

Back to the code…i think “BloomIntensity” parameter can be lowered a bit and it should look nicer. Please give it a try…

that’s because you have to use scanlines to normalize it. Here, use this as your overlay:

https://mega.nz/#!6lk1DThb!tYjjHLE43exmMHWXA89waHAzCK8b6tffpKBue7_p2v8

Use opacity = 0.50

It doesn’t look the same by just upping bloom intensity in the menu. Ppl’s noses and stuff gets erased even with scanlines on. I think your unmodified port is the only way lol. Thou MUST use ze scanlines my son.

I think i found the problem. Reshade applies it’s shaders above the overlay scanlines, so we have to do the same, which is fortunately possible with shaders also. There is no way this code will work the same with overlay scanlines, but we can get around that.

Thanks @McSwingles for the materials and feedback. More is welcome. :slight_smile:

Edit: got the scanlines right.

First pic reshade version. 2nd pic Guest.R conversion version.

[https://s6.postimg.org/yeovmy2yp/Final_Fantasy_Anthology_Final_Fantasy_VI_v1_1.png

Tweaking. BRB with final adjustments.](https://s6.postimg.org/yeovmy2yp/Final_Fantasy_Anthology_Final_Fantasy_VI_v1_1.png)

  1. Ok, got it as closet as I could. I think the bright variation between the 2 pics are because non epsxe games I used vibrance but epsxe games I used your ntsc colors shader for xbrz. So if you could add an extra pass for the ntsc colors for xbrz that you sent me on ngemu forums that day, that would be great. User would use one or the other. But not both at once. So if it is possible to code it so that one is one, auto turn the other off, I’d like that.

  2. Also, we need the zoom parameter for for nes games, etc (everything from image enhancement shader) just in case we need to do some cropping in some emulators.

  3. Make sure to remove that duplicate scalefx option at the top of the list.

  4. When the image adjustment shader is included, we may need to place it before the scanlines because vertical stretching of the image can mess up the way that the scanlines look.

Here is the adjusted shader. Defaults are set to what I use for psx games. Other emus like nes, mame, or pce may need bloom toned down to like 0.165 or 0.085 since most of their games use brighter colors. Most of the time on those same emus, I sometimes take the gaussian down to 0.30. So be aware of that when things may not look right on other consoles. Those adjustments would remedy it.

sh1nra358.zip is for my playstation 1 settings. sh1nra358-default.zip is for the default settings from the reshade file. Use default for future updates because I’ve changed a value or 2 in the haze file and a few others.

Another thing, it’s not gonna look as pretty as the epsxe with xbrz on 3D games as much as it is supposed to. 2 reasons why. No texture filtering is implemented in the psx emu for retroarch yet. And since xbrz gets everything instantly and during, stretched textures on 3D and such wont look as good on retroarch because of scalefx being a post processing shader and applying everything after the fact. But it is practically identical for 2D games with less performance impact than the real xbrz. So for 3D games, xbrz is still the definite way to go. Why pure 2D games can stay with scalefx for performance reasons.

Thanks for the adjustments, they are really well placed. I tinkered with the code further and really improved the scanlines part, now they work at any resolution and look identical as before. Plus i removed the adjustment part which isn’t smart and makes the image look weird sometimes.

I included a NTSC preset (make sure the shaders are online-updated), yaay, 2 presets. :slight_smile: The scalefx options were more a repeatable feature than a bug, but they are gone now.

The image adjustment shader is carefully placed (tried several placings, no resize-distortions as it is now), but can make things slow, so i minimized it to resize functionalities. So to say, i optimized the parameter menu by removing everything that’s not necessary.

I hope you will find the adjustments useful, feel free to optimize it to your liking. :smiley:

So for epsxe you had this.:

AA shader 4.o - Level2 for xBRZ w. NTSC colors const float offset = 0.75; // Play with this value a bit. (from 0.25 -> 3D AA to 1.0 -> full sprite AA) const float NTSC = 0.50; // NTSC Color emulation strength, 0.0 -> OFF, 1.0 -> FULL

Are those same values in these retroarch shaders so that I could make them, these exact values? Or rather can you make them these exact values by default.

Also, it’ll be cool if everything is kept in it’s own folder instead of referencing other shaders in the shader main shader folder. Transfer those shader files from those locations to be in this shader’s location so everything can be consolidated just in case other ppl would use those with completely different internal settings for something else.

Also, how can you make the scanlines fit any rez when the scanlines are a static image? Just curious. So they’ll still be 1px lines with 1px spaces in between? because I know in 4k, in order to make it appear 1px and 1px, youd have to make the lines 2px and the space 2px.

Lastly, smaa was on in the reshade in the sweetfx cfg, I know it may be redundant with the aa shader, but I did have that on too. So if you want to add reshade’s smaa after the scanlines, that’ll be cool.

Pete’s OGL2 plugin is a different environment, so the offset value makes sense there since it’s anti-aliasing low res sprites, xBRZ sprites, 3D stuff… Internal resolution is a good equivalent for the offset, both are selected by experimenting and taste if someone plays with it. You can set the internal resolution even as an arbitrary value (works nice with linear sampling). But contrary to ePSXe, we need greater offsets in RA since the 2D scaling can get as far as 9x (internal resolution 6 means offset = 6.0).

About NTSC strength, yep, the vulkan version has this implemented by a parameter, we could ask @HunterK if he could modify the cg version also.

OK, no problem about referencing shaders, but the customizations fall away and the scalefx will be double in the menu. :stuck_out_tongue: Sp00kyFox might fix this since it’s coded in the pass1 shader, but i doubt it.

Yep, the scanlines are 1px and 1px and i patched the shader so it will be 2px and 2px on 4K displays :slight_smile: . The “image” is calculated, like in CRT Lottes and other CRT shader which look terrific.

Some bad at the end, unfortunately there is no SMAA cg version so i can’t add it. Maybe later if the stuff is translated into .slang you can have this also, i guess it only improves the quality. (porting the reshade version is PITA lol).

Merry christmas. :smiley:

bumped the haze width up to 2.0 as default. Now I’m satisfied enough lol. Except one thing though. Noticed I had dithering on in reshade too. Possible to add dithering? That would be the semi last shader I ask for to be inserted. Merry Christmas to you too ^_^. The very last shader I’d like to ask for a color filter shader multiplier type thing. Like, it’ll multiply in the colors without affecting black. For example:

If I wanted a warm atmosphere or the scene to have some crazy color hue to it, I’d have to set the rgb color multipliers to do so. There is something similar in there already that controls rgb but it doesn’t feel/look like the same thing. Feels like it adds in those colors instead of multiplying them in.

Wow, those goalposts just keep moving, huh? You’ve got more patience than I, guest.r :slight_smile:

Sure, I’ll add the variable mixing of ntsc-colors to the Cg version like the one that’s in the slang version.

@McSwingles You can try adding the misc/color-mangler shader onto the end. It lets you do pretty much anything you want to colors.

“Wow, those goalposts just keep moving, huh? You’ve got more patience than I, guest.r”

Techically I didnt request what we are doing now. Pretty sure he wanted to do this so that he could have my setup. My initial post was only about the blur glow effect. So, you lose on the sarcasm that usually brings threads to an end because of griping that this is going on too long :stuck_out_tongue: And since he wanted to do it, I saw an opportunity to ditch reshade for retroarch since he is fulfilling everything that I used with it. And with that, no more reshade upper left dialogue :wink:

The color thing was a part of my setup in the reshade pack I gave him, except it was only used for pc games that removed the original effect it had before it was ported to pc. I probably wont use it for retroarch, but just in case somebody wanted to port this very setup outside of reshade, it would be there.

Yes I know I can add on shaders myself. But I’m pretty sure guest’s intent is to have an all in one for this setup. Btw, we do this (plot, plan, scheme, test, etc) on multiple sites just in case you didnt know xD He likes when I test his stuff. And I like testing it. Because he comes up with good sh*t.

No need to get defensive. What you guys do with your time is your own business. I quickly get bored with tweaking, as I’m a broad-strokes kinda guy, and moving goalposts turn me right off, but if that’s what you guys are into, more power to ya :slight_smile:

I just added the variable intensity to the Cg version of misc/ntsc-colors.

Thank you hunterk for adding the variable. I have always been a fan of subtlety. OTOH i don’t like to tweak too much also. Fortunately the effect turned out pretty nice, which wouldn’t happen without materials and feedback from McSwingles. I think folks should give the preset a try, it’s really great. :slight_smile:

About dithering, i think it will not work here with visible effect (tested it, lower bit precision actually adds a weird dotmask) since it’s there to prevent banding (caused by color space limitations and some effects, mostly in modern native RGB888 games) and it’s commonly usable with pseudo-pass shaders (like SweetFX, Asmodean’s suite, LunaMoo shader) where the resulting color is passed further in floating point precision until the end. In real multipass environments like with RA the precision gets away from pass to pass.

The “shooter” color effect is very nice, but it looks like a whole SweetFX / reshade package to me and it’s not to attribute to a simple shader. I wish i’ll invent it some day to share it with you. :stuck_out_tongue:

Ok, cool. I’ll update the shaders in retroarch and consolidate all effects used into one folder and repost it sometime today.

Edit: we have an error in the ntsc color file update:

I believe you can ensure precision is maintained from pass-to-pass by adding float_framebufferX = true to the preset file. IIRC, maister’s NTSC shader needs it or it turns magenta.