Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Search:

Type: Posts; User: vampcat

Search: Search took 0.00 seconds.

  1. Actually, the OP has commented out glTexImage2D,...

    Actually, the OP has commented out glTexImage2D, and my entire comment was revolved around asking him not to comment that out, since that is what allocates the texture storage.

    Admittedly I should...
  2. //doesn't seem to help matters... // ...

    //doesn't seem to help matters...
    // glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT, 1024, 1024, 0, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT, 0);
    glCopyTexImage2D(GL_TEXTURE_2D, 0,...
  3. Replies
    8
    Views
    790

    Apparently, setting the GL_TEXTURE_MAG_FILTER and...

    Apparently, setting the GL_TEXTURE_MAG_FILTER and GL_TEXTURE_MIN_FILTER to GL_NEAREST is essential for the FS to be able to read depth texture.

    And with that, I believe my problem is solved.
    ...
  4. Replies
    8
    Views
    790

    Before reading from the variable in FS, i already...

    Before reading from the variable in FS, i already call `glBindFramebuffer(GL_FRAMEBUFFER, 0);` , which should set the read and write buffer to null. However, for the sake of thoroughness, I also...
  5. Replies
    8
    Views
    790

    Yeah, no errors. Again, yes. No. From...

    Yeah, no errors.


    Again, yes.


    No. From what I understand, I have to bind my fbo before reading the depth value, and that is exactly what I do - fbo.bind(), which is a wrapper for...
  6. Replies
    8
    Views
    790

    Ah, sorry for the ambiguity. What I mean is,...

    Ah, sorry for the ambiguity.

    What I mean is, the value read in the FS is always 0. (Pure 0, I've verified this. No linearizing shenanigans.)

    glReadPixels, on the other hand, gives the proper...
  7. Replies
    8
    Views
    790

    Cannot read from depth buffer in FS

    Hello!

    I've recently started work on a game engine, but I've run into a slight hiccup - I cannot get my fragment shader to read a depth texture. Just to be clear, the fragment shader can read from...
Results 1 to 7 of 7