rtx: do not kill bounces too early
fixes dark roughness blots
This commit is contained in:
parent
87095c59da
commit
59a15a0580
|
@ -12,6 +12,7 @@ const float shadow_offset_fudge = .1;
|
|||
const float pdf_culling_threshold = 100.;
|
||||
const float color_factor = 600.;
|
||||
const float color_culling_threshold = 600./color_factor;
|
||||
const float throughput_threshold = 1e-3;
|
||||
|
||||
layout (constant_id = 4) const float LIGHT_GRID_CELL_SIZE = 256.;
|
||||
layout (constant_id = 5) const uint MAX_LIGHT_CLUSTERS = 32768;
|
||||
|
@ -404,6 +405,7 @@ void main() {
|
|||
material.baseColor = payload_opaque.base_color;
|
||||
material.metalness = 0.f; // TODO
|
||||
material.emissive = payload_opaque.emissive;
|
||||
//material.roughness = uintToFloat01(xxhash32(uvec3(floor(payload_opaque.hit_pos_t.xyz/64.)))); //payload_opaque.roughness;
|
||||
material.roughness = payload_opaque.roughness;
|
||||
|
||||
if (bounce == 0) { //brdfType == SPECULAR_TYPE)
|
||||
|
@ -475,7 +477,7 @@ void main() {
|
|||
}
|
||||
|
||||
throughput *= brdfWeight;
|
||||
if (dot(throughput, throughput) < color_culling_threshold)
|
||||
if (dot(throughput, throughput) < throughput_threshold)
|
||||
break;
|
||||
|
||||
origin = payload_opaque.hit_pos_t.xyz;
|
||||
|
|
Loading…
Reference in New Issue