Wiki 9Minecraft Wiki 9Minecraft
Make Your Own Rt Shaders Wiki › Guides › Edit Shader Code for Custom Effects

Edit Shader Code for Custom Effects

Locate Shader Files

Shader files are stored in your shader pack folder, typically in a shaders directory. Look for files with .glsl extensions—these contain the ray-tracing and lighting code.

Understand File Structure

Shader packs organize code into sections: vertex shaders handle geometry, fragment shaders handle color and lighting, and composite shaders combine effects. Start by reading comments in the code—they explain what each section does.

Make Small Changes

Begin with simple modifications: adjust color values (usually written as vec3 or vec4), change numeric constants, or modify conditional statements. Always save a backup before editing.

Test Your Changes

Reload the shader in-game using the shader menu's reload option. Changes take effect immediately. If the shader breaks, revert to your backup and try again.

Reference Video Guides

Use the mod's accompanying video tutorials to understand specific code sections before modifying them. Videos explain ray-tracing logic, shadow calculations, and reflection code in detail.

Start with cosmetic changes before attempting complex algorithmic modifications.