New CRT shader from Guest + CRT Guest Advanced updates

You shouldn’t think of it as pixel modes. Think of it as three different clocks: slow, medium, and fast, where you can render an arbitrary number of pixels up to a limit.

@guest.r My understanding is that the old NTSC shaders all assume a two field repeating cycle, but sometimes you actually need a longer cycle to accurately show the effects of the rainbow colors on certain systems/games.

1 Like

I have some dedicated code for rainbow colors, so they can be optional on most situations. Some still show up regardless with a 2-phase design and horizontal “movement” or sometimes on other moving patterns.

At least regarding Genesis, rainbowing can be considered as an quirk.

https://www.reddit.com/r/SEGAGENESIS/comments/1b8cl4a/a_potential_solution_for_rainbow_banding_on/

These are some reasons the dedicated portion of code for the rainbow effect is more on the efficient side.

@Cyber big thanks for testing things out. Merging fields with PCE phase mode is tricky at least, since it won’t allow composite or RF like artifacting/fringing. Nevertheless, i’ll see if i can improve this or resolution scaling a bit.

You can also try 1.02 and then continue with adaptive sharpen or deblur. With 1.0 there is little foothold for some effects to develop.

2 Likes

When using the PAL Preset without changing any parameter beside lifting the basic black level to 0.05 any Mask type other than 0 gives heavy flaming effect on moving objects on dark backgrounds. With your other presets i haven"t that effect. I use the latest version of your shaders

1 Like

If you mean wave-like effect, then you can try to set fringing to 0.0 or similar.

Alternately, delay line / merge options might also help.

Hi @guest - I would kindly need your help - I would like to replicate a Sony Trinitron look as faithfully as possible at a 1080p resolution, and digging through this thread over the years I found these suggestions: starting from the standard settings, set the Scanlines value to 2, the color profile to 5, and use mask 0 or mask 5 (they are the same but I have seen that it makes a difference in color management). I usually activate magic glow with your shaders to give better brightness. Are there other parameters to modify in your experience (I don’t have the possibility of having a real Trinitron in front of my eyes)? And if so, what values should I set them to? Thank you so much for your help and for the tireless work you share with us.

1 Like
4 Likes

It’s a good start, also don’t forget scanline saturation, it’s quite pronounced with trinitrons.

With SDR display modes it’s also adequate to reduce mask strengths. You can also set mask strengths to full and use mask bloom or similar instead. Parameters to be considered are also Mask Boost and Mask Gamma.

Optional tweaks are also deconvergence and clip saturated color beams if you want more! scanline saturation.

4 Likes

Perfect - thank you so much for your help, both of you. One last question for @guest: do you recommend setting the scanline saturation value to 2 or higher? As for the rest, I’ll have to check at home because I have the option of using HDR. Thank you so much.

3 Likes

You can raise scanline saturation like beyond 1.5, but it’s also connected with scanline shapes. If the image gets too saturated, then throw in some clip saturated color beams.

4 Likes

Thank you so much again to all of you :smiley:

2 Likes

Awesome to see you still at work making this shader better by the day. Even though, imo, you pretty much already offered the best shader available from the start of your project.

It’s been a year-or-two since I tweaked my last config. I’m now going to spend my day off catching up here and setting up a new config. 4K this time around. I’ve pretty much moved away from my PC monitor completely.

Your dedication is very much appreciated @guest.r :+1:

7 Likes

Hey @guest.r, @anikom15, I just modified my Turbo Duo preset to Float Framebuffer for all passes and I can’t really say that I noticed a huge difference without an A-B comparison but it just looks and feels perfect. It’s definitely not pixelly for me.

I’m also able to use merge fields or leave it on Auto without seeing the same interlacey artifacts I had mentioned before. This could have something to do with the added precision of the float frame buffer for all passes.

I use the Grain shader from the img mod shader but I’m sure I set it to zero in my last tests when I was getting the anomaly. The easy test is to just use my older preset before the float framebuffer mod but that might have to wait until I get a chance plus I like moving forward.

The overall text and image presentation seems improved. Even the “m” looks better. Again some of this could be placebo. Pics will follow at a later time.

@nesguy, you should try this with you presets and see if you can see a difference.

Another thing I noticed was the accurate looking CRT like interlacing flicker when I was trying to take my photos. I’ve previously had BFI on on my TV and didn’t really notice anything like that but it’s awesome!

I did enable the new RF Noise feature, which is going to completely replace my use of the img mod grain shader. Just have to figure out or get some help to cull it from the pipeline without breaking anything.

I have been experimenting with D3D11, Waitable Swapchain and Max Frame Latency 1 though. @HunterK, is there an equivalent Hard GPU Sync feature available on Vulkan?

Anyway thanks again! Everything seems to be working and working well. You mentioned trying to improve certain things like Resolution scaling, well I don’t know how much better they can get than this.

Again thank you and thanks to everyone else who contributes and shares their time, knowledge and expertise towards making these things better.

All of these photos were taken at ISO 100. Some at Speed 1/60 and others at 1/30.

4 Likes

I need a special Guest to help me out tonight, I’m having some trouble getting this to match my XBR960.

The subject in question is the accuracy of this bottom bar, blended here to match my Dreamcast connected to the XBR960 over Composite video. This requires Interlace Mode 1, 2, or 4

I’d also like to avoid the interlacing bobble, which also makes this bar flicker like crazy (Taxi) for some reason so I’m going with 4.

But this (of course) makes me lose out on the hi-res / VGA / Super Fine Pitch scanlines present on the XBR960. When I enable them here, I lose the blending effect:

This ultimately means I can’t recreate the look of my CRT, despite being so close. Mask 0/5/7 (can’t decide) + VGA mode pretty much nails how the XBR960 displays the Dreamcast, so. Not sure if I’ve missed something, but ideally I’d like something like a “2 height horizontal mask” over Interlace Mode 5.

1 Like

If you are still going after interlacing modes 1-3 or 6, this are some good advices:

  • merge fields
  • set rainbowing to 3.0
  • set ntsc resolution scaling to 0.5

There can be problems if odd/even filed timing isn’t a perfect 1:1, which can happen, as also discussed in an other thread.

If going interlace mode 4, then you can play a bit with internal resolution settings to find the best scanline density. If you have regular scanlines, either by using VGA mode or setting interlaced mode to 0.0, then you are probably OK with 2160p resolution.

With masks you really have plenty of options with your display. I guess you want a somewhat higher TVL, for which mask 10 is pretty close.

I don’t perfecty understand a “2 height horizontal mask”, the only option that fits the description is using a shadowmask with the 0.5 value. These mask are a "“2 height horizontal masks”.

2 Likes

What shader parameters are more taxing on the gpu/cpu currently, with the recent updates and additions?

1 Like

I was just kinda inventing something that isn’t there, because there aren’t visible scanlines in Interlace Mode 4.

I’d like to have the VGA style scanlines display over the top of that, like with Interlace Mode 0, but scanlines (most likely by design) disappear with Interlace Mode 4, so I can’t seem to go about faithfully recreating the way my TV looks with this kind of screen door pattern, plus the blending.

image

The XBR960 displays a progressive image, so Interlace Mode 1/2 won’t be accurate.

And whatever settings I use so I’m able to get that scanlines pattern there, we then lose the ever important blending (Interlace Mode 4 in screenshot; the scanlines just disappear completely):

image

2 Likes

I’m addressing this, but with other “solutions”. I will add a parameter which allows to adjust scanline density. Will only work with scanline mode and not interlacing (precisely interlace mode 0 and 6 will cooperate), but will be compatible with “high res scanlines”, which is basically interlace mode 4 with scanlines.

I guess this will also solve some other situations with 1080p and scanlined high-res content.

1 Like

Well there is also an internal format command the shader authors can use to request the framebuffer that way. I don’t know how that works with float_framebuffer.

Modern video cards are optimized to work with floats now even more than unorms, so it doesn’t surprise me that you see a performance benefit.

2 Likes

I think format conversions shouldn’t matter too much in these situations. Benefits of unorm8 vs. sfloat16 are more or less bandwidth related.

So cherry picked texture formats can make a notable difference with “integrated” gpus, which use system memory.

It’s also to be considered that shader passes can force texure format pragmas, which flagging a framebuffer as float can override.

2 Likes

Can this result in any negative effects?

1 Like