Mentions légales du service

Skip to content

Kernel Material Refactor

MURRAY David requested to merge dmu_material_refactor into master

Major clean-up to reduce the number of cuda kernels (and ptx), also simplify the code:

  • all glasses, mirrors and the ggx kernel have been merged into microfacet.cu + distribution headers.
  • phong and phong_textured have been merged into phong.cu.
  • normal, uv, tangent and flat shader have been merged into debug_shader.cu.

Material_eval.cu now handles calls the adequate function to:

  • decide if there is a reflection or refraction
  • get the associated sampled direction and update ray
  • evaluate the BSDF (optimize computation)
  • if reflection and not dirac, add next event estimation

A list of all necessary function to code a material kernel are listed in the "Adding a material" section of the online documentation.

Edited by MURRAY David

Merge request reports