A compact interactive SDF / ray / spectral toy renderer built with LOVE 12.0, Lua, and GLSL.
It focuses on realtime experimentation: scene switching, progressive accumulation, runtime OBJ importing, and live tuning from the pause menu.
Fancy / Showcase |
Potato / Showcase |
This project is a shader-driven rendering playground that combines:
- signed distance field scenes
- progressive accumulation with a separate radiance-cache pass
- multiple tracing modes, from RGB previewing to spectral/path-traced rendering
- a runtime imported-object scene backed by an OBJ -> BVH -> texture-packing pipeline
It is built to be easy to run, easy to tweak, and easy to abuse.
- Five quality presets: Potato, Low, Medium, High, Ultra
- Five tracing modes:
- RGB Rasterization
- RGB Ray Tracing
- Spectral Ray Tracing
- Spectral Path Tracing
- Wave Optics Rendering
- Four scene variants:
- Studio
- Showcase
- House of Mirrors
- Imported Objects
- Progressive accumulation with camera-aware reset behavior
- Radiance cache pass used by the spectral transport path
- Free-fly camera with mouse look
- HUD and compact HUD plus a pause menu split into Render / Import / Governor pages
- Adaptive runtime governor for render scale, frame budget, dummy movement preview, and RAM/VRAM import limits
- Recursive runtime OBJ browser for the
objects/folder - OBJ import pipeline with MTL parsing, vertex-color support, missing-normal generation, triangle budgeting, BVH construction, and GPU texture packing
- Install LOVE 11.5.
- Clone or download this repository.
- Put any test
.objfiles you want to browse into theobjects/folder. - Run the project with:
love .You can also drag the project folder onto the LOVE executable on Windows.
W A S D- moveMouse- look aroundSpace- move upLeft Ctrl- move downLeft Shift- move fasterMouse Wheel- cycle quality presetsQ / E- cycle runtime OBJ models and focus the imported-object sceneF5- rescan theobjects/folderR- reset accumulationTab- toggle HUDF1- toggle compact HUDCaps Lock- toggle input captureEsc- open pause menu
Q / E- switch Render / Import / Governor pagesW / SorUp / Down- move selectionA / DorLeft / Right- adjust settingPage Up / Page Down- large step adjustmentsEnter/Space- activate an item or open a dropdownMouse- hover and selectMouse Wheel- scroll dropdowns or adjust the current itemR- reset accumulationEsc- close the pause menu or close the active dropdown
The Imported Objects scene is the runtime mesh path, and at this point it is more than a simple preview toggle.
Notes:
- The browser scans
objects/recursively and only loads.objfiles right now. .glbfiles can sit in the folder, but they are currently ignored by the runtime browser..mtlsidecars are parsed and converted into the renderer's packed material parameters.- Per-vertex color is respected when present.
- Missing normals are generated automatically when needed.
- Dense meshes can be triangle-sampled to fit the active import budget.
- The imported scene is centered/scaled automatically, then uploaded as packed triangle, object, mesh, and BVH textures for the shader.
- Texture map paths are parsed from MTL files, but imported shading still comes from packed scalar/color material data rather than direct texture sampling.
- Current hard caps are 81,920 uploaded triangles, 4,096 imported objects, and 16,384 imported meshes before softer RAM/VRAM budgeting kicks in.
.
|-- .gitignore
|-- build.lua
|-- Fancy.png
|-- Love2D-SDF-RayTracer-LOGO.png
|-- governor.lua
|-- imported_scene.lua
|-- main.lua
|-- objloader.lua
|-- Potato.png
|-- README.md
|-- shader.glsl
|-- shared/
`-- objects/
main.lua- app flow, camera, HUD, pause menu, and render orchestrationshader.glsl- built-in SDF scenes, tracing modes, imported-BVH traversal, and accumulation logicimported_scene.lua- imported-scene build pipeline, material packing, BVH construction, and GPU uploadobjloader.lua- OBJ/MTL parsing, filesystem scanning, and mesh assemblygovernor.lua- adaptive render-scale and memory-budget logicshared/- small math, path, and vector helpersobjects/- local runtime OBJ drop folderbuild.lua- packaging config for the LOVE build tool
- direct texture sampling for imported materials
- clearer in-app reporting for import failures and active budgets
- more built-in scenes or saved camera presets
- denoising / temporal filtering experiments
- glTF / GLB support for the import path
- smarter low-end adaptive scaling
Don Source-Available Non-Derivative License (DSANDL) v1.2
See LICENSE.txt for the full license text.

