After some investigation, i suspect that the bsdf modifier “df::measured_factor” introduced in MDL 2019.1 has a bug regarding how the input image is handled at the 0°/90° border.
I am using the MDL SDK 2020.0.1, with Optix 6.5.0
This is my simple material:
mdl 1.6; import ::df::*; export material measuredFactorTest() = material( surface:material_surface(df::measured_factor( values: texture_2d("Gradient.png"), base: df::diffuse_reflection_bsdf (tint: color(1.0, 1.0, 1.0)) )));
the gradient image is a 1px-wide and 91-px high bitmap with a gradient from “black” at the top to “grey” at the bottom, with two control pixel bands (see (https://filebin.ca/5RvrEdgXy3UJ/Gradient.png) )
With a simple directional light source shining straight down, i now look straight down onto a flat surface using the above material, using a camera with a large viewing angle. I see a surface that nicely matches the gradient and shows the control rings
BUT: Right at the center, directly below the viewpoint, as the viewing angle approaches the normal, there is a dark spot where the brightest spot should be. The dark spot vanishes if i make the top pixel in the image the same color as the bottom pixel, and becomes an almost white spot if i change the top pixel to white. From what i understand, the top pixel should not have any influence here, the reflectance values at this spot should be controlled only by the bottom pixels of the input image.
Is this a bug in the MDL/Optix or am I maybe missing / misunderstanding the documentation?