A guide to writing core and post-processing shaders for Minecraft Java Edition 26.3 with a resource pack, no mods.
Every statement here is either checked against the game's code, reproduced by an experiment you can run yourself, or explicitly marked as unverified.
- Writing shaders for 26.3: how the game loads shaders, and the rules a shader must follow to load.
- Working on a shader pack: the edit, check, reload loop, and where to find errors.
- Post effects:
end_of_frame,/posteffect, the JSON format, samplers, uniforms and depth. - How a frame is drawn: the drawing order, and what each core program draws, with screenshots.
- Techniques: texture markers, telling GUI from world, isolating GUI elements, translucency with Improved Transparency, tagging pixels for post effects, passing data from datapacks, light levels, camera / world position / FOV, detecting the Nether, sending positions to post effects, restyling glowing outlines, replacing includes, animating, depth, displacement.
- Sodium: what the Sodium mod changes for a shader pack, and how a pack can support it.
- Porting to 26.3: method, checklist, and what changed version by version since 1.21.8.
- What changes in 26.4: what the 26.4 snapshots break or add, tracked ahead of the release.
- Reference, generated from the game:
- Core shader programs: for each program, its pipelines, defines, available uniforms (with the
#ifdefthat guards each one) and vertex inputs. - Uniforms: every uniform block (with its std140 layout) and sampler.
- Render pipelines: all 192 of them.
- Core shader programs: for each program, its pipelines, defines, available uniforms (with the
- Examples: complete packs with screenshots (terrain wave, depth outlines, emissive entities, emissive glow, atmosphere, thick outlines, text effects, GUI theme, world anchor, procedural sprite, data bus, scattered sky, water reflections, sun lighting, screen-space shadows, waving plants, temporal accumulation, coordinates, minimap).
- Experiments and their results, in game on OpenGL and Vulkan.
- Tools:
mcshaders checkvalidates a pack the way the game does, without launching it.
Requirements: macOS, Java 25+, Python 3, and Minecraft 26.3 installed once with the official launcher.
tools/mcshaders check path/to/your/pack # compile and validate your shaders like the game does
python3 tools/examples.py emissive-glow --out ~/Desktop # build an example pack to try in gameTested on macOS (Apple M4 Pro): OpenGL 4.1 Metal and Vulkan through MoltenVK. Other GPUs and drivers are not covered yet. The tools run on macOS only for now.
A GitHub Actions workflow downloads the 26.3 client from Mojang. It then checks, without launching the game, that vanilla shaders and every example pass tools/mcshaders check, that every experiment still gets its expected verdict, that the generated reference is up to date, and that every link resolves. The in-game results come from local runs and are recorded in RESULTS.md.
Tools under MIT, documentation under CC BY 4.0, example and experiment shader code under CC0. Details in LICENSE.md.
Not an official Minecraft product. Not approved by or associated with Mojang or Microsoft. This repository contains no vanilla Minecraft files and no Sodium files: the tools read them from your own installation and from the Sodium jar.