Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/kernel/kernel_passes.h
| Show First 20 Lines • Show All 97 Lines • ▼ Show 20 Lines | if ((sum_weight == 0.0f) || (sum_nonspecular_weight * 4.0f > sum_weight)) { | ||||
| } | } | ||||
| if (kernel_data.film.pass_denoising_normal != PASS_UNUSED) { | if (kernel_data.film.pass_denoising_normal != PASS_UNUSED) { | ||||
| /* Transform normal into camera space. */ | /* Transform normal into camera space. */ | ||||
| const Transform worldtocamera = kernel_data.cam.worldtocamera; | const Transform worldtocamera = kernel_data.cam.worldtocamera; | ||||
| normal = transform_direction(&worldtocamera, normal); | normal = transform_direction(&worldtocamera, normal); | ||||
| const float3 denoising_normal = ensure_finite3(normal); | const float3 denoising_normal = ensure_finite3(normal); | ||||
| kernel_write_pass_float3_unaligned(buffer + kernel_data.film.pass_denoising_normal, | kernel_write_pass_float3(buffer + kernel_data.film.pass_denoising_normal, denoising_normal); | ||||
| denoising_normal); | |||||
| } | } | ||||
| if (kernel_data.film.pass_denoising_albedo != PASS_UNUSED) { | if (kernel_data.film.pass_denoising_albedo != PASS_UNUSED) { | ||||
| const float3 denoising_feature_throughput = INTEGRATOR_STATE(path, | const float3 denoising_feature_throughput = INTEGRATOR_STATE(path, | ||||
| denoising_feature_throughput); | denoising_feature_throughput); | ||||
| const float3 denoising_albedo = ensure_finite3(denoising_feature_throughput * | const float3 denoising_albedo = ensure_finite3(denoising_feature_throughput * | ||||
| diffuse_albedo); | diffuse_albedo); | ||||
| kernel_write_pass_float3_unaligned(buffer + kernel_data.film.pass_denoising_albedo, | kernel_write_pass_float3(buffer + kernel_data.film.pass_denoising_albedo, denoising_albedo); | ||||
| denoising_albedo); | |||||
| } | } | ||||
| INTEGRATOR_STATE_WRITE(path, flag) &= ~PATH_RAY_DENOISING_FEATURES; | INTEGRATOR_STATE_WRITE(path, flag) &= ~PATH_RAY_DENOISING_FEATURES; | ||||
| } | } | ||||
| else { | else { | ||||
| INTEGRATOR_STATE_WRITE(path, denoising_feature_throughput) *= specular_albedo; | INTEGRATOR_STATE_WRITE(path, denoising_feature_throughput) *= specular_albedo; | ||||
| } | } | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 188 Lines • Show Last 20 Lines | |||||