How can I use a 3-D texture in iOS?

前端 未结 2 1805
忘掉有多难
忘掉有多难 2020-12-30 12:43

I can\'t find the glTexImage3D() function from OpenGL in OpenGL ES 2.0. So how can I use a 3-D texture, eg: a .tga file?

Does someone know how to use a

2条回答
  •  春和景丽
    2020-12-30 12:52

    I can't found there is glTexImage3D function in OpenGL ES 2

    Because 3D textures are not supported by OpenGL-ES. Think about it: A 3D texture requires a lot more memory than a 2D one. And memory is a very scarce resource on embedded/mobile devices, which is what ES is targeted for.

    I think maybe someone knows the algorithm of using 3d texture?

    It's not so much a algorithmic problem but one of limited resources. In theory you could use multiple texture units/samplers to upload layers there, and do interpolation in the shader. But this would lack depth mipmaping.

    3d texture, eg: .tag file?

    TAG file? Sorry, I'm unaware of this format. Could you give me a link to read it up? Google didn't find usefull information on it. Did you maybe mean TGA?

提交回复
热议问题