Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
671 views
in Technique[技术] by (71.8m points)

opengl es - What is the precision of highp floats in GLSL ES 2.0 (for iPhone/iPod touch/iPad)?

I have a shader that ideally needs 28 bits of mantissa, though I can use less and degrade performance. How can I determine what the precision of 'highp' is in OpenGL ES? It's probably an FP24, with 16bits mantissa, but I cannot figure out for sure or how to ask OpenGL. Any ideas?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

From the OpenGL ES Shading Language reference:

  • highp - 16-bit, floating point range: -2^62 to 2^62, integer range: -2^16 to 2^16
  • mediump - 10 bit, floating point range: -2^14 to 2^14, integer range: -2^10 to 2^10
  • lowp - 8 bit, floating point range: -2 to 2, integer range: -2^8 to 2^8

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...