A post was merged into an existing topic: CD Audio cuts out during attract mode in Shadow of the Beast
Hello, I’ve been trying out this shader on my SDR screen, I’m really impressed with how it alters colors, I’ve never seen another shader that comes as close to the color enhancement of CRTs. Thank you
i’ve tested dozens of shaders and this one consistently looks the best especially with HDR enabled, thank you for your work.

Hi @MajorPainTheCactus, thank you for Sony Megatron. It’s the best CRT/HDR look I’ve seen.
I’m making an iOS/iPadOS video player app with real-time CRT shaders in Metal, and I’ve hand-ported Megatron v2 to it (including the HDR output). I’d love to include it in the public release, with full credit to you in the app and its licence notices.
Since the repo has no licence file, I assume all rights are yours, so I’m asking first: would you allow me to include my Metal port of Megatron v2 in the app, with credit? I’ll gladly take it out if you ever ask.
If there’s a better way to contact you, I’m happy to move this elsewhere. Thank you!
Megatron v2 + HDR10: double processing when RetroArch’s HDR Scanlines option is enabled
Setup:
- RetroArch nightly downloaded 27.10.2026, Windows 11, d3d12 in Retroarch engine
- RTX 5090 using 617.42 Game Ready Driver on a LG G5 OLED (2025) in 3840x2160@120Hz with HGIG tone mapping enabled and all game optimizer boosts and dynamic brightness/tones disabled (Windows HDR Calibration: 2050 nits peak in HDR10)
- Preset: crt-sony-megatron-v2 (source-pass-v2 + crt-sony-megatron-v2) default config version since this one has Peak Luminance and Paperwhite options but all the V2 series does almost the same results.
Issue: With RetroArch’s HDR Scanlines option enabled (Settings > Video > HDR), Megatron v2 in HDR10 output mode looks heavily oversaturated and far too bright, even with Colour Boost set to Accurate. In scRGB mode the same setup looks correct.
What I found:
- When the HDR Scanlines option is enabled, Megatron v2 appears to use RetroArch’s scanline pass, which depends on RetroArch’s HDR luminance / paper white / gamma settings.
- In HDR10 mode, Megatron v2 already handles the HDR encoding itself, so these corrections seem to be applied twice (Megatron’s own + RetroArch’s scanline pass).
- Disabling the Scanlines option fixes HDR10 completely: colours and brightness become correct.
- Leaving it disabled in scRGB mode makes the image extremely dark, so in scRGB it needs to stay enabled (for this shader at least).
Additional note: Toggling this option requires a RetroArch restart to take effect, but the setting’s label does not mention this. I initially assumed the option did nothing, which made the issue hard to track down.
Suggestions:
- In HDR10 mode, Megatron v2 could ignore RetroArch’s scanline pass (or the two should never stack), so users don’t need to toggle the option depending on the output mode (HDR10 or scRGB).
- The option’s label/description could mention that a restart is required or make it togglable without needing a restart of RetroArch.
Thank you very much for all the work you’ve done for this shader and also the team of RetroArch over these past years, you’re seriously amazing !
Would you mind running these tests on your setup?
The above should do.
Also, do be mindful that the new CRT-Guest-Advanced, Adamant as well as the latest CyberLab Guest Legendary and Golden Bezel contain additional subpixel modes which are supposed to support the new 4 Stack Tandem RGB layout of the LG G5 and some newer OLED TVs.
I went ahead and read the proposal. I think it’s making these arguments:
- Existing HDR callbacks are fragmented
- No external cores depend on them yet
- Advanced HDR shaders need a coherent HDR contract
- A single versioned metadata struct is cleaner and easier to extend
- The key missing concept is explicit HDR ownership (passthrough)
- Existing drivers already implement most of the required behavior
- Therefore the API should be consolidated now before third-party adoption
The document argues that the current API is incomplete, but most examples demonstrate missing platform implementations (Wayland, Android, HDR metadata reporting, display capability queries) rather than deficiencies in the core-to-frontend HDR interface itself. I don’t see how that’s an argument to change the interface. What are the pain points of implementing the missing platforms, and how do the proposed changes remove those pain points? I’m not seeing the connection. What engineering problem does moving callbacks to a struct solve?
As for a HDR contract and HDR ownership, I would say that’s already satisfied. Adding explicit indicators adds architectural complexity. Does it have a real benefit? The HDR contract is pretty clear: if the last shader has a 10-bit or 16-bit format, it’s HDR. For cores, ownership already appears to be implied by the existing HDR signaling and callback usage. The proposal should explain which ownership case cannot currently be expressed, i.e. what failure mode exists today that a passthrough indicator would resolve?
As for the peak brightness debate, I would challenge why RetroArch needs to have a built-in inverse tonemapper in the first place. RA should prefer delegating the work of SDR to HDR to the OS, and if that’s not possible, do a simple mapping based on a single target nits (e.g. 0-1 -> 0 to 100 nits). This is easy to understand, easy to validate, requires no ‘peak brightness’, and reduces scope of what frontends need to do. If HDR dedicated cores, shaders, etc. need additional parameters, have them define it as their own options. If someone wants to apply inverse tone mapping or any kind of arbitrary SDR to HDR conversion, dedicated shaders, maintained by people who care about them, can be used. In fact, MajorPainInTheCactus already does this, so he essentially has to implement his inverse tonemapping logic twice. I think it makes a lot of sense to relieve him from that obligation. What would make sense, for the front end to scope, is a setting for a default SDR -> HDR shader that applies to all cores/content that doesn’t have its own shader defined.
Can someone provide a concrete example of a core or shader that cannot be implemented correctly using the current HDR interface but would become possible with GET_HDR_METADATA ? I think that would go a long way to making it clear to everyone why the changes are needed.
I think this is an important distinction worth looking into. If all three phosphor channels have non-zero values in that arrangement, then it seems that all three simulated phosphors are contributing to the displayed red. The overall chromaticity may still be correct mathematically, but the actual subpixel behaviour is a separate question. It would be interesting to compare the individual channel output with a real CRT phosphor response, rather than relying only on the final colour appearance. That might help clarify whether the difference is purely visual or related to the underlying simulation.
Hi guys, I’m trying to get hunterk’s noise/voltage modulation effect working with v1 of megatron. I had it working in the past, but seems recent refactoring of the shader has broken it.
I’ve tried replacing the contents of sony_megatron_v1.h with the content from the pastebin link and also tried adding the lines directly which I believe are these:
float offset_x = noise(sin(gl_FragCoord.xy) * float(mod(global.FrameCount, 361.)));
float offset_y = noise(cos(gl_FragCoord.yx) * float(mod(global.FrameCount, 873.)));
tex_coord = tex_coord + vec2(offset_x, offset_y) * 0.0005;
Neither method works for me and it breaks the shader completely. Anyone know how to update the code for this effect to work with v1 of megatron? Thanks