Alpha Piscium’s rendering pipeline is organized as a sequence of discrete GPU stages that execute every frame. It begins with one-time and per-frame initialization, proceeds through geometry and shadow rendering, and then runs an extensive chain of 85 compute shader dispatches — the composite passes — to produce the final image. Each stage builds on data from the previous one, with the composite chain handling everything from global illumination and atmospheric scattering to tone mapping and anti-aliasing.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Luna5ama/alpha-piscium/llms.txt
Use this file to discover all available pages before exploring further.
composite15.csh) corresponds to exactly one compute shader dispatch. Some passes are conditionally enabled or disabled at runtime based on user settings — for example, water caustics passes are skipped entirely when caustics are turned off.Stage Overview
RGBA8, RGBA16F, RGBA32UI, RGB10A2, and R32F)InitGlobalData.comp.glsl) with constants such as color space transforms, precomputed LUT parameters, and frame countersbegin1 / begin1_a / begin1_b — Render the atmosphere look-up tables: transmittance, sky view, and multi-scattering LUTs that feed the atmospheric scattering system. Sub-passes _a and _b handle slice-by-slice updates.begin2 / begin2_a / begin2_b / begin2_c — Update the cloud ambient LUT for the cumulus cloud layer, integrating sky irradiance for cloud self-shadowing.begin3 / begin3_a — Update the global data buffer (UpdateGlobalData.comp.glsl) with per-frame values: camera position, sun/moon direction, time-of-day, TAA jitter, and previous-frame matrices.begin4 / begin4_a — Clear per-frame screen-space buffers and reset the environment probe accumulation target.begin5 — Clear and prepare the RTWSM importance map buffer (ClearRTWSM) so it is ready to receive importance data during geometry rendering.begin6 (Voxy only, conditionally enabled) — Perform any Voxy-specific per-frame initialization for distant terrain integration.shadow.vsh/gsh/fshshadow_block.vsh/gsh/fshshadow_cutout.vsh/gsh/fshshadow_water.vsh/gsh/fshshadow_entities.vsh/gsh/fshshadowcomp1.csh runs a compute post-process to derive water surface normals from the shadow-space water geometry. These normals are later used when computing water caustics and subsurface light transmission.Terrain
gbuffers_terrain_solid, gbuffers_terrain_cutout, gbuffers_terrain — solid and cutout terrain blocks with PBR material data.Water
gbuffers_water, gbuffers_hand_water — water surface geometry with animated normals and transparency data.Entities & Blocks
gbuffers_entities, gbuffers_block, gbuffers_armor_glint, gbuffers_beaconbeam — entities, block entities, and special effects.Particles & Weather
gbuffers_particles, gbuffers_particles_translucent, gbuffers_weather — particles and weather (rain/snow) overlays.Hands
gbuffers_hand — the player’s held item and arms, rendered separately with a modified depth range.Sky & Misc
gbuffers_skybasic, gbuffers_skytextured, gbuffers_clouds, gbuffers_basic, gbuffers_textured, gbuffers_textured_lit, gbuffers_spidereyes — sky dome and miscellaneous lit geometry.dh_terrain.vsh/fsh — Distant Horizons terrain geometrydh_water.vsh/fsh — Distant Horizons waterdh_shadow.vsh/gsh/fsh — Distant Horizons shadow geometryvoxy_opaque.glsl / voxy_translucent.glsl — Voxy LOD geometry for opaque and translucent surfacesVoxy Merge (composite1)
composite1 is conditionally active), the Voxy LOD colour and depth data are merged into the main screen-space buffers (VoxyMerge.glsl). This blends distant Voxy geometry seamlessly with the vanilla render.HiZ Generation (composite2)
HiZGen builds a hierarchical Z (depth) pyramid from the current G-buffer depth. Each level stores the minimum depth in a 2×2 footprint, enabling efficient ray-marching in the screen-space GI tracing passes.GI Denoiser Edge Classification & Dilation (composite3–4)
GIDenoiserEdgeClassification and GIDenoiserEdgeDilation build an edge mask from the G-buffer that prevents the spatial denoiser blur from crossing geometric discontinuities such as object silhouettes and depth transitions.GI Denoiser Reproject (composite5)
GIDenoiserReproject reprojects the previous denoised GI frame using current-frame motion vectors and accumulates temporal history per pixel.Environment Probe Update — Reproject & Dilate (composite6–7)
EnvProbeUpdate1ReprojectScatter reprojects the previous frame’s environment probe and scatters new sky radiance. EnvProbeUpdate2ReprojectDilate (pass 1) dilates valid probe texels to fill gaps from reprojection.Shadow Sample Setup (composite8)
ShadowSampleSetup precomputes per-pixel shadow UVs and blocker distances in RTWSM-warped shadow space, preparing data for the shadow sampling passes later in the pipeline.Screen Pixel Size Evaluation (composite9)
EvaluateScreenPixelSize computes per-pixel screen-space footprint information used later for adaptive sampling decisions in the GI and shadow systems.Water Caustics (composite10–12)
SETTING_WATER_CAUSTICS is defined. Three passes implement a photon-tracing approach:- composite10 —
CausticsPhotonTrace: traces photons from the sun through the animated water surface. - composite11 —
CausticsRemap: remaps photon landing positions into screen space. - composite12 —
CausticsFilter: filters the photon splat buffer to produce smooth caustic patterns.
Volumetric Clouds (composite13–14)
SETTING_CLOUDS_CU is defined. RenderVolumetric (composite13) renders the cumulus cloud layer using the Nubis technique, with physically-based in-scattering and self-shadowing. Accum (composite14) accumulates and upscales the cloud render.Shadow Sampling — SSS (composite15)
ShadowSampleSSS applies PCSS filtering and subsurface scattering shadow transmission (conditionally enabled for high SST step counts).Sky Composite (composite16)
SkyComposite blends the rendered sky (using the precomputed sky-view LUT from the begin passes) into pixels not covered by opaque geometry, and handles the sun disc and moon.Shadow Sampling — Main (composite17)
ShadowSample applies PCSS percentage-closer filtering across the computed penumbra radius to produce soft, contact-hardening shadows.Environment Probe Update — Dilate Pass 2 (composite18)
EnvProbeUpdate2ReprojectDilate, pass 2) continues filling probe gaps before the gather step.Direct Lighting (composite19)
DirectLighting evaluates direct sun/moon/sky illumination for every G-buffer pixel, incorporating the shadow visibility computed in the RTWSM/PCSS passes, the atmospheric transmittance from the sky LUTs, and PBR specular/diffuse BRDFs.Environment Probe Update — Gather & Project (composite20–21)
EnvProbeUpdate3ReprojectGather gathers irradiance into the environment probe. EnvProbeUpdate4ProjectCurrent projects the result for use this frame, providing a temporally-stable sky irradiance fallback for pixels with insufficient GI screen-space history.DoF Auto-Focus (composite22)
DOFFocus reads the depth at the screen centre and feeds an exponentially smoothed focal distance to the DoF pass later in the pipeline.ReSTIR GI — Initial Sample (composite23–25)
- composite23 —
GIReSTIRInitalSampleRayGenTrace: generates candidate ray directions and traces them using the HiZ pyramid. - composite24 —
GIReSTIRInitalSampleRaySort: sorts rays for improved GPU coherence. - composite25 —
GIReSTIRInitalSampleRayFinishTrace: completes ray tracing after the sort.
ReSTIR GI — Temporal Reuse & Decorrelate (composite26–27)
GIReSTIRTemporalReuse (composite26) reprojects the previous frame’s reservoirs onto the current frame and merges them with the new initial samples, up to the configured temporal reuse limit. GIReSTIRDuplicationMapDecorrelate (composite27) reduces structured noise via duplication-map decorrelation.ReSTIR GI — Spatial Reuse (composite28–35)
composite28–composite35), each running GIReSTIRPairedSpatialReuse, gather samples from neighbouring pixels. The number of active passes is controlled by SETTING_GI_SPATIAL_REUSE_COUNT.ReSTIR GI — Shading & Ray Sort (composite36–38)
GIReSTIRPairedSpatialShade (composite36) evaluates the final weighted GI contribution from the merged reservoir and writes the indirect irradiance buffer. GIReSTIRSpatialReuseRaySort (composite37) and GIReSTIRSpatialReuseTrace (composite38) perform an additional ray sort and trace pass for spatial reuse quality.GI Denoising — ReBLUR (composite39–44)
- Accumulate (
GIDenoiserAccum, composite39) — blends current and history with adaptive weighting. - Anti-Firefly (
GIDenoiserAntiFireFly, composite40, optional) — suppresses bright outlier samples via RCRS. - GI Mip (
GIDenoiserGIMip, composite41) — builds auxiliary mip data for the spatial filter. - History Fix (
GIDenoiserHistoryFix, composite42) — repairs disoccluded regions that lack valid temporal history. - Blur (
GIDenoiserBlur, composite43) and Post-Blur (GIDenoiserPostBlur, composite44) — apply the main and secondary spatial blur passes (optional).
Volumetrics Depth Layers (composite46)
VolumetricsDepthLayers computes the depth layering needed for local volumetric fog and atmospheric in-scattering integration.Atmospheric Scattering — Epipolar (composite47–48)
- composite47 —
EpipolarScatteringAir: integrates in-scattering along air segments emanating from the sun’s screen-space position. - composite48 —
EpipolarScatteringWater: integrates in-scattering through water volumes.
Translucent Compositing (composite49–51)
TranslucentBackComposite(composite49) — blends back-face translucent contributions.TranslucentSST(composite50) — applies screen-space tracing for refraction beneath translucent surfaces.TranslucentComposite(composite51) — blends front-face translucent contributions with absorption-based tinting.
RTWSM Importance Map Collapse (composite52)
IMapCollapse collapses the RTWSM importance map built during geometry rendering, preparing the warp function for the next frame’s shadow pass.Volumetrics Local Composite Break Fix (composite53)
VolumetricLocalCompositeBreakFix (optional, SETTING_DEPTH_BREAK_CORRECTION) corrects depth-break artifacts at geometry edges in the volumetric local composite.Depth of Field — Prepare (composite54)
SETTING_DOF is defined. DOFPrepare tiles the depth buffer and classifies pixels as in-focus or bokeh candidates for the physically-based circle-of-confusion blur using the focal distance from the auto-focus pass (composite22) or a user-set manual value.TAA — Prepare & Resolve (composite55–56)
- TAAPrepare (
TAAPrepare.comp.glsl, composite55) — computes motion vectors and prepares neighbourhood colour clamping bounds. - TAAResolve (
TAAResolve.comp.glsl, composite56) — reprojects the previous accumulated frame, blends with the current frame using adaptive clamping, and outputs the resolved TAA result.
FXAA & RCAS Sharpening (composite57–58)
FXAA.comp.glsl, composite57) smooths any remaining sub-pixel aliasing. Robust Contrast Adaptive Sharpening (RCAS.comp.glsl, composite58) then recovers fine detail softened by TAA.Bloom (composite59–77)
Post Composite (composite78)
PostComposite assembles bloom, Purkinje effect, and exposure into the final tone-mapped image, applying the AgX-inspired display render transform for colour management.Exposure — Mip & Gather (composite79–80)
ExposureMip (composite79) builds a luminance mip chain and ExposureGather (composite80) computes the final auto-exposure value with a configurable adaptation curve.Overlay Composite (composite81)
OverlayComposite applies Minecraft’s overlay effects (damage flash, night-vision tint, darkness vignette, etc.) over the full composited scene.RTWSM Warp Finalization (composite82–84)
IMapBlur (composite82) blurs the importance map, GetWarp (composite83) derives the 1D warp function, and Write2DWarp (composite84) bakes it into a 2D lookup texture.Final Global Data Update (composite85)
FinalGlobalDataUpdate writes end-of-frame values (such as the updated exposure and TAA history pointers) into the global data buffer for use next frame.Pass Dependency Graph
The table below summarises which major systems feed which downstream passes:| Upstream Stage | Consumed By |
|---|---|
| Begin atmosphere LUTs | Shadow sampling, direct lighting, sky composite |
| RTWSM importance map (begin5) | Shadow geometry warp (shadow pass) |
| Shadow map (shadow pass) | Shadow sample setup & sampling (composite8, 15, 17) |
| G-buffer depth/normals/albedo | HiZ generation, ReSTIR GI, direct lighting, DoF |
| HiZ pyramid (composite2) | ReSTIR GI ray tracing (composite23–38) |
| GI denoiser reproject (composite5) | GI accumulate (composite39) |
| ReSTIR irradiance (composite36) | ReBLUR denoiser (composite39–44) |
| Denoised GI (composite39–44) | Direct lighting composite (composite19) |
| Direct + indirect lighting | Translucent composite, sky composite |
| Full composited image | TAA (composite55–56), DoF (composite54), bloom (composite59–77) |
| TAA output | FXAA/RCAS (composite57–58), bloom, post composite |