A comprehensive ray tracing mod for Minecraft that provides hardware-accelerated RTX features using modern OpenGL and compute shaders.
- Hardware-accelerated ray tracing with support for NVIDIA RTX, AMD RDNA2+, and Intel Arc GPUs
- Real-time global illumination with configurable bounce lighting
- Ray-traced reflections with multiple quality settings
- Ray-traced shadows with soft shadow sampling
- Ambient occlusion with screen-space and ray-traced methods
- Temporal upsampling for improved performance
- AI-based denoising to reduce ray tracing noise
- Dynamic render scaling (50%-200%)
- DLSS-like upscaling using compute shaders
- Adaptive quality based on GPU capabilities
- HDR rendering with tone mapping
- PBR material system (roughness, metallic, emission)
- Motion vectors for temporal effects
- G-buffer rendering with multiple render targets
- In-game settings via ModMenu integration
- Real-time shader reloading for development
- Debug visualization modes
- Hardware capability detection
- R: Toggle RTX on/off
- F5: Reload RTX shaders (for development)
- Java 17+
- OpenGL 4.6 compatible GPU
- 8GB RAM
- Fabric 1.20.4
- NVIDIA: RTX 20/30/40 series, GTX 1660/1070/1080
- AMD: RX 6000/7000 series (RDNA2/RDNA3)
- Intel: Arc A-series (DG2)
- 16GB RAM
- Fabric 1.20.4
- Install Fabric Loader for Minecraft 1.20.4
- Download and install Fabric API
- Optional: Install ModMenu for in-game configuration
- Place the RTX Mod JAR file in your
.minecraft/modsfolder
RTXRenderer
├── RTXCapabilities - GPU detection & feature checking
├── RTXShaderManager - Shader compilation & management
├── RayTracingPipeline - Main ray tracing compute shaders
├── PostProcessingPipeline - Denoising, temporal accumulation, tone mapping
├── SceneManager - World data organization for ray tracing
└── RTXFrameBuffer - Multi-target HDR framebuffers
- G-Buffer Generation: Traditional rasterization for primary visibility
- Ray Tracing Pass: Compute shader for lighting, reflections, and GI
- Temporal Accumulation: Progressive refinement across frames
- Denoising: AI-based noise reduction using G-buffer data
- Tone Mapping: HDR to LDR conversion with exposure control
- Upscaling: Optional AI upscaling for performance
- G-Buffer:
gbuffer.vert,gbuffer.frag- Primary visibility - Ray Tracing:
raytracing.comp- Main ray tracing compute shader - Temporal:
temporal_accumulation.comp- Frame accumulation - Denoising:
denoising.comp- AI-based denoising - Tone Mapping:
tonemap.vert,tonemap.frag- HDR processing - Upscaling:
upscaling.comp- AI upscaling
# Clone the repository
git clone <repository-url>
cd minecraft-rtx-fabric-mod
# Build the mod
gradlew build
# The compiled JAR will be in build/libs/The mod creates a configuration file at .minecraft/config/rtx-mod.json with these options:
{
"rayTracing": {
"enabled": false,
"maxBounces": 3,
"samplesPerPixel": 4,
"distance": 128.0
},
"globalIllumination": {
"enabled": true,
"strength": 1.0,
"samples": 16
},
"reflections": {
"enabled": true,
"strength": 1.0,
"quality": 1
},
"performance": {
"renderScale": 100,
"temporalUpsampling": true,
"denoising": true
}
}This mod uses:
- Fabric API for Minecraft integration
- Mixin for hooking into the render pipeline
- LWJGL 3.3.3 for OpenGL access
- JOML for math operations
- ModMenu for configuration GUI
RTXRenderer: Main rendering coordinatorRTXCapabilities: Hardware detectionRTXShaderManager: Shader compilation and managementRayTracingPipeline: Core ray tracing implementationPostProcessingPipeline: Post-processing effects
GameRendererMixin: Key binding handlingWorldRendererMixin: Main render loop integrationRenderSystemMixin: Window resize handling
This project is licensed under the MIT License. See LICENSE file for details.
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
"RTX not supported": Your GPU doesn't support hardware ray tracing. The mod will fall back to software ray tracing with limited functionality.
Low FPS: Try reducing render scale, samples per pixel, or max ray bounces in the configuration.
Shader compilation errors: Make sure you have updated GPU drivers and OpenGL 4.6 support.
Enable debug mode in the configuration to see:
- RTX capability detection results
- Shader compilation logs
- Performance metrics
- Hardware information
- Minecraft Fabric development team
- LWJGL for OpenGL bindings
- JOML for math utilities
- Ray tracing algorithm research and implementations