wahn/rs_pbrt

CreateMarbleSpectrumTexture

wahn opened this issue · 1 comments

wahn commented

The following test scene renders fine using the C++ version:

breakfast-lamps

The Rust version will complain about CreateMarbleSpectrumTexture:

> ~/git/github/rs_pbrt/target/release/rs_pbrt -i breakfast-lamps_no_exrs.pbrt
pbrt version 0.6.2 [Detected 8 cores]
Copyright (c) 2016-2019 Jan Douglas Bert Walter.
Rust code based on C++ code by Matt Pharr, Greg Humphreys, and Wenzel Jakob.
Film "image"
  "string filename" ["breakfast-lamps.exr"]
  "integer xresolution" [600]
  "integer yresolution" [600]
  "float scale" [2]
...
TODO: CreateMarbleSpectrumTexture
...

We have to implement a marble texture:

> grep '"marble"' materials.pbrt
Texture "marble-tex" "color" "marble" "float scale" 4

On the C++ side it's called MarbleTexture:

> rg -tcpp "class MarbleTexture"
textures/marble.h
49:class MarbleTexture : public Texture<Spectrum> {
wahn commented

Now the Rust version renders (more or less) the same:

pbrt

Found a bug in the C++ code:

mmp/pbrt-v3#252