原文: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的优化方式。