commit | 8e86a2df5f7165cb7b62480f71c070fb0be90072 | [log] [tgz] |
---|---|---|
author | Chia-I Wu <olv@google.com> | Wed Oct 03 11:32:27 2018 -0700 |
committer | Chia-I Wu <olv@google.com> | Tue Oct 16 11:44:48 2018 -0700 |
tree | 1895e58c843942c84fab3cb499c4752c43cf0296 | |
parent | 0647d4eb27d5ff8c0e90723337a0f313db45940d [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 Merged-In: Ic39209e19ceeba6f51688dc9549746bf0f6a98e1