Introduction and index of this series is here.
Short post; nothing new. Just wanted to update C#, Unity (C#+Burst) and GPU implementations with the larger scene and optimizations from previous blog posts. So that there’s some, ahem, unity between them again. Here they are, as github commits/PRs:
- Update C#
- Update Unity/C#/Burst
- Update GPU (D3D11&Metal)
- Switch C# to larger scene
- Add “regular .NET 4.6” project to C#
- @EgorBo submitted some tweaks to C# implementation
A note on C# Mono performance
As Miguel de Icaza noted on github and wrote on his blog in-depth, defaults in current Mono version (5.8/5.10) are not tuned for the best floating point performance. Read his blog for details; much better defaults should be shipping in later Mono versions! If nothing else, maybe this toy project will have been useful to gently nudge Mono into improving the defaults :)
Current performance numbers, in Mray/s
|C++, SSE+SoA HitSpheres||187||41.8|
|C++, SoA HitSpheres||100||19.6|
|C#, Unity Burst (note: see later optimization)||82.3||18.7|
|C#, .NET Core||53.0||13.1|
- PC is AMD ThreadRipper 1950X (3.4GHz, 16c/16t) with GeForce GTX 1080 Ti.
- Mac is late-2013 MacBookPro (Core i7-4850HQ 2.3GHz, 4c/8t) with Intel Iris Pro.
- Unity version 2018.1 beta 12 with Burst 0.2.3.
- Mono version 5.8.1.
- .NET Core version 2.1.4.
All code is on github at
I want to switch from a recursion/iteration oriented path tracer setup, into a stream/buffers oriented one, and see what happens. Just because! My blog, my rules :)