HLSL 中的统一关键字
看来在 HLSL 中我可以但不必为来自应用程序的变量提供统一关键字。正确的?
为什么会这样呢?
it seems that in HLSL i can but dont have to provide the uniform keyword for variables which come from the application. right?
why is that so?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在 HLSL 中,全局变量默认被视为统一的。
例如,来自顶点着色器阶段的变量是变化的(HLSL 根本不需要此关键字!)。
请注意,GLSL 关键字uniform/variing 继承自RSL
(RenderMan 着色语言)。
In HLSL global variables are considered uniform by default.
It's also settled that a variable coming out of the vertex shader stage for example is varying (HLSL doesn't need this keyword at all!).
Note that GLSL keywords uniform/varying are inherited from RSL
(RenderMan shading language).