mattboran / CudaRT

Photorealistic CPU or GPU (NVidia only) rendering engine written in C++/CUDA.
3 stars 0 forks source link

Refactor material to take its own struct #15

Closed mattboran closed 5 years ago

mattboran commented 5 years ago

The issue is that as materials get more complex, we're going to run into problems keeping track of all these material properties besides just Ka, Kd, Ks. Like when we consider Ni, No, Roughness, and fresnel coefficient. Then we can reference an array of materials instead of carrying all the values in each of the n triangles.

Could use objl::Material for simplicity's sake.

mattboran commented 5 years ago

This is actually a bad idea from a CUDA performance perspective. Perhaps store an index into a Materials array

mattboran commented 5 years ago

See PR #34