Lottes Dotmask


I’ve been comparing Lottes masks and reading the descriptions in the code, and I wanted to post my observations about what masks are what, this may be wrong:

Legend - Mask #: My Thoughts (Shaders Labels)

Mask 1: Seems to be a Consumer TV Style Shadow Mask (Very Compressed TV Style Shadow Mask)

Mask 2: Seems to be like a Sony Trinitron Aperture-Grille (Aperture-Grille)

Mask 3: Is referenced as Arcade Shadow Mask in crt-lottes (Stretched VGA Style Shadow Mask)

Mask 4: I’m guessing is a VGA Computer Monitor Shadow Mask (VGA Style Shadow Mask)

I was wondering if it would be possible to add a Slot Mask to Lottes Masks. For refrence a Slot Mask is like a Aperture-Grille, but split and staggered like a Shadow Mask.


The slot mask design is very similar to the long-standard consumer television mask design, just applied to computer monitors–and therefore on a much smaller scale–by NEC under the trade name “Cromaclear”. Another name for “slot mask” is “slotted shadow mask”, which refers to the in-line slot design used in these displays as opposed to the “delta” arrangement of a traditional shadow mask.

So, Mask 1 is pretty much what a slot mask would/should look like.

As an aside, while writing this response, I was playing around with Mask 4 and trying to figure out why it’s so low-pitch. It looks much better and is more usable at 1080p if you double the frequency (i.e., halve the scale of the effect), but you lose the characteristic stagger on the phosphors as you run out of pixels to work with. Since the mask function is calculated using the physical monitor’s pixel size (i.e., gl_FragCoord), the solution is that it just requires 4K to look decent, and it actually looks pretty great at 8K-ish (hardscan and hardpix decreased a bit, as the defaults look too blurry at this scale):


Yeah, mask 4 just doesn’t look right at 1080p, it’s like 180 TVL or something ridiculously low. It looks fantastic at 4K and 8K, though! Thanks for posting this example. Yet another good reason to upgrade to a better display.

I’m still seeing some scanline artifacts in that example, but I’m assuming that’s due to the curvature and/or non-integer scaling.

Edit: never mind about the artifacts, looks awesome when fully zoomed in; very realistic! I wasn’t looking at the fully zoomed image before; silly me.


@hunterk Thanks for the info and screenshots.


What is a good shader or combination to mimic a vintage VGA monitor?


VGA monitors typically had a high dot pitch and you’re not going to be able to replicate the mask at 1080p. The masks at 1080p look like the mask on a 20" CRT TV instead of a monitor. VGA monitors were typically dotmask, but a few were aperture grille, and NEC made monitors that were slot mask, as Hunter mentioned. The shot that Hunter posted above looks a lot like a VGA monitor when displaying 240p but the scanlines aren’t quite as strong. If you’re limited to 1080p, you probably want to just go with scanlines and some light horizontal blur if trying to emulate a VGA monitor, IMO.

Check out this shot from Hunter’s blog for reference. Actually, I think my current zfast_crt settings look pretty close to this.


@Nesguy @hunterk

  • zfast_crt.glsl
  • Linear
  • 5x
  • ewa_curvature.glsl
  • Don’t care
  • Don’t care

I liked the result with DOS games…

… but with Windows 3.1 (S3 driver 640 x 480) it got really bad.


That line only seems to happen with nearest scaling on the ewa_curvature pass. If you set that pass to linear, it goes away.


It now looks correct? Is there anything that can be changed?


Looks good to me.

I would darken up the scanlines if going for a VGA CRT look with 240p content. In zfast, setting “scanline darkness low” to 9.00 should do the trick.

I would also maybe sharpen it up a bit by lowering “x-axis blur”, as VGA CRTs are actually quite sharp when displaying 240p. You’ll want to lower this to below 0.30; the exact setting will depend on the dot pitch you’re trying to emulate.

Also, you don’t need to set the scale to 5x, “don’t care” will work fine.


I think he’ll need that since he’s following it with the ewa_curvature shader. Otherwise, it will get an implicit 1x scale, which looks pretty crummy.


you’ll want to do the following for the most VGA CRT-like look possible with zfast:

-scanlines darkness low: 9.00
-mask fade 0.00 to 0.30
-dark pixel bright boost 1.0
-mask effect 0.00 to 0.20
-x axis blur: personal preference, I prefer 0.30 or less.

Provided you can turn up your display’s backlight to compensate for the lost brightness from scanlines, this looks very similar to a VGA CRT in a side by side comparison, IMO.


@Nesguy @hunterk

Following your tip, here the result.

I increased the “dark pixel bright boost” to 1.30.

The only cons is the moiré when in Windows 3.1.



That looks good :slight_smile:

tbh, a little moire is probably appropriate, as actual CRT displays show varying degrees of it IRL, depending on a few different factors.