Re: very simple pure CPU raymarching demo

2016-01-24 Thread ketmar via Digitalmars-d-announce
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

Re: very simple pure CPU raymarching demo

2016-01-24 Thread karabuta via Digitalmars-d-announce
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] http://ketmar.no-ip.org/dmd

Re: very simple pure CPU raymarching demo

2016-01-24 Thread ketmar via Digitalmars-d-announce
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