统一 mat4 浮点值的精度是多少?

发布于 2024-11-29 21:19:00 字数 47 浏览 2 评论 0原文

浮点数是 32 位吗(因为这是我提供的),或者它们是 highp 浮点数的精度?

Are the floats 32 bits, since that is what I provide it, or are they the precision of a highp float?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

拥醉 2024-12-06 21:19:00

如果您绝对需要使用 highp,请在着色器中指定它。

uniform highp mat4 m;

您还可以使用 glGetShaderPrecisionFormat 测试可用的精度。至于默认使用的内容,它因不同的硬件甚至不同的着色器阶段而异。

If you absolutely need to use highp, specify it in the shader.

uniform highp mat4 m;

You can also test for what precisions are available with glGetShaderPrecisionFormat. As for what is being used be default, it varies between different hardware and even different shader stages.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文