]> git.tdb.fi Git - libs/gl.git/commit
Avoid NaN issues in rare cases in the Cook-Torrance shader
authorMikko Rasa <tdb@tdb.fi>
Wed, 14 Apr 2021 15:09:36 +0000 (18:09 +0300)
committerMikko Rasa <tdb@tdb.fi>
Wed, 14 Apr 2021 15:09:36 +0000 (18:09 +0300)
commit47fa42594ef79dfe8c95edeeda11e9a9492e35bf
tree5da67b2a6fae0073350ef422ef8960ce6625aab2
parentbaf53e7a2db1c27376a04b088b6954eeee81f009
Avoid NaN issues in rare cases in the Cook-Torrance shader

The dot product may sometimes be very slightly over 1.0, making the
first argument to pow negative and giving undefined results.
shaderlib/cooktorrance.glsl