PBRT toWorld Transformations

97 views Asked by At

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?

0

There are 0 answers