测试着色器的兼容性

Testing compatibility of shaders

当我在我的机器上开发着色器代码时,我经常发现着色器在我的机器上运行良好,但在其他显卡、驱动程序、操作系统等上却不能。

如何实现着色器的兼容性?

我看到了一些方法:

我的目标是 Win/Linux/OSX 平台。不是游戏机。

Khronos 已发布 OpenGL / OpenGL ES Reference Compiler,可用于验证着色器的源代码。来自网站:

The primary purpose of the reference compiler is to identify shader portability issues.