This repository presents a shaderpack for Minecraft 1.21 with Iris that implements path traced global illumination (PTGI) and spatiotemporal variance guided filtering (SVGF) for image denoising / reconstruction.
- Path traced global illumination (PTGI)
- Spatiotemporal variance guided filtering (SVGF)
- Temporal Anti-Aliasing (TAA)
- Temporal reprojection & motion buffers
- Upscaling
- Sky
- Volumetric clouds
- Day/night cycle
- Bloom
- Weather and raining
- Color grading
- Tonemapping
- Gamma correction
This shader is not finished but may be of use to anyone who wants to grab parts of the pipeline for their own project or enhance the visuals of this shader.
- Better TAA with motion buffers
- Increase ray tracer performance / efficiency (e.g. MIS)
The shader contains multiple bugs and exhibits weird behavior sometimes especially when there is little light which makes the denoiser go crazy and flicker the pixels. Level of details could improve issues when you look far away and the blocks flicker because of aliasing in the ray buffer. The brute force way to solve this issue is increasing the number of rays. Another weird bug happens when travelling far away from the spawn (0, 0, 0), the blocks become dark, I have no idea why, but it comes from the path tracer, very likely the position buffer. You can run the shader with 1 sample per pixel (1 SPP) and 2 bouces for the cost of flickering at grazing angles and on farway blocks. 6 SPP and 4 bounces create a very clean result with almost no noise visible.
The main feature of this shaderpack is path tracing global illumination which computes lighting in a realistic way by tracing rays through the scene and bouncing them until they hit a light source. This shader shows a hybrid renderer based on OpenGL. In order to keep world data around for path tracing I use voxelization by hijacking the shadow pass to compute a voxel map that stores the 3D world blocks into a 2D texture using uniform grids. We can ray trace this texture later in the pipeline at shading time in fullscreen passes. In order to smooth path tracing results, SVGF helps reduce noise by filtering across space and time the global illumination buffer (ray traced results without albedo / textures) to output a smooth image. TAA is used at the end of the pipeline to remove unwanted aliasing artifacts near the edges.
- Install Iris here
- Go to
.minecraft
folder - Place the shaderpack inside the folder
shaderpacks
- Iris
- Minecraft 1.21
- NVIDIA GPU
You do not need a RTX graphics card to run this shader. Feel free to take this shader or part of it for use in your projects. This shaderpack does not work on Apple Silicon MacBooks because geometry shaders are not supported.
This shader has been heavily inspired by Sonic Ether's video on path traced global illumination for SEUS in Minecraft. However, this shaderpack does not borrow any code line from the SEUS shader.
I would also like to thank coolq1000 without whom this shader would have never existed.