wahn/rs_pbrt

Implement CreateMaxMinDistSampler

wahn opened this issue · 2 comments

wahn commented

On the C++ side:

> rg -tcpp CreateMaxMinDistSampler
core/api.cpp
827:        sampler = CreateMaxMinDistSampler(paramSet);

samplers/maxmin.h
85:MaxMinDistSampler *CreateMaxMinDistSampler(const ParamSet &params);

samplers/maxmin.cpp
73:MaxMinDistSampler *CreateMaxMinDistSampler(const ParamSet &params) {

TODO: Rust counterpart ...

wahn commented

Commit 31f74d7 implements the MaxMinDistSampler, but the result differs from the C++ versions:

diff

> imf_diff -d -f pbrt.exr pbrt_rust.exr diff.jpg
differing pixels:	 83.680% (209199 of 250000)
average difference:	  6.693%
maximum difference:	 80.439%
Summary: Many pixels differ strongly.
== "pbrt.exr" and "pbrt_rust.exr" are different
wahn commented

Commit 2b34e5d fixes the problem and the issue can be closed ...

> imf_diff pbrt.exr pbrt_rust.exr 
pbrt.exr pbrt_rust.exr: no differences.
== "pbrt.exr" and "pbrt_rust.exr" are identical