3 ms·
The Scheme functions go through a JIT-ish pass into a representation that's efficient for rendering. Details are at http://www.mattkeeter.com/projects/ao/jit.h
by mkeeter 10y ago
The Scheme functions go through a JIT-ish pass into a representation that's efficient for rendering.
Details are at http://www.mattkeeter.com/projects/ao/jit.html http://www.mattkeeter.com/projects/ao/jit.html
Rendering is done with pixel-perfect rasterization of the function. Models are only gets converted into a mesh when you're exporting.
This may change in the future, as it's much easier to spin around a mesh – the right strategy is probably a low-res mesh for interactivity, which gets replaced with a pixel-perfect rendering (running in the background until complete).
- davexunit 10y agoI wonder if using a generic procedure would work better than redefining + outright. If you opened up Ao and typed (+ 1 1) at the REPL, would you see 2 as the result or a token object?
- mkeeter 10y agoThe redefined + only behaves differently when one or more of its arguments is a token object, so normal math works fine. Generic procedures may be a cleaner way to do this, but I only discovered GOOPS after this implementation was already working.
- davexunit 10y ago>The redefined + only behaves differently when one or more of its arguments is a token object, so normal math works fine. Ah yes, I'm just blind and missed the implementation in your article. Thanks for explaining!