Mega Bezel Reflection Shader! - Feedback and Updates

@HyperspaceMadness

Which pass is the vignette in? I’d like to compare how your implementing it, as me and Dogway are applying it differently from each other.

Also could you point me to the mame phosphor persistence as well? (There’s so much code to wade through, lol.)

Edit: Found both but now I’m trying figure out where it actually applies the phosphor persistence.

1 Like

Amazing update! I love the LUT colors.

3 Likes

It’s in the first pass :slight_smile:

2 Likes

@Syh [quote=“Syh, post:858, topic:25512”] use scanline resolution multiplier from my repo [/quote]

Does this work in slang shaders and is there a link to it? I can’t find it.

1 Like

Phosphor persistence looks great… on a real CRT. Crappy modern LCD/LED panels have their own, unavoidable, motion blur because they are crappy modern panels. Not sure if i would want these kind of effects on top of that :stuck_out_tongue:

Hello all!

Nintendo Super Famicom!

3 Likes

Sounds like this feature is not for you then, luckily it is off by default.

I’ve updated the shader with better defaults for the persistence, I had made a mistake that @frenki had kindly pointed out.

Here’s what the new default is, the blue has more persistence than the others, I set this way after looking at a few videos of vintage crts, including Galaga & Smash TV

5 Likes

Are LUT colors closer to the “real” thing? Or is it just a preference? They seem to look more vibrant.

@HyperspaceMadness Great update and I love having the phosphor blur to play around with. I played around with it last night and I have a few questions:

-The LUT set to 1 looks great but kills the contrast in blues. I have included a screenshot. Is this supposed to happen? Perhaps I don’t understand what a LUT is.

-Pre-CRT Black Level with a positive crushes the image with too much black.

-Negative Crop Brightness, I can’t figure out what it does. I don’t see it changing the image.

Here are examples from the opening level of Alisia Dragon on the Genesis. First is default settings with the HSM venom shader but LUT set to 0. Next is LUT set to 1 and finally pre-CRT black level set to 0.05

Thank you for all your hard work HyperspaceMadness.

1 Like

Productive weekend everyone!

1 Like

I’m not sure it it ends up being more real or not. They are colors from a specific tv model torridgristle created.

To my eye they fix a lot of the blues which look a bit purple.

The lut colors are on, and with my last update this morning the color temperature is dialed to -50 so is a bit cooler.

1 Like

That’s interesting, as I’ve always heard that the red phosphor decays at a much slower rate, and that appears to be corroborated in published rates of decay: the decay rate (to 10% luminance) of the standard blue phosphor (known as P22B) is ~25 microseconds vs green (P22G) at ~60 microseconds and they’re both much, much faster than red (P22R) at a whopping ~850(!) microseconds. (scroll down to table 6-2 for details)

Now, I believe that’s just for the amount of time that it’s luminescing (as these numbers are far too small be visible across multiple frames, even for red), and the real issue is phosphorescence (aka “emission time” or afterglow), and that apparently has more to do with the activator material that the phosphor material is doped with, but in this case, too, the one used in red phosphors (Europium) has a “very long” afterglow vs “short” for silver and “long” for copper used in blue and green phosphors, respectively.

I think this video supports that, with the blue of the sky fading to nothing after just 1 or 2 scanlines, while the green trees hang around a lot longer and the reddish Mario and ground pixels hang out even longer than that.

To be fair, though, red and green are fading out much faster than a full frame in that video, too, so there may be some other effect at play–maybe having to do with responsiveness of rods/cones in the human eye and/or photoreceptors in cameras–but if so, that does lead me to wonder if videos can be reliable. Dunno :man_shrugging:

3 Likes

I have noticed that in many games, especially in arcades. The blue sky in Final Fight for example.

2 Likes

Yeah it’s really hard to know. I based my values on what I saw in some videos of Galaga, and another one of smash tv. Some sort of persistence or after image goes over about 3-4 frames max

Here the arrows are over each visible frame of the end of the rocket

2 Likes

I think you might want to take into consideration the luminance components for the P22 phosphors:

0.4665636420249939 0.25661000609397890 0.005832045804709196

that’s the transformation, the current primaries are:

0.640, 0.282, 0.146

As for these coefficients the red phosphor has almost double the luminance component than green.

2 Likes

Yeah, a LUT is a look up table, which means I take a current color, then look it up in a table of defined colors that it should map to. Exactly how accurate it is I’m not sure. What seems like the case is that a lot of the really deep blues that are in the original before the LUT are applied may not really be the expected color, but in the end it’s hard to know without vintage hardware to check against, and color calibration is a really tricky thing, I’m interested in looking at Dogway’s stuff as it seems like he has gone into all the details.

Here are some examples, I find in general that the LUT is making stuff look more natural.

Afterburner LUT Colors OFF

Afterburner LUT Colors ON

Sonic Title LUT Colors OFF

Sonic Title LUT Colors ON

Sonic - LUT Colors OFF

Sonic - LUT Colors OFF

Super Metroid - LUT Colors OFF

Super Metroid - LUT Colors ON

If you use negative cropping to push the edge of the crt image in from the edge of the tube Negative Crop Brightness adjusts the newly revealed empty area at the edge of the screen so it matches the blacks in the screen image because the blacks in the image won’t be black anymore if the black level is < 0. The Black level < 0 is mostly there so that you can get faint scanlines to appear in the black area.

You are totally right that the pre-crt black level is totally broken when used with values greater than 0. I’ll fix this.

4 Likes

Thanks for pointing this out, how would this be applied in the shader, just keeping in mind that the luminance is different between them?

When you refer to the current primaries, where are you talking about?

2 Likes

I agree the Lut looks more natural but when I see the contrast in blues blurred the OCD part of me cries out that I’m missing some pixels. It’s irrational since it only happens on a small number of games but it still drives me a little nuts.

2 Likes

In playing around with some motionblur shaders, the thing that looks the closest to your shots seems to be just basing the persistence on the luminance value of the pixel. That seems to be more important than the color/material.

2 Likes

But the luminance is based on the emulated primaries. For P22 the red phosphor adds more to the luminance than the green. The eye cone receptors are more sensible to green colors, so you have to subtract the P22 RGB luminance components to the eye’s cone RGB response, which matches those of Rec.709.

R'G'B' P22 (phosphor response)
0.640, 0.352, 0.008
0.282, 0.620, 0.098
0.146, 0.061, 0.793

RGB Rec.709 (cone respone)
0.212655, 0.715158, 0.072187
2 Likes