You can support the development on the Github Sponsors page.


Tech > RAY0N


worst raytracer ever, but interactive
made by fnordomat
uploaded by fnordomat
added:
updated:
download cartridge
- CLICK TO PLAY -

9


worst raytracer ever
but interactive: user can walk through the scene (try arrow keys)
and it's getting better

+ handles bare spheres and planes
+ bare geometry of light line-of-sight and reflection.
+ lighting: monochrome, diffuse & specular & reflection

changelog
0006:
+ movement along 3 axes + yaw + pitch
+ lambertian shading
+ 4 gray tones instead of "false color"
0007: minor improvements
0008: lighting less wrong (diffuse, specular, reflected)
0009: camera up vector less wrong, lighting improved again
000A: camera up vector adapts to yaw angle, not only pitch
000B: corrected stupid error in angle formula and removed unwanted translucency
000C: use 16 color palette (gray values, not gamma corrected)
000D: removed old comments (no change in function)
000E: removed erroneous early return before adding reflected light
000F: clip brightness; transparency
0010: #gray values in palette + gamma parameters
0011:
* fixed Lambertian scattering, which was bungled in previous revisions.
* grayscale dithering to approximate lighting "gradients"!
0012: optimize dithering: it looks pseudo-random enough with fewer LCG steps (look at function myrandom and how it's used); reversed pitch cursor key controls (more intuitive and in line with sideways = yaw rotation)
0013:
* planes work as intended (I think)
* checkered texture introduced for planes via an ugly hack - as a first step towards texture mapping.
0014: lighting planes now works from both sides, however lighting *inside* spheres is still buggy
0015: plane texture can be arbitrary float-valued function of u and v texture coordinates, scales Lambertian value
0016: ambient lighting parameter added
0017: "quick" mode for quicker navigation press q to limit maxtrace to 1 (in the future, this may enable more rendering simplifications)
0018: "quick" moved to "y" button until I find a reliable way to detect keypresses(?). "starry" texture family

download cart for better performance

Comments


funky

nice!!

fnordomat

thanks!

gameboxtic

now you too can experience intel graphics

fnordomat

:-)

Shipwrecked

This is brilliant work. Is ambient lighting and texture maps on planes a possibility in the future?

fnordomat

thanks :-) yes, that's on the roadmap.

marsMan687

Whoa ... Mind blown 😓

TylerDurden

Every time I see an update I want to like it again :)

fnordomat

here's another update :-)


Post comment