While modern consoles chug at the thought of raytracing, YouTuber XL2 demonstrates how they pulled it off on the Sega Saturn, a console over three decades old. More from Gizmodo:
But wait, what is raytracing, and why’s it so difficult to implement? In the most basic sense, it’s one of the ways by which a computer can work out how objects in a three-dimensional scene are lit. In real life, light bounces around a scene, with different surfaces and materials absorbing, reflecting and/or scattering different amounts of light. Raytracing works by simulating this process, with the renderer tracing the path of a number of rays emitted by the scene’s camera through a given number of bounces to see if they intersect a light source. (In real life, of course, the rays go from light source to camera, but in a renderer it’s more efficient to trace them in the opposite direction.)
XL2 (Sega Saturn homebrew) Raytracing test:
The room you see has no static light, but the raytracing could be used for adding dynamic raytraced lights on top of the static light sources. I only update 1/4 the vertices per frame. When a vertex fails the test, I smoothly darken it back to 0. When it passes, it goes full bright right away. I don’t do any fancy tests right now for the light (like using the surface’s normal or the light’s distance), so it could look better with a bit more maths. Now, for indirect lights : I do keep a per face PVS of what face affects what other faces. I just need to find a way to integrate it a reasonable speed on the Saturn.
Until someone cracks raytracing on the Fruit Jam you can still enjoy some DOOM.
from Adafruit Industries – Makers, hackers, artists, designers and engineers! https://ift.tt/oxNsLnA
via IFTTT

Комментариев нет:
Отправить комментарий