-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
cuPathTracer/src/path_tracer.cu
Lines 232 to 245 in 16e88f2
| if (random <= threshold[0]) { /* Diffusion */ | |
| colors[index] += (ray.color * triangle.material.emitted_color); | |
| ray.color *= triangle.material.diffuse_color; | |
| ray.direction = | |
| ComputeDiffusionDirection(normal, ray.direction, curand_state); | |
| } else if (random <= threshold[1]) { /* Specular */ | |
| ray.color *= triangle.material.specular_color; | |
| ray.direction = ComputeSpecularityDirection(normal, ray.direction, | |
| shininess, curand_state); | |
| } else if (random <= threshold[2]) { /* Transmission */ | |
| ray.color *= (1 - triangle.material.dissolve); | |
| ray.direction = ComputeTransmissionDirection(normal, ray.direction, eta, | |
| curand_state); | |
| } |
作者您好,我想问下这段代码为什么只在diffusion的部分更新colors,高光和投射则只更新ray的color呢?
Metadata
Metadata
Assignees
Labels
No labels