2

I'm used to using the nori rendering engine and am trying to transform some code over to pbrt so I can create scenes with analytic spheres more easily. I'm trying to take a vector I've sampled from a hemisphere and transform it to the coordinate frame of the shading normal and am having trouble finding out how to do so cleanly. I want my code to look something like this:

    scene.Intersection(ray,&isect);
    Vector3f localDir = SampleUniformHemisphere();
    Vector3f worldDir = isect.shadingFrame.toWorld(localDir);

Any advice on how I can do this?

Vertexwahn
  • 7,709
  • 6
  • 64
  • 90
bmiller
  • 21
  • 1

0 Answers0