commit | e01fc2c757ef36d36629d3118bf070043252d7db | [log] [tgz] |
---|---|---|
author | Chia-I Wu <olv@google.com> | Wed Oct 03 11:32:27 2018 -0700 |
committer | Chia-I Wu <olv@google.com> | Thu Oct 04 12:26:29 2018 -0700 |
tree | 4814d0f86704a6cbc94fc61a4ffdd5ae4f4245d1 | |
parent | 3a4f401b6f7f2ac2ad23f668c19b306caf8a5346 [diff] |
renderengine: avoid divide-by-zero in shaders We have max(1e-6, color.y) to make sure the divisor is non-zero. But when mediump means half-precision floats, 1e-6 is smaller than the minimum positive normal number. The line might have no effect at all. This is noticed when looking into the referenced bug. Bug: 116864006 Test: manual Change-Id: Ic39209e19ceeba6f51688dc9549746bf0f6a98e1