Subjects » Programming » Graphics
Fri, Apr 15, 2016, 3:38am Ray Tracing à la Metal
So, a couple of days ago, I was feelin' pretty suave getting the ray tracing going in pure Swifty goodness. But I could not resist the allure of the GPU. I decided to stalk the illusive beast known as Metal. And that's kinda what it felt like. I did not jump right in and start coding it up, since I have but a modest idea what's going on in Metal, apart from aping Apple's example code, and transliterating some OpenCL code, earlier in the year. For me the troubles were about how to paint on a texture and to understand the ins and outs of the Metal Shading Language.

For those just wanting to know if it was worth it: The same 1600x800 scene and over 480 reflective objects, went from 702 seconds in the pure Swift version down to 14 seconds! Roughly a 50x speed improvement. That is racing a 12-core Xeon with hyperthreading against a D700 graphics card. Well worth the time invested to compare. [Read more…]
Tue, Apr 12, 2016, 10:28pm Ray Tracing à la Swift
Recently, after a big work push, I needed a break. Something else to work on for fun. While asking around if there was a Slack domain that specifically tried to gather people together interested in doing graphics and GPU programming, I decided to just start it and see if it could draw any interest. The group is called Cocoa3d (email me if you'd like an invite), targeting any kind of use for GPUs on Apple devices, also including gaming in general. A bunch of really great people joined and we started talking about various projects people were up to. [Read more…]