使用 GLSL 实现您自己的深度缓冲区
我需要一个与普通深度缓冲区大小相同的数据结构,并且我需要能够在着色器中读取和写入它。这可能吗?这个数据结构是什么样的?
I need a datastructure of the same size as the normal depth buffer and I need to be able to read from and write to it in a shader. Is this possible, and what does this datastructure look like?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不可以,GLSL 着色器无法读取和写入同一缓冲区。
简而言之,否则并行化着色器工作并不简单。
No, a GLSL shader cannot read and write the same buffer.
In a nutshell, parallelising the shader work would not be simple otherwise.