fix #60 and tune refract

This commit is contained in:
NightFox 2021-12-14 00:40:35 +03:00 committed by Ivan Avdeev
parent 50ac0c3efa
commit 4d5dbd7f1e

View File

@ -534,8 +534,7 @@ void main() {
} else {
// Refraction
if (rand01() < payload_opaque.transmissiveness) {
throughput *= material.baseColor;
direction = refract(direction, payload_opaque.geometry_normal, .8);
direction = refract(direction, payload_opaque.geometry_normal, .95);
origin = payload_opaque.hit_pos_t.xyz - payload_opaque.geometry_normal * shadow_offset_fudge;
continue;
}