This determines how much precision the GPU uses when calculating floats. highp
is high precision, and of course more intensive than mediump
(medium precision) and lowp
(low precision).
Some systems do not support highp
at all, which will cause code not to work at all on those systems.
On systems that DO support highp
, you will see a performance hit, and should use mediump
and lowp
wherever possible. A good rule of thumb that I saw was:
- highp
for vertex positions,
- mediump
for texture coordinates,
- lowp
for colors.
Hope that helps!
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…