Introducing crt-royale for ReShade

More
9 months 4 days 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
9 months 4 days ago - 9 months 4 days ago #22 by akgunter
Replied by akgunter 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.

 

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: 9 months 4 days ago by akgunter.

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

More
9 months 4 days 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
9 months 3 days ago #24 by akgunter
Replied by akgunter 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?
 

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
8 months 2 weeks 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
8 months 2 weeks ago #26 by akgunter
Replied by akgunter 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.
 

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
7 months 1 week 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
7 months 6 days ago #28 by akgunter
Replied by akgunter 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
 

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
6 months 1 week ago - 6 months 1 week 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: 6 months 1 week ago by Forgiven12.

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

More
6 months 5 days ago #30 by ScreamerofStars
Replied by ScreamerofStars on topic Introducing crt-royale for ReShade
could you please share your preset

also i discovered some issues with dosbox OpenGL(dosboxECE) and the preset
the screen flickers without interpolation and i had to increase the blending to fix

nevertheless stuff like privateer looks great , mainly the faces and color shading
imgur.com/a/YHUF2wy

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

More
6 months 4 days ago #31 by gottenspell
Replied by gottenspell on topic Introducing crt-royale for ReShade
Looks really great, but the strongest shimmer kills everything. And if you use blending, the flicker disappears, but you don't play active games, your eyes hurt even more. Unfortunately, I cannot use interpolation.
     

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

More
6 months 3 days ago #32 by ScreamerofStars
Replied by ScreamerofStars on topic Introducing crt-royale for ReShade
Well it turns out i discovered why, its was interpolation turned on
it works wonders with snes9x but dosbox and other games becomes a issue.

also, it would be interesting if it was possible to add More royale presets into the mix like xm29 and so on

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

More
5 months 4 weeks ago #33 by Scanlines
Replied by Scanlines on topic Introducing crt-royale for ReShade
I seem to be receiving a compiling error when using Reshade 5.0.0.62. I've tried overwriting the files with the latest on github and it still occurs.

Thanks for your work bringing crt-royale to ReShade!

Log:
13:32:41:427 [06292] | ERROR | Failed to compile "D:\Emulation\Redream\reshade-shaders\Shaders\crt-royale.fx":
D:\Emulation\Redream\reshade-shaders\Shaders\crt-royale/shaders/../lib/bind-shader-params.fxh(235, 18): error X3000: syntax error: unexpected '/', expected ';'
D:\Emulation\Redream\reshade-shaders\Shaders\crt-royale/shaders/../lib/gamma-management.fxh(217, 25): error X3004: undeclared identifier or no matching intrinsic overload for 'tex2Dlod'
D:\Emulation\Redream\reshade-shaders\Shaders\crt-royale/shaders/../lib/gamma-management.fxh(217, 85): error X3000: syntax error: unexpected ',', expected expression
D:\Emulation\Redream\reshade-shaders\Shaders\crt-royale/shaders/../lib/scanline-functions.fxh(129, 7): error X3004: undeclared identifier 'float4x3'
D:\Emulation\Redream\reshade-shaders\Shaders\crt-royale/shaders/../lib/scanline-functions.fxh(129, 16): error X3000: syntax error: unexpected 'identifier'
D:\Emulation\Redream\reshade-shaders\Shaders\crt-royale/shaders/../lib/blur-functions.fxh(1417, 16): error X3004: undeclared identifier or no matching intrinsic overload for 'float4x3'
D:\Emulation\Redream\reshade-shaders\Shaders\crt-royale/shaders/../lib/blur-functions.fxh(1417, 76): error X3000: syntax error: unexpected ')'
D:\Emulation\Redream\reshade-shaders\Shaders\crt-royale/shaders/../lib/blur-functions.fxh(1573, 16): error X3004: undeclared identifier or no matching intrinsic overload for 'float4x3'
D:\Emulation\Redream\reshade-shaders\Shaders\crt-royale/shaders/../lib/blur-functions.fxh(1573, 76): error X3000: syntax error: unexpected ')'
D:\Emulation\Redream\reshade-shaders\Shaders\crt-royale/shaders/../lib/blur-functions.fxh(1703, 16): error X3004: undeclared identifier or no matching intrinsic overload for 'float4x3'
D:\Emulation\Redream\reshade-shaders\Shaders\crt-royale/shaders/../lib/blur-functions.fxh(1703, 76): error X3000: syntax error: unexpected ')'
D:\Emulation\Redream\reshade-shaders\Shaders\crt-royale/shaders/../lib/blur-functions.fxh(1808, 16): error X3004: undeclared identifier or no matching intrinsic overload for 'float4x3'
D:\Emulation\Redream\reshade-shaders\Shaders\crt-royale/shaders/../lib/blur-functions.fxh(1808, 76): error X3000: syntax error: unexpected ')'

https://ibb.co/F8Hnj0p

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

More
5 months 3 weeks ago #34 by ScreamerofStars
Replied by ScreamerofStars on topic Introducing crt-royale for ReShade
To inspire OP and even crosire more with this incredible task

Invalid consumer key/secret in configuration

You guys rock, also royale blends well with 5xbrz_NoBlend with Wing Commander 1 and 2 using the Wcdx patch
 

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

More
5 months 3 weeks ago #35 by Scanlines
Replied by Scanlines on topic Introducing crt-royale for ReShade
I fixed it by reinstalling with only royale, and not installing the custom .dll file for open gl that was on another thread.

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

More
5 months 3 weeks ago - 5 months 3 weeks ago #36 by Scanlines
Replied by Scanlines on topic Introducing crt-royale for ReShade
Wanted to share my settings for 1440p and looks good with 4k as well, after several hours of fiddling for Redream. I wanted to get a slightly higher resolution crt look that fit the dreamcast well. Give it a shot as a starting point to save yourself some time!

Redream Resolution - 1280x960 (slightly upscaled rendering) in 4:3 aspect ratio, vsync on

Mask Type - Slot
Mask Sample Mode - Smooth
Downsample Sharpness - 0.1
Mask Size Param - Triad Width
Mask Triad Width - 3.0
CRT Gamma - 2.50
LCD Gamma - 2.20
Levels Contrast - 1.0
Halation - 0.02
Diffusion - 0.08
Bloom Underestimation - 0.80
Bloom Excess - 0.00
Enable Interlacing - Yes
Scanline Thickness - 1
Scanline Blend Strength - 0.00
Scanline Blend Gamma - 0.74

Draw backfield First - No
Convergence Offset X & Y - All zeros

Geom Mode - Flat
Geom Radius - 2.0
Geom View - 2.0
Geom Tilt - 0, 0
Geom Aspect Ratio/overscan/subpixel offset - all Default
Border Size - 0.0
Border Darkness - 2.0
Border Compress - 2.5

Beam Horiz Filter - Quilez (Fast)
Beam Horiz Sigma - 0.35
Beam Horiz Linear RGB Weight - 1.00

Preprocessor definitions - All default


Enjoy!
-SC
Last edit: 5 months 3 weeks ago by Scanlines. Reason: Added redream resolution

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

More
4 months 3 weeks ago - 4 months 3 weeks ago #37 by ScreamerofStars
Replied by ScreamerofStars on topic Introducing crt-royale for ReShade
There are plans for a new update?
People at the github were suggesting Screen Size scaling as RA does it, but that i think is from crosire's part of Reshade supports it, and also more tweak options like Gaussian Blur and scanlines visibility.

Plus, here is a preset that i've found, it looks nice outside the use of bloom excess to remove some of the scanlines, it needs XM29 LUT at github
files.catbox.moe/fkk8oa.ini
Last edit: 4 months 3 weeks ago by ScreamerofStars.

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