Do Prefer Lower Data Precision#
Lower precision shader variables should be used, where appropriate, to improve performance.
Variables in shaders declared with the mediump
modifier are represented as 16-bit floating point (FP16) values. Applications should use FP16 wherever appropriate, as it typically offers a significant performance improvement by theoretically doubling the floating point throughput over FP32 (highp
). It should be considered wherever FP32 would normally be used, provided the precision is sufficient and the maximum and minimum values will not overflow, as visual artefacts may be introduced.