Mentions légales du service

Skip to content

Refactor kernel for reflective/refractive materials

MURRAY David requested to merge dmu_refactor_glass into master

Small refactor in cuda kernels: Split the material_eval.cu in two kernels:

  • reflective_kernel.cu: to handle all purely reflective materials (e.g. phong, lambert, conductors...).
  • all_purpose_kernel.cu: to handle all material that may refract light (e.g. dielectric like glass...).

Common functions (e.g. MIS, NEE) are in a next-event.h header in the include folder to avoid duplication as much as possible.

Also split the microfacet.cu in two kernels:

  • microfacet_conductor.cu: for microfacet-based conductors.
  • microfacet_dielectric.cu: for, well, microfacet-based dielectrics...

Common functions (e.g. ndf, reflective sampling) are in a generic_microfacet.h header in the include folder to avoid duplication as much as possible.

Also, cleaned the reflective kernels to remove proxy function that were here for compatibility.

This refactor should improve performances when using reflective materials (no a priori difference for glass).

Edited by MURRAY David

Merge request reports