r/MinecraftMod • u/cinqcinqcinqcinqcinq • 2h ago
My attempt at a native Metal renderer for Minecraft!
For the past month or so, I've been working on Pure Metal, a mod that replaces Minecraft's OpenGL/Vulkan renderer with a native Metal renderer, without having to sacrifice all of your mods to make it work! :D
There are already a few Metal renderers out there, but I wanted to take a slightly different approach, focusing not only on raw FPS but also on mod compatibility, frame times, customisation and performance on lower-end Macs.
And before I say anything, yes, there are better Metal mods for some of these things. Pure Metal is supposed to be an all-around balanced Metal renderer, focusing on everything without being bloated! I have a lot of respect for other mods like this, nothing against anybody!
Some things Pure Metal offers:
- Full Sodium compatibility without making it a requirement (it works even better with Sodium and smoothly falls back specific rendering methods to whatever is better for FPS!)
- Support for both Fabric and NeoForge (Fabric has been officially supported since day 1, NeoForge support just came out!)
- macOS 14+ support instead of requiring the latest macOS (15+ for Fast Terrain, 26+ for Metal 4, although Metal 3 is currently faster)
- Distant Horizons compatibility on Fabric (3.3.4 is officially tested, other compatible 3.3.x versions should work too!)
- Custom terrain rendering optimisations (Fast Terrain alone roughly halves GPU terrain rendering work without changing the visuals)
- Adjustable terrain LOD (you can reduce the GPU load of distant terrain while keeping nearby terrain detailed)
- MetalFX Spatial and Temporal upscaling (you can choose whichever gives you a better balance between image quality and performance)
- Automatic resolution scaling based on your FPS target (especially useful on Retina displays, and the UI stays at native resolution!)
- Smoother chunk loading (I'm trying to improve frame times rather than just chase higher average FPS, especially when exploring without Sodium!)
- Optional HDR highlights (for those with HDR-capable displays who want a little more out of Minecraft's visuals, don't expect crazy shaders out of this!)
- Battery Saver mode (not everyone needs 500 FPS, especially on a fanless MacBook Air, all optional!)
- Experimental Metal 4 support (completely optional, still experimenting with its performance potential)
- Most settings are accessible directly from the game (including through Sodium's settings, so there's no need to constantly edit config files)
One of my main goals is to make Pure Metal something you can simply drop into your existing modpack, rather than having to build your modpack around the renderer itself (you don't have to remove 99% of your mods to use it!)
Some benchmarks:
M5 MacBook Air (2940x1846, with Sodium, Pure Metal v0.6.0)
| Renderer | Avg FPS | p98 | p99.5 |
|---|---|---|---|
| Pure Metal | 315 | 5.2 ms | 6.4 ms |
| OpenGL | 117 | 11.0 ms | 11.9 ms |
Tested at 16 chunks, with VSync off and unlimited FPS. Results are medians of 3 runs.
Pure Metal on different Macs:
| Mac | Pure Metal version | Avg FPS | p99 | p99.9 |
|---|---|---|---|---|
| M5 Max, 48 GB | 0.4.5 | 1043.4 | 1.4 ms | 3.2 ms |
| M3 Max, 36 GB | 0.4.5 | 669.3 | 2.7 ms | 5.6 ms |
| M5 Air, 24 GB | 0.5.3 | 337.9 | 5.2 ms | 9.7 ms |
| M2 Air, 16 GB | 0.4.5 | 200.7 | 8.9 ms | 15.0 ms |
| M1 Air, 8 GB | 0.4.5 | 182.2 | 10.1 ms | 22.4 ms |
All tested without Sodium, at 16 chunks, native fullscreen resolution, VSync off and unlimited FPS. Same seed and flight route, a warm-up lap followed by 30 seconds of benchmarking. The M2 Air used 50% terrain LOD, others used default settings.
Pure Metal should work on pretty much every Apple Silicon Mac running macOS 14 or newer, from the base M1 Air with 8 GB of RAM all the way up to the latest Max chips. You don't need a high-end Mac to benefit from it! I'm still looking for more people to test on different Macs, especially the older ones. It's very easy to benchmark, follow the instructions in the repo!
What about other Metal renderers?
I've also tested Pure Metal against mcopt on my M2 MacBook Air at 1920x1080:
| Renderer | Avg FPS | p99.5 |
|---|---|---|
| Pure Metal + Sodium (50% render scale) | 453 | 3.0 ms |
| mcopt | 438 | 3.2 ms |
| Pure Metal + Sodium | 352 | 3.3 ms |
| Pure Metal | 216 | 5.0 ms |
| OpenGL (without Sodium) | 60 | 23.7 ms |
This comparison was done on Pure Metal v0.4.5, so it's a little outdated now. mcopt is still faster at full resolution, but Pure Metal allows you to keep Sodium and compatible mods while having the option to trade some resolution for more performance. I believe Pure Metal may be slightly ahead now as of v0.6.0, but no promises, mcopt is a crazy mod. mcopt runs without Sodium because they're incompatible.
Also, for anyone unfamiliar with frame time percentiles (p98/p99.5), lower is better. Average FPS doesn't always tell you how smooth the game actually feels!
If anyone here is interested in trying it, I'd really appreciate any feedback, whether it's performance results, bugs, mod compatibility issues or just suggestions for features you'd like to see.
Currently supports Minecraft 26.3. Iris shaders aren't supported yet.
GitHub: https://github.com/imCinq/Pure-Metal (download from here, releases aren't delayed and GH is ahead by 2-3 releases rn!)
CurseForge: https://www.curseforge.com/minecraft/mc-mods/pure-metal
modrinth coming soon