janvanbergen
Joined 6 years ago
Karma
52
Submissions
18
Member since
Sep 20
Joined 6 years ago
I sample the lights proportional to their area times intensity. This is very much less than optimal for scenes with many lights.
As far as opencl goes, I don't have much experience with it so I cant really comment. For my GPU code I do tend to prefer a C-ish coding style, although I still use templates etc here and there.
SOA vs AOS mostly comes down to whatever access pattern you use on the data. On the CPU you mostly have to worry about the cache/prefetcher, on the GPU its more important to get coalesced vector loads in order to make maximum use of bandwidth