a 'brute force' lighting method, turbowarp is recommended but not required. Click and drag to draw. Hit space to render, z to show/hide brush controls, and x to show/hide quality controls. WARNING: changing resolution will clear the canvas. After using a slider, you might need to click somewhere else for scratch to resume registering your inputs. Features: dda, soft shadows, tinted 'glass', relatively scene independent performance (more occluders = higher performance as rays stop earlier) Default is 32 rays per pixel, at 45x60 = 86400 rays total
Now actually SRGB correct! My first scratch rendering project! lodev.org/cgtutor/raycasting.html I'm planning to try radiance cascades soon, which should improve the performance to quality ratio a fair amount. Update 8/30/24: fixed bug causing rays to terminate early/late at edges of screen Update 9/16/24: ~20% faster by precomputing ray boundaries, fixed typo causing early ray termination based on opacity to not activate Update 10/4/24: adjust absorption values to make it easier to create a desired color after absorption (ex: an absorption value of 200 will let through proportionally the amount of light that an emission value of 55 would emit, ex2: an absorption of 255/2 will not actually let half of light through, although it would look perceptually half as bright) (this is made complicated by gamma correction) Update 2/10/25 (backported): fix boundary problems, better preview, support negative emission and absorption (still requires manually changing slider range), remove unused math