Cycles: support baking normals plugged into BSDFs, averaged with closure weight.

This commit is contained in:
Brecht Van Lommel
2017-08-20 03:25:13 +02:00
parent 0b07c2c8a2
commit b5f8063fb9
9 changed files with 36 additions and 13 deletions

View File

@@ -260,7 +260,7 @@ ccl_device_inline void kernel_write_data_passes(KernelGlobals *kg, ccl_global fl
}
if(flag & PASS_NORMAL) {
float3 normal = sd->N;
float3 normal = shader_bsdf_average_normal(kg, sd);
kernel_write_pass_float3(buffer + kernel_data.film.pass_normal, sample, normal);
}
if(flag & PASS_UV) {