Access to 3D array in fragment shader

后端 未结 2 914
长发绾君心
长发绾君心 2021-01-20 15:45

I\'m trying to provide access to a 3-dimensional array of scalar data to a fragment shader, from a Python program using PyOpenGL.

In the fragment shader, I declare t

2条回答
  •  甜味超标
    2021-01-20 16:14

    I figured out the problem: Apparently GL_TEXTURE_3D is by default mipmapped, I only provided level 0, and (how I'm not clear about) another level is selected. The problem is solved by glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_MAX_LEVEL, 0).

提交回复
热议问题