dx12mc-0.12.2+mc1.21.1.jar
Curse Maven Snippet
What's new
Changelog
Note: 0.9.0 is the version that fixes the low FPS problem. On a GT1030 it performs on par with vanilla and is playable, based on in-game testing.
Note: 0.8.8 is the first version intended to initialize git history. Earlier versions were experimental archives used while the renderer changed rapidly, so they were not added to git history.
0.12.2 - Terrain loading
- Put region pages and per-section terrain meshes into a few large shared GPU buffers and send everything built in one frame to bgfx as one update per buffer. In
renderBench uploadson a GT 1030 every separate buffer update costs about 0.4 ms of bgfx render thread time regardless of its size, so rebuilding several pages, creating translucent section meshes and re-sorting translucent indices each cost a separate update before. Sixteen 160 KiB pages per frame took 8.2 ms that way and take 1.7 ms now. - Re-sorted translucent indices go to a new range of the shared index buffer instead of updating each section's own buffer, and freed ranges are reused only after the next frame.
- Rebuild up to 32 regions or 4 MiB of pages per frame instead of 6 regions, and allow 16 section mesh creations and 32 index updates per frame instead of 4 each. Before, sections waiting for their region to be rebuilt were streamed every frame within a 6 MiB budget, and the sections over the budget were not drawn in that frame, which showed as missing or late terrain while chunks loaded. This is what the
skipped draws sectionscounter of the performance log counted. - With
-Ddx12mc.profile.cpu=truethe performance log also reports the game thread time per part of the frame, the bgfx render thread time, and per-frame counts of rebuilds, streamed sections, uploads and skipped draws by reason. It costs nothing when off. - Add a development flight harness (
runHarness) that flies a fixed route in a fresh world in a temporary run directory and logs frame times per phase. It is not part of the mod jar. - In that harness on a GT 1030 at render distance 12, alternating runs of this version and 0.12.1 gave 138 and 92 fps while flying over new terrain, 217 and 191 fps over generated terrain, 191 and 160 fps on a second pass, and 286 fps for both when standing still. Undrawn sections while flying fell from about 1,400 to 9,000 per 5 seconds to 0 to 1,500. Vanilla OpenGL rendering in the same harness reached 231, 281, 247 and 332 fps. These are benchmark results, not in-game measurements, and the frame benchmark capture has no differing pixels.
0.12.1 - API and shader packs
- Add an experimental API for other mods (API version 0.1) in the
dx12mc-apijar, which is also bundled in the mod. Mods register through adx12mcFabric entrypoint and can read whether the renderer is active, its version and the adapter, supply uniform values, and get notified when shader packs load. The API must be used on the render thread. Seedocs/API.md. - Load shader packs from resource packs (
assets/<namespace>/dx12mc/pack.json) with precompiled shaders. A pack can replace the programs of terrain and entity render types, add programs, uniforms and textures, render the world into a G-buffer of up to three extra colour targets, sample the scene colour and depth, and run fullscreen passes before translucent terrain, after the world and before the GUI. Packs reload with F3+T. - Check every pack shader before it reaches bgfx: container header, shader contract, profile, bgfx binary layout, DXBC checksum, stage, vertex attributes, varyings, uniforms and sampler slots. A pack that fails a check or fails while running is disabled with a log line and the built-in shaders are used. Packs from a server are not loaded unless
-Ddx12mc.pack.allowServer=trueis set, and packs may use at most 256 MiB of targets and textures. - Build normal and specular atlases from
_nand_scompanion textures with the block atlas layout and mip levels, only when an active pack asks for them. - Add
compileShaderPack, which compiles a pack with the pinned shaderc, and a sample pack underexamples/sample-packwith a tint override and a normal and roughness override. - The built-in fragment shaders have G-buffer variants that are loaded only for a pack with a G-buffer. The default shader binaries are unchanged.
- In the
renderBenchframe scenario on a GT 1030, alternating runs of this version and 0.12.0 without a pack gave 3.34 ms and 3.36 ms of GPU time, and the capture has no differing pixels. The sample pack cost about 0.55 ms more, a tint override 0.1 ms and a G-buffer pack with one pass 0.66 ms. These are benchmark results, not in-game measurements. - Add
renderBenchpixel checks for overrides, rejected binaries, the G-buffer, depth reads, custom passes, material atlas placement and releasing pack resources on reload.
0.12.0 - Native render targets and post-processing
- Mirror Minecraft's offscreen render targets as bgfx frame buffers. A target gets a colour texture and, when Minecraft asked for one, a depth buffer the first time it is bound or sampled, and is released when Minecraft destroys it. Draws aimed at a target are drawn into it instead of being skipped, and clears of a target are applied to its own view. Before, every draw aimed at a render target other than the main one was dropped.
- Run
PostChain.processon Direct3D 12 instead of skipping it. Thebox_blur,entity_outline,entity_outline_box_blur,blit,invert,color_convolve,bitsandspiderprograms are ported to D3D12 shaders, and each pass reads its uniform values from the vanilla program and post chain JSON. A chain with a program that has no port (Fabuloustransparency) is skipped with a log line. - Enable Menu Background Blur again; its slider is no longer disabled. Frames that show a blur or a spectator effect draw the main target offscreen and copy it to the window at the end; all other frames are drawn as before.
- Draw glowing entity outlines and the spectator effects (creeper, spider, enderman) again.
- Fabulous graphics and panorama screenshots are still not supported. A saved Fabulous setting still loads as Fancy.
- Make
rendertype_entity_alpha(the ender dragon death beams) output the raw texture colour like the vanilla shader. Before, it multiplied in the vertex colour and the shader colour. - In the
renderBenchframe scenario on a GT 1030, alternating runs of this version and 0.11.2 gave 4.28 ms and 4.55 ms of GPU time on average, within the noise of the GPU clock, and the capture has no differing pixels. With the main target redirected and copied back the frame costs about 0.8 ms more, and with the six-pass blur about 4.5 ms more. These are benchmark results, not in-game measurements. - Add
renderBenchpixel checks for the render target round trip, box blur, entity outline mask, creeper and enderman colour passes, target resize, swap chain reset, closing a target twice and the redirected main frame, andeffect=andcompare=options for the frame scenario.
This mod has no additional files

