Cycles: option to make background visible through glass transparent.

This can be enabled in the Film panel, with an option to control the
transmisison roughness below which glass becomes transparent.

Differential Revision: https://developer.blender.org/D2904
This commit is contained in:
Lukas Stockner
2018-01-11 20:03:31 +01:00
committed by Brecht Van Lommel
parent cce280dd67
commit 322f0223d0
11 changed files with 79 additions and 24 deletions

View File

@@ -140,7 +140,7 @@ ccl_device_inline void kernel_update_denoising_features(KernelGlobals *kg,
/* All closures contribute to the normal feature, but only diffuse-like ones to the albedo. */
normal += sc->N * sc->sample_weight;
sum_weight += sc->sample_weight;
if(bsdf_get_roughness_sqr(sc) > sqr(0.075f)) {
if(bsdf_get_roughness_squared(sc) > sqr(0.075f)) {
albedo += sc->weight;
sum_nonspecular_weight += sc->sample_weight;
}