如何在opengl和cg着色器中使用3d纹理? [英] How to use 3d texture in opengl and cg shaders?
问题描述
第二个问题是关于图像空间过滤方法。有没有人知道它是什么?我应该使用这种方法来确定纹理坐标。
你真的需要3D纹理吗?也许更好的方法是有纹理数组?
这里是一个很好的信息: http://www.opengl.org/wiki/Array_Texture
这比使用我认为的3D纹理更简单。它们对于级联阴影映射中的实例非常有用,其中每个级联都会转到纹理数组中的不同元素。
I've got a problem with 3d texture mapping. If I have several 2d textures, and I want to build a 3d texture with these 2d textures. What can I do to put all these data together? The function glTexImage3D ends with a parameter const GLvoid *texels which leads to the data of the texture. But now I have 32 2D textures and want to get a 3D texture. How to do that?
The second question is about image space filtering method. Is there anyone who knows what it is? I should use this method to determine texture coordinate.
Do you really need 3D textures? maybe the better way is to have texture Arrays?
here is a good info: http://www.opengl.org/wiki/Array_Texture
it is a bit simpler than 3D textures to use I think. They are very useful for instance in cascaded shadow mapping where each cascade goes to different element in the array of textures.
这篇关于如何在opengl和cg着色器中使用3d纹理?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!