text: #include "../microfacet.h"
  
  Spectrum eval_op::operator()(const DisneyMetal &bsdf) const {
      if (dot(vertex.geometry_normal, dir_in) < 0 ||
              dot(vertex.geometry_normal, dir_out) < 0) {
          // No light below the surface
          return make_zero_spectrum();
      }
      // Flip the shading frame if it is inconsistent with the geometry normal
      Frame frame = vertex.shading_frame;
      if (dot(frame.n, dir_in) < 0) {
          frame = -frame;
      }
      // Homework 1: implement this!
  
      return make_zero_spectrum();
  }
  
  Real pdf_sample_bsdf_op::operator()(const DisneyMetal &bsdf) const {
      if (dot(vertex.geometry_normal, dir_in) < 0 ||
              dot(vertex.geometry_normal, dir_out) < 0) {
          // No light below the surface
          return 0;
      }
      // Flip the shading frame if it is inconsistent with the geometry normal
      Frame frame = vertex.shading_frame;
      if (dot(frame.n, dir_in) < 0) {
          frame = -frame;
      }
      // Homework 1: implement this!
  
      return 0;
  }
  
  std::optional<BSDFSampleRecord>
          sample_bsdf_op::operator()(const DisneyMetal &bsdf) const {
      if (dot(vertex.geometry_normal, dir_in) < 0) {
          // No light below the surface
          return {};
      }
      // Flip the shading frame if it is inconsistent with the geometry normal
      Frame frame = vertex.shading_frame;
      if (dot(frame.n, dir_in) < 0) {
          frame = -frame;
      }
      // Homework 1: implement this!
  
      return {};
  }
  
  TextureSpectrum get_texture_op::operator()(const DisneyMetal &bsdf) const {
      return bsdf.base_color;
  }
  