DirectX 11 Glgetuniformlosion / Gluniform
您好,我试图使我的3D对象移动。我在.hlsl文件中添加了自定义(float3偏移量),然后将其汇总到output.pos中。
现在,我必须访问指针到达此数据(FLOAT3偏移量)并添加指定的值。因此,它最终以每个顶点的变化值输出。
在WebGL中,有一种方法可以使用它,
offset = glGetUniformLocation(shader,"offset");
gl.uniform3f(offset, 0.1f, 0.0f, 0.0f);
但我正在使用DirectX11,我不知道是否可以。 有人可以回答这个问题吗?
hello i I am trying to make my 3d object to move. I added custom (float3 offset) to .hlsl file and sum it in output.pos.
Now I have to access pointer to this data (float3 offset) and add a specified value. So it ends up in changing value output.pos for every vertex.
In WeBGL there is a way to make it using
offset = glGetUniformLocation(shader,"offset");
gl.uniform3f(offset, 0.1f, 0.0f, 0.0f);
But I am using DirectX11 and I have no idea if this is possible.
Can someone answer this question?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论