Skip to content

Implement FourierMaterial #61

@wahn

Description

@wahn

The test scene ~/git/gitlab/rs-pbrt-test-scenes/pbrt/pbrt_vw_van/vw-van.pbrt uses a fourier material:

$ rg fourier /home/jan/git/gitlab/rs-pbrt-test-scenes/pbrt/pbrt_vw_van
/home/jan/git/gitlab/rs-pbrt-test-scenes/pbrt/pbrt_vw_van/vw-van.pbrt
55:    "string type" "fourier" "string bsdffile" "bsdfs/ceramic.bsdf"

On the C++ side we have this class:

// FourierMaterial Declarations
class FourierMaterial : public Material {
  public:
    // FourierMaterial Public Methods
    FourierMaterial(const std::string &filename,
                    const std::shared_ptr<Texture<Float>> &bump);
    void ComputeScatteringFunctions(SurfaceInteraction *si, MemoryArena &arena,
                                    TransportMode mode,
                                    bool allowMultipleLobes) const;

  private:
    // FourierMaterial Private Data
    FourierBSDFTable *bsdfTable;
    std::shared_ptr<Texture<Float>> bumpMap;
    static std::map<std::string, std::unique_ptr<FourierBSDFTable>> loadedBSDFs;
};

We have to implement the Rust counterpart ...

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions