Advertisement
Guest User

Untitled

a guest
Oct 22nd, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. //------------------------------------------------------------------
  2.  
  3. bool BSDF(
  4. SurfaceScatterEvent* event,
  5. const Ray* ray,
  6. const Scene* scene,
  7. const Material* mat,
  8. RNG_SEED_PARAM
  9. ) {
  10.  
  11. #ifdef DIFF
  12. if (mat->t & DIFF)
  13. #else
  14. if (false)
  15. #endif
  16. {
  17. LambertBSDF(ray, event, mat, RNG_SEED_VALUE);
  18. return true;
  19. }
  20.  
  21.  
  22. return false;
  23. }
  24.  
  25. //------------------------------------------------------------------
  26.  
  27. float3 BSDF_eval(
  28. SurfaceScatterEvent* event,
  29. const Scene* scene,
  30. const Material* mat
  31. ) {
  32.  
  33. #ifdef DIFF
  34. if (mat->t & DIFF)
  35. #else
  36. if (false)
  37. #endif
  38. {
  39. return LambertBSDF_eval(event, mat);
  40. }
  41.  
  42.  
  43. return (float3)(0.0f);
  44. }
  45.  
  46. //------------------------------------------------------------------
  47.  
  48. float BSDF_pdf(
  49. const SurfaceScatterEvent* event,
  50. const Material* mat
  51. ) {
  52.  
  53. #ifdef DIFF
  54. if (mat->t & DIFF)
  55. #else
  56. if (false)
  57. #endif
  58. {
  59. return LambertBSDF_pdf(event);
  60. }
  61.  
  62.  
  63. return -1.0f;
  64. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement