Skip to content
Discussion options

You must be logged in to vote

Hi,

I can run @njroussel's code with both llvm & cuda.

I think your code should give the correct result in your use case, but it is more like a hack.
diffuse_reflectance has type rgb, which creates a SRGBReflectanceSpectrum texture. Since we are not in the spectral mode, the stored value (diffuse_reflectance.value) is supposed to be a scalar color3f: just 3 scalar numbers, not an array of colors. This is checked in the constructor.
However, we expose that value through traverse and we do not check the validity of the changed value, which allows us to replace it by a vector of colors. Now the BSDF is in an invalid state: the reflectance color of it is simultaneously color A and color B. It…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@ziyi-zhang
Comment options

Answer selected by rajeshsharma-ai
@rajeshsharma-ai
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants