Pastifier/miniRT
Pastifier/miniRT has 35 GitHub stars and 1 forks. GitHot measured 0 stars in 24 hours and 0 in 7 days. Last checked 2026-11-09 15:48 UTC. Last push 2026-05-12.
miniRT is the final C project of the 42 Common Core: our very first ray-tracer. Our miniRT focused on optimising CPU-rendered graphics, to achieve a real-time renderer with movement controls and extra options
Measured star growth
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- Collecting history
- in 1 month
- Collecting history
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
Original🌌 miniRT 🌌
A stunning real-time raytracer built from scratch!

Simple vaporwave scene rendered using miniRT
🖼️ Gallery
Some of the cool stuff you can do in miniRT

🌍 Create Your World
Write your own .rt scene files to populate your world with:
- Custom shapes, textures, and bump maps.
- Dynamic lighting and shadows.
- Ambient Global Colour
Example .rt file:
C 0,0,-10 0,1,0 90
sp 0,0,0 1.0 255,0,0
L 5,10,-5 1.0 255,255,255
A 0 0,0,0
✅ Prerequisites:
- A Processor that supports AVX/AVX2 (ARM chips not supported)
- Make (software to build your project)
- X11, OpenGL (Linux)
- OpenGL, Appkit (MacOS)
- WSL (To run on Windows as a Linux container. Linux prerequisites apply)
🚀 Getting Started
Clone the repository:
git clone https://github.com/Pastifier/miniRT.git cd miniRTBuild the project:
makeRun the raytracer:
./miniRT <scene_name.rt>Replace
<scene_name.rt>with the name of your.rtscene file. Explore pre-made scenes or create your own for limitless creativity!
✨ Features
🖼️ Ray Tracing
- Handles intersections with multiple shapes:
- Spheres, planes, cylinders, cones, and cubes.
- Full support for:
- Ambient, diffuse, and specular lighting.
- Reflections/Refractions
- Shadows and customizable spotlights with light falloff.
🎥 Interactive Camera and Translatable-Objects
- Camera Mode:
- Real-time camera movement with smooth rotations and translations.
- Camera-controls:
- WASD: move around.
- Space/Shift: Elevate/Descend (respectively).
- Arrow-keys: Rotate
- ESC in Camera-Mode exits the program.
- Select Mode:
- Left-click objects to select them.
- Object-controls:
- R: toggle reflections/refractions.
- WASD: move around.
- Space/Shift: Elevate/Descend.
- ESC in Select-Mode goes back to Camera-Mode.
🎨 Textures and Bump Mapping
- Bump mapping for intricate surface detail using normal maps on spheres and planes.
- Support for XPM textures to bring your scenes to life.
💡 Spotlights
- Customizable cone angles based on the spotlight's spot angle for realistic light falloff.
📈 Performance Optimizations
- Multithreading: Efficient thread distribution for high-speed rendering.
- LERP'ing:
- Skip pixels and compare the colours of the surrounding pixels.
- If the difference is below a certain threshold, interpolate the colours, otherwise, shoot the rays.
- Our Very Own SIMD Linear Algebra Library:
- Optimized 4x4 matrix operations for raytracing.
- Features the
lag_mat4s_get_transform_inverse()function for lightning-fast decomposed matrix inversions.
🔍 Benchmarks
- Simple scenes: ~(12-36)ms per frame (~25-83 Frames Per Second).
- Complex scenes with multiple normal map textures: Under 200ms per frame (~5-10 Frames Per Second).
Benchmarked on typical scenes including multiple objects and light sources.
🔧 Technical Details
- Rotations:
- Quaternion extraction for seamless orientation.
- Axis rotation using Rodrigues' formula.
- Deltatime integration for fluid motion.
- Custom Parsing:
- Read
.rtscene files to define objects, lights, and camera configurations.
- Read
- Thread Pool:
- Reuses threads for every frame to minimize initialization overhead.
- Math Library: LagAMat
- Used efficient memory manipulations and mathematical tricks, made available by the use of unions.
- Broke down matrices into scale and translation vectors, and rotational component, to cut the cost of calculating a general matrix inverse as it's not needed.
🎯 What Makes our miniRT Unique?
- Advanced yet approachable real-time rendering capabilities.
- A dedicated linear algebra library optimized for simplicity and performance.
- Efficient mathematical solutions built exclusively for this project.
📜 Acknowledgments
- This project is part of the 42 School curriculum, using the homebrewed MiniLibX Graphics Library.
- A huge thanks to our fellow 42-students for their support and encouragements, and especially h-sarhan's miniRT. Which was a huge inspiration, and showed us what this project is capable of!
- The Ray Tracer Challenge book for its simple, yet highly effective test-driven approach to raytracing.
- Our good friend Emad Aldeen Hammoude, for his cool suggestions on the README file!
- Alex and Piolo. We wanted to implement many cool features, but life was in the way... We're so happy we placed our hopes on YOU TWO. You made a wonderful thing <3 (we're still the OG's tho ;3)
🛠️ How to Contribute
- Don't.
- No, seriously. Don't.
💻 Made with ❤️ for ray tracing enthusiasts everywhere.
Explore related projects
ytdl-org/youtube-dl
Command-line program to download videos from YouTube.com and other video sites
141,500 starsexcalidraw/excalidraw
Virtual whiteboard for sketching hand-drawn like diagrams
135,396 starsgodotengine/godot
Godot Engine – Multi-platform 2D and 3D game engine
119,840 starsmrdoob/three.js
JavaScript 3D Library.
117,905 stars