
Vodium
Vodium adds a lot of optimizations (render, physics and chunk systems optimized) & simple shader-system to Minecraft.
Список изменений
0.7.0 — the shader system, rebuilt
A shaderpack used to be a single file with a single function. That ceiling is gone.
Packs are now directories
terrain.fsh is still the only required file, but next to it you can put terrain.vsh for the vertex stage, composite1.fsh through composite8.fsh plus final.fsh for your own full-screen chain, and any number of .glsl files pulled in with #include. Single-file packs keep working exactly as before.
Pack settings
A line like #define SHADOW_SOFTNESS 1.5 // [0.5 1.0 1.5 2.5] Shadow softness becomes a button under Video Settings — Vodium — Pack settings. The syntax is the one Iris and OptiFine authors already know, and values are stored per pack in config/vodium-shaders.properties. Changing one rebuilds the pack, because these are real macros — a feature you switched off costs nothing at all.
Vertex stage
vodium_vertex_offset(worldPos, normal) returns a displacement, which is what waving grass, leaves and water are made of. It is a displacement and not the whole vertex stage on purpose: chunk positions are already rebased to the region corner, and a mistake there would break geometry and chunk loading rather than colour. The offset is clamped to one metre — a vertex leaving its own section gets culled, and that reads as a flickering hole.
Buffers between passes
Passes talk to each other through colortex0..colortex5 in RGBA16F. Every buffer is double, so reading and writing the same colortex in one pass is fine. Without this there is no bloom, no volumetrics and no temporal anything. A pass can also declare /* SCALE: 0.5 */ and run at quarter the pixel count — blur is blurry by definition and a full-screen pass is mostly memory bandwidth.
World state
Camera, matrices for this frame and the previous one, sun and moon, weather, potion effects, light at the eye, moon phase — under the names Iris packs already use, so code moves across without renaming. Plus a noise texture and a helper library: waves, soft shadows, procedural ripples, ACES, GGX, reprojection.
The Realism pack ships with the mod
Water with waves, Fresnel and sun glint; volumetric clouds marched through the layer; light coloured by time of day; wet surfaces in the rain; bloom and film tonemapping. 24 settings. It appears in your shaderpacks/ folder on first launch after updating.
It is also the worked example of what this API is for, written with an eye on cost: three of its four passes run at half resolution, transparent pixels are discarded before any lighting is computed, and the shadow map is not sampled at all for faces turned away from the light.
Fixes
Stretched geometry with shadows on. The shadow pass drew the translucent layer too and bound the shared index buffer into its VAO, destroying the binding the main pass had put there and cached. Water was then drawn with someone else's indices — arbitrary vertices, spikes across the map. Water and glass no longer cast shadows, which is also correct on its own.
Shadows that would not sit still. The shadow map now snaps to its texel grid instead of sliding with the camera, uses the moon below the horizon instead of building itself from underground, and picks regions by distance rather than by what the camera happens to be looking at.
Undefined texture sampling in the vertex stage (texture with implicit LOD, which has no derivatives there) and a guard against non-finite vertex offsets.
Only 1.20.4 for now — the 1.20.1 branch does not carry the shader work yet.
