fix: 修复调试用全局光照代码未删除导致影响光追质量的问题
parent
232f77deb3
commit
917281d8f4
|
|
@ -686,9 +686,6 @@ vec3 trace_path_primary_gbuffer(ivec2 pixel_coords, ivec2 image_size, inout uint
|
||||||
apply_material_textures(mat0, hit0.normal, hit0.texcoord, hit0.tangent);
|
apply_material_textures(mat0, hit0.normal, hit0.texcoord, hit0.tangent);
|
||||||
|
|
||||||
radiance += throughput * mat0.emission;
|
radiance += throughput * mat0.emission;
|
||||||
if (mat0.type == MATERIAL_DIFFUSE) {
|
|
||||||
radiance += throughput * eval_direct_lighting(hit0, mat0, seed);
|
|
||||||
}
|
|
||||||
|
|
||||||
ScatterResult sc0 = scatter_ray(ray, hit0, mat0, seed);
|
ScatterResult sc0 = scatter_ray(ray, hit0, mat0, seed);
|
||||||
if (!sc0.scattered) return radiance;
|
if (!sc0.scattered) return radiance;
|
||||||
|
|
@ -711,9 +708,6 @@ vec3 trace_path_primary_gbuffer(ivec2 pixel_coords, ivec2 image_size, inout uint
|
||||||
apply_material_textures(mat, hit.normal, hit.texcoord, hit.tangent);
|
apply_material_textures(mat, hit.normal, hit.texcoord, hit.tangent);
|
||||||
|
|
||||||
radiance += throughput * mat.emission;
|
radiance += throughput * mat.emission;
|
||||||
if (mat.type == MATERIAL_DIFFUSE) {
|
|
||||||
radiance += throughput * eval_direct_lighting(hit, mat, seed);
|
|
||||||
}
|
|
||||||
|
|
||||||
ScatterResult sc = scatter_ray(ray, hit, mat, seed);
|
ScatterResult sc = scatter_ray(ray, hit, mat, seed);
|
||||||
if (!sc.scattered) break;
|
if (!sc.scattered) break;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue