]> git.tdb.fi Git - libs/gl.git/commit
Tweak the logic in sky raymarching to avoid false shadowing
authorMikko Rasa <tdb@tdb.fi>
Sat, 16 Oct 2021 15:34:15 +0000 (18:34 +0300)
committerMikko Rasa <tdb@tdb.fi>
Sat, 16 Oct 2021 16:03:01 +0000 (19:03 +0300)
commit0542080f04c13236dc04a4f19e8a30016ad86bfa
treeeaab0e1f54065b9ccfa03af36ffba305f4eacfde
parentd29b82596d6c21dd2b04fb2a24d3d3f3a1cc9b7b
Tweak the logic in sky raymarching to avoid false shadowing

Ray_sphere_intersection now always returns the ingoing hit if radius is
positive or outgoing hit if radius is negative.  This avoids a ray
starting at ground level towards the sky immediately hitting the ground.
builtin_data/_sky.glsl