您当前的位置: 首页 >  ar

Jave.Lin

暂无认证

  • 4浏览

    0关注

    704博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

Unity Shader - ARB_precision_hint_fastest / ARB_precision_hint_nicest 命令

Jave.Lin 发布时间:2019-07-06 11:11:24 ,浏览量:4

原文:https://www.khronos.org/registry/OpenGL/extensions/NV/NV_fragment_program4.txt 然后搜索:ARB_precision_hint_fastest,大概内容如下 在这里插入图片描述 精度提示(ARB_precision_hint_fastest, ARB_precision_hint_nicest)

片段程序执行计算依赖于精度。然后,某些计算也许会使用超过一种精度类型的方式,也许会为了性能而在计算时减少精度。

如果片段程序指定了 "ARB_precision_hint_fastest"的可选项,将会选择执行时间最小的精度来计算,可能会减少精度。如果指定了 “ARB_precision_hint_nicest” 可选项,将会使用最大精度来计算,因为可能会增加执行时间。

只能有其一一种精度可选项设置。如果同时设置 “ARB_precision_hint_fastest” 和 “ARB_precision_hint_nicest” 可选项的话,shader程序将加载失败。

大概就这么上面原文翻译的意思

在Unity shader用法:

#pragma fragmentoption ARB_precision_hint_fastest
References
  • https://www.khronos.org/registry/OpenGL/extensions/NV/NV_fragment_program4.txt
  • Unity3D - Shader - ARB_precision_hint_fastest / ARB_precision_hint_nicest
  • #pragma fragmentoption ARB_precision_hint_fastest any documentation about this?
  • Optimize shader - 这儿有用到该指令, 但该帖子不是讨论这个问题的,而是讨论GrabTexture与CommandBuffer与RenderToTexture的优化方式。
关注
打赏
1664331872
查看更多评论
立即登录/注册

微信扫码登录

0.2180s