Fix T53313: bevel shader with transmission render artifacts.
authorBrecht Van Lommel <brechtvanlommel@gmail.com>
Tue, 21 Nov 2017 23:49:12 +0000 (00:49 +0100)
committerBrecht Van Lommel <brechtvanlommel@gmail.com>
Wed, 22 Nov 2017 00:59:21 +0000 (01:59 +0100)
intern/cycles/kernel/svm/svm_bevel.h

index 65afe1f74ec2a2bf886b4b952a420f785c933f2e..bbbc8dce2cfdea56b4f12baa24cc49049871fb7a 100644 (file)
@@ -198,7 +198,7 @@ ccl_device_noinline float3 svm_bevel(
 
        /* Normalize. */
        float3 N = safe_normalize(sum_N);
-       return is_zero(N) ? sd->N : N;
+       return is_zero(N) ? sd->N : (sd->flag & SD_BACKFACING) ? -N : N;
 }
 
 ccl_device void svm_node_bevel(