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:
authorLukas Stockner <lukas.stockner@freenet.de>2016-11-06 21:12:45 +0300
committerLukas Stockner <lukas.stockner@freenet.de>2016-11-06 22:34:50 +0300
commitf89fbf580eae6202cef9da08756fd415ca34a8f3 (patch)
tree19dcb783a61b32f016829e466b86d20a9e441b19 /intern/cycles/render/light.cpp
parent818af9c3315cb883436a3d75d634f449133cd3d9 (diff)
Cycles: Fix T49952: Bad MIS sampling of backgrounds with single bright pixels
With this fix, using a MIS map resolution equal to the image size for closest imterpolation or twice the size for linear interpolation gets rid of all fireflies. Previously, a much higher resolution was needed to get acceptable noise levels.
Diffstat (limited to 'intern/cycles/render/light.cpp')
-rw-r--r--intern/cycles/render/light.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/intern/cycles/render/light.cpp b/intern/cycles/render/light.cpp
index 777f3229ce6..c43d646f515 100644
--- a/intern/cycles/render/light.cpp
+++ b/intern/cycles/render/light.cpp
@@ -43,8 +43,8 @@ static void shade_background_pixels(Device *device, DeviceScene *dscene, int res
for(int y = 0; y < height; y++) {
for(int x = 0; x < width; x++) {
- float u = x/(float)width;
- float v = y/(float)height;
+ float u = (x + 0.5f)/width;
+ float v = (y + 0.5f)/height;
uint4 in = make_uint4(__float_as_int(u), __float_as_int(v), 0, 0);
d_input_data[x + y*width] = in;