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.
This commit is contained in:
Lukas Stockner
2016-11-06 19:12:45 +01:00
parent 818af9c331
commit f89fbf580e

View File

@@ -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;