the following[1] is the demo of pure CPU implementation of the
famous "raymarching" algorithm[2]. of course, doing that in GLSL
shader will be many times faster (10x? 20x? dunno), but i'm too
lazy to port the necessary gl headers (and don't want to use
derelict for some random reason ;-), so i
ok, just4fun, mulththreaded renderer[1]. set ThreadCount to
number of your CPU cores to get some speedup.
note: this is not how `std.concurrency` should be used! please,
don't do wroker queues as i did!
[1] http://ketmar.no-ip.org/dmd/zrm3_adam_trd_x4.d
On Sunday, 24 January 2016 at 14:18:23 UTC, ketmar wrote:
ok, just4fun, mulththreaded renderer[1]. set ThreadCount to
number of your CPU cores to get some speedup.
note: this is not how `std.concurrency` should be used! please,
don't do wroker queues as i did!
[1]
This is the kind of maths I hoped I could try to understand.
The spirit is not there :)
it's very easy, actually.
the basic idea is this: our "primitive" functions returns
distance from a given point to the primitive. i.e.
auto point(1, 2, 3);
float dist = BoxPrimitive(point);
now `dist` is