LuxCoreRender / LuxCore

LuxCore source repository
Apache License 2.0
1.16k stars 145 forks source link

Glossy reflections on GPU #474

Open JonSargent opened 3 years ago

JonSargent commented 3 years ago

I'm having trouble validating the specular behavior of glossy* materials using the PATHOCL engine on GPUs.

This zip file contains two stripped down test scenes:

Originally posted by @JonSargent in https://github.com/LuxCoreRender/LuxCore/issues/470#issuecomment-730796543

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/94535834-glossy-reflections-on-gpu?utm_campaign=plugin&utm_content=tracker%2F79505306&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F79505306&utm_medium=issues&utm_source=github).
JonSargent commented 3 years ago

Repeating the "simple_example" test on other devices revealed the following relative errors for PATHOCL glossy2 specular reflectance:

It's clear that the magnitude of the error is GPU specific -- and non existent when building the same CL kernels on a CPU (at least on the one compatible device I have). It's also clear that scope of the error is limited. The diffuse component calculates just fine, as does the specular component for non-glossy materials (e.g. glass). Not sure what about the SchlickBSDF_Coating* cl funcs (?) could be device sensitive, but maybe that's a place to start looking.