Introducing crt-royale for ReShade

More
2 months 3 weeks ago #21 by gottenspell
Replied by gottenspell on topic Introducing crt-royale for ReShade
It seems to me the easiest way to check the similarity of the mask using the example of super mario bos. (nes). I checked on all sorts of settings, it is impossible to achieve the same result as in retroarch.

Please Log in or Create an account to join the conversation.

More
2 months 3 weeks ago - 2 months 3 weeks ago #22 by akgunter
Replied by akgunter on topic Introducing crt-royale for ReShade

gottenspell wrote: It seems to me the easiest way to check the similarity of the mask using the example of super mario bos. (nes). I checked on all sorts of settings, it is impossible to achieve the same result as in retroarch.

 

Make sure you're using the latest feature/scanline-rewrite branch. I pushed another big rewrite late last night that might close the gap a hell of a lot. If that doesn't do it, can you post some screenshots?

Edit: And which standalone NES emulator are you using? I tried Mesen, but apparently ReShade doesn't work with it; and all the others I'm finding are circa 2008.
Last edit: 2 months 3 weeks ago by akgunter.

Please Log in or Create an account to join the conversation.

More
2 months 3 weeks ago #23 by gottenspell
Replied by gottenspell on topic Introducing crt-royale for ReShade
Perhaps 100% port is not possible due to reshade restrictions? By the way, puNES supports cgp / glslp shaders, it's convenient to check because reshade is also supported there. I have used puNES Opengl. Also, crt royale is ported to byuu's multi-emulator Lucia, maybe it can help somehow, although I doubt it.
Here are screenshots, made in puNES.



In Retroarch, the image consists of volumetric squares, in the reshade port these squares are not convex, the image seems blurry, perhaps due to anti-aliasing?

Please Log in or Create an account to join the conversation.

More
2 months 3 weeks ago #24 by akgunter
Replied by akgunter on topic Introducing crt-royale for ReShade

gottenspell wrote: Perhaps 100% port is not possible due to reshade restrictions? By the way, puNES supports cgp / glslp shaders, it's convenient to check because reshade is also supported there. I have used puNES Opengl. Also, crt royale is ported to byuu's multi-emulator Lucia, maybe it can help somehow, although I doubt it.
Here are screenshots, made in puNES.

In Retroarch, the image consists of volumetric squares, in the reshade port these squares are not convex, the image seems blurry, perhaps due to anti-aliasing?
 

Yeah, a 100% accurate port is not possible because RetroArch does some of its texcoord math in a weird way where shifting by one vertical coordinate in the shader shifts by two pixels in the screen for whatever reason. The majority of the work in the scanline rewrite was changing the math to handle that correctly in ReShade, but the tradeoff was that the scanlines illuminate slightly differently at the pixel level. I suspect similar math mismatches are happening in the bloom and blur code too, but I could spend weeks rewriting that and would likely end up with something equally mismatched.

As for those example images, the second one looks to have Scanline Thickness set to 1, which is guaranteed to not look identical as per above. The first image looks like it has Scanline Blend Strength set to 1. The blending should barely affect the apearance at 60 FPS; but by design it'll produce mismatched screenshots.

As for the last image, I'm having trouble replicating it myself; but it looks like it's using my electron beam math. The comparison with the RetroArch version gets rather tricky too because I think RetroArch is outputting an 11:8 aspect ratio, while yours is 5:4. Between that, the new electron beam math (yes, it was necessary), and some bloom differences, you can either get more crisp or more blurry results than in RetroArch. You can probably use the Levels Contrast, Bloom Underestimation, Bloom Excess, and maaaaybe the Beam Min/Max Sigma or Beam Spot Power settings to nudge the output more towards your liking. But no, it's unlikely you'll be able to get it pixel-perfect or that I'll be able to rewrite it to be pixel-perfect.
The following user(s) said Thank You: gottenspell

Please Log in or Create an account to join the conversation.

More
2 months 1 week ago #25 by gottenspell
Replied by gottenspell on topic Introducing crt-royale for ReShade
I looked at the Lut shader and discussions. Rather, it refers to color manipulation. So it won't work to set up the shader like kurozumi, because there is a different mask and changing the color will not help.

Please Log in or Create an account to join the conversation.

More
2 months 1 week ago #26 by akgunter
Replied by akgunter on topic Introducing crt-royale for ReShade

gottenspell wrote: I looked at the Lut shader and discussions. Rather, it refers to color manipulation. So it won't work to set up the shader like kurozumi, because there is a different mask and changing the color will not help.
 

I've pushed a new commit that should help with this. There were two problems.
1) The kurozumi preset used triad size == 1, which I had prohibited because "why would someone set a 3-channel phosphor mask smaller than 3?". Now I know why someone would, so you can do that now.
2) The kurozumi preset lies. It says the triad size is 1, but somewhere in the code it apparently becomes 2. My guess is there's a rogue rounding function in the original shader that prevents it from shrinking down to triad size 1.

SO! Now it should just be a matter of using the LUT, setting the triad size to 2, and then replicating the other available settings from the preset. Note that many of the beam_ settings are currently nuked, so you won't be able to set them. Some of the color and bloom settings might also require a bit of nudging. The pixel pattern is working, though, and that was the bulk of the mismatch for me.
The following user(s) said Thank You: gottenspell, Forgiven12

Please Log in or Create an account to join the conversation.

More
1 month 2 days ago #27 by Divvy
Replied by Divvy on topic Introducing crt-royale for ReShade
Firstly, thank you for your work! I've played through Unreal Gold and some Dosbox games with your port and it works very well, except:

I can't seem to get scanlines to work at all. It works fine in Retroarch with the original shader, but with this port the scanline strength setting just seems to increasingly blur the image but the lines are lacking completely. Here's a screenshot from PCEM DX9. Same behavior in Unreal DX11. I've tried fiddling with the settings and restoring defaults, but nothing helps. I don't know if something's up or if it's just user error.

Dropbox Link

Please Log in or Create an account to join the conversation.

More
4 weeks 7 hours ago #28 by akgunter
Replied by akgunter on topic Introducing crt-royale for ReShade

Divvy wrote: Firstly, thank you for your work! I've played through Unreal Gold and some Dosbox games with your port and it works very well, except:

I can't seem to get scanlines to work at all. It works fine in Retroarch with the original shader, but with this port the scanline strength setting just seems to increasingly blur the image but the lines are lacking completely. Here's a screenshot from PCEM DX9. Same behavior in Unreal DX11. I've tried fiddling with the settings and restoring defaults, but nothing helps. I don't know if something's up or if it's just user error.

Dropbox Link
 

Toggle the Enable Interlacing checkbox. That should do it.

Also a heads up: the shader's scanlines are intended to emulate the effect as seen on a CRT - so you won't really see them in-game unless you take a screenshot. At 60 fps they'll blend together.

Please Log in or Create an account to join the conversation.

More
3 days 13 hours ago - 3 days 13 hours ago #29 by Forgiven12
Replied by Forgiven12 on topic Introducing crt-royale for ReShade
Thanks for your work! I've tried a handful of these shaders and Royale is my favorite now. I combine a bunch of sharpening filter shaders and xbrz to make pixel art games look good in high resolution. In some cases like in the 2nd image below you can find bleeding "sub-colors" around pure white text when using mask type other than shadow.
Original image resolution is 240x160 (Gameboy Advance).

drive.google.com/uc?export=view&id=13_za...j1TVtOW5vxC4pR4xytz_
drive.google.com/uc?export=view&id=1J5lg...L6ZOUzmUNeQQ-FsWcjnj

ps. Nothing wrong with vertical lines.
Last edit: 3 days 13 hours ago by Forgiven12.

Please Log in or Create an account to join the conversation.