forked from YafaRay/Core
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Oren Nayar workaround for white/black dots when using bump texture
Using bump textures and Oren Nayar diffuse method causes sometimes white/black dots. Reported in: http://yafaray.org/node/707 I don't yet fully understand the Oren Nayar method, but I suppose the output of the algorithm should be limited to [0..1] values. However the formula as currently implemented allows values outside that range. From my tests, it seems that when using bump mapping sometimes the output of the Oren Nayar is way out of the [0..1] range, causing the black and white dots. I don't know why is that the case, is it a problem in our implementation of Oren Nayar? I tried other implementation but had similar or worse problems. So, in this case, I'll keep the original Oren Nayar implementation and add a simple workaround, putting limits to the output so it always stays in the range [0..1]. However, this probably would need further review to understand why it happens?
- Loading branch information
1 parent
66c741e
commit a13dcac
Showing
4 changed files
with
9 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters