Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 2 of 2

Thread: Issues sending texture to compute shader

  1. #1
    Newbie Newbie
    Join Date
    May 2018
    Posts
    1

    Issues sending texture to compute shader

    Hello,

    I have a texture that I'm trying to send to compute shader.
    glGetTexImage() tells me there are some values in it, but when I use texture() in the compute shader I only get zeros.
    If I use textureSize() in the compute shader I get correct values.
    Also, if I used the same texture in a fragment shader it works ok.

    What could be the issue?

  2. #2
    Senior Member OpenGL Guru Dark Photon's Avatar
    Join Date
    Oct 2004
    Location
    Druidia
    Posts
    4,480
    If the texture does not have MIPmaps, do you have MIPmap filtering disabled? For instance, set MIN_FILTER to NEAREST.

    Post the code with sets up your texture and the GLSL that samples from it (including texture/texcoord declarations)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •