logoalt Hacker News

wallstoptoday at 6:19 PM2 repliesview on HN

From my experience with game engines and people that really care about CRTs - I believe the effect (confidence: 95%) can be entirely achieved with rendering glue in any of the modern game engines - Unreal, Unity, Godot, etc. Now, whether or not it is a literal shader, or a shader + custom sauce, not sure.

However, I have not tried, so I cannot verify that claim to 100% accuracy. The author ...might have tried? They definitely surveyed the landscape. My read of the article was that they went down this rabbit hole and back-justified it instead of investing a similar amount of time in a practical solution in a modern engine.

CRT look and feel is a niche full of very passionate and opinionated people.


Replies

danwilsonthomastoday at 7:53 PM

I've done a version of this in Godot. It's kind of a hack, but it works and it's all Nodes without needing a script. You could do it more easily in a compositor effect but you have to deal more with the guts of the engine.

The basic idea was to use a chain of Viewports and TextureRects using the previous ViewportTexture to do the effect. This is essentially just setting up a chain of framebuffers that I can draw on top of at each step. The first step just does a simple calculation to convert the incoming color to an "energy" value with a simple shader on the whole frame. Then there are two decay viewports that feed each other to decay the old frame and overlay the new one. These just have a decay parameter that I can tweak to get different effects. There's a final Viewport that supersamples everything because I'm going for more of a vector display look than a CRT. And I can layer on other effects at either the energy state (like decaying phoshpor) or at the final stage (like flicker or screen curve).

Here I've exaggerated the decay quite a bit so you can see the effect. https://www.youtube.com/watch?v=2ZrvcZIfqOI The trails there are entirely from this effect. I'm only rendering the spinning figure. You can also see where lines overlap they are brighter than the surrounding lines because I cap the maximum energy value in the first layer.

user68858788today at 6:34 PM

Do you have an example? I’ve done a slightly-more-than-casual search for convincing post-processing and haven’t found success. Filters still tend to retain the sharpness of pixel edges in a way that CRTs don’t, and the contrast doesn’t look right either.

show 3 replies