Cycles: invert mist pass so that 0 is nearby and 1 is far away. This is the
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Sat, 8 Jun 2013 17:56:40 +0000 (17:56 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Sat, 8 Jun 2013 17:56:40 +0000 (17:56 +0000)
opposite of Blender Internal but it makes more sense I think.

intern/cycles/kernel/kernel_passes.h

index c7d216e46382c5cec1411318b1fd616775548bed..f07e1b1fc649261dba7e7f7ac5bbabba65843817 100644 (file)
@@ -154,7 +154,7 @@ __device_inline void kernel_write_light_passes(KernelGlobals *kg, __global float
                kernel_write_pass_float4(buffer + kernel_data.film.pass_shadow, sample, shadow);
        }
        if(flag & PASS_MIST)
-               kernel_write_pass_float(buffer + kernel_data.film.pass_mist, sample, L->mist);
+               kernel_write_pass_float(buffer + kernel_data.film.pass_mist, sample, 1.0f - L->mist);
 #endif
 }