Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2017-05-17 16:06:05 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2017-05-17 16:06:05 +0300
commitcc2755b4439eeb9173af5cfab2f7d69a42e37b62 (patch)
tree3d9d7d3eabb13115465993de78699ab2b6e4bd26 /intern/cycles/render/light.cpp
parent47f8459ead00929eb3862aa66eb9c04b805d4a3f (diff)
Revert "Cycles: Fix wrong shading on GPU when background has NaN pixels and MIS enabled"
This reverts commit 581c81901363176b1ce775472ea7c9f97ee504a9. Seems we do need to do finite check early on, this is incoming.
Diffstat (limited to 'intern/cycles/render/light.cpp')
-rw-r--r--intern/cycles/render/light.cpp11
1 files changed, 0 insertions, 11 deletions
diff --git a/intern/cycles/render/light.cpp b/intern/cycles/render/light.cpp
index 4886dcd563f..625dd3ded39 100644
--- a/intern/cycles/render/light.cpp
+++ b/intern/cycles/render/light.cpp
@@ -486,18 +486,10 @@ static void background_cdf(int start,
float2 *cond_cdf)
{
/* Conditional CDFs (rows, U direction). */
- /* NOTE: It is possible to have some NaN pixels on background
- * which will ruin CDF causing wrong shading. We replace such
- * pixels with black.
- */
for(int i = start; i < end; i++) {
float sin_theta = sinf(M_PI_F * (i + 0.5f) / res);
float3 env_color = (*pixels)[i * res];
float ave_luminance = average(env_color);
- /* TODO(sergey): Consider adding average_safe(). */
- if(!isfinite(ave_luminance)) {
- ave_luminance = 0.0f;
- }
cond_cdf[i * cdf_count].x = ave_luminance * sin_theta;
cond_cdf[i * cdf_count].y = 0.0f;
@@ -505,9 +497,6 @@ static void background_cdf(int start,
for(int j = 1; j < res; j++) {
env_color = (*pixels)[i * res + j];
ave_luminance = average(env_color);
- if(!isfinite(ave_luminance)) {
- ave_luminance = 0.0f;
- }
cond_cdf[i * cdf_count + j].x = ave_luminance * sin_theta;
cond_cdf[i * cdf_count + j].y = cond_cdf[i * cdf_count + j - 1].y + cond_cdf[i * cdf_count + j - 1].x / res;