Note that there are some explanatory texts on larger screens.

plurals
  1. POUninitialized/unreserved GPU memory in textures, OpenGL
    primarykey
    data
    text
    <p>(This is actually a crosspost from <a href="http://www.gamedev.net/topic/613867-trash-in-minified-textures/" rel="nofollow noreferrer">gamedev</a> , but I thought you guys and girls might be helpful too!)</p> <p>Edit: I elaborated about what I mean with overlay. After some sleep I have found that my call to glGenerateMipmaps is useless, since I use null as pointer to glTexImage2D.</p> <p>On OpenGL 3.3, Ubuntu 11.04, nVidia drivers 280.13, GeForce GT240.</p> <p>I'm making a deferred shader and wants to display my G-buffer in small overlays in the lower part of the screen. Overlays in this case meaning no z-test, textured screen aligned quads, and rendered last.</p> <p>When rendering (one at a time) the G-buffers (FBO textures ) in full window they shows up correctly. When rendering to these overlays I get trash (seemingly random GPU-memory as static interference, but different between runs, sometimes clear picture).</p> <p>If I create a different texture, say from file, it shows without trash in the overlays, so that code should be OK. Can anyone explain why? I have used glGenerateMipmap for the textures in the G-buffer.</p> <p>I know this might be not enough information, but starts with this. Please ask about any relevant information. Can the problem be related to FBO-rendering and mipmapping? Surely my code wants to show unreserved/uninitialized memory, but I don't know why. <img src="https://i.stack.imgur.com/uDD56.png" alt="The four textures below have trash data in them."></p> <hr> <p>The full-window green picture is my current result from the lighting stage, in resolution (256*256) to save GPU memory because of fat G-buffer. Also, in the material shader (generating the G-buffer) I use "out vec4 fragment[3]", and the textures are of different internal formats. Can that be a problem?</p> <p>PS. The lights are at (-30,0,0) and (30,0,0) but seems to be "nearer". Can that be a precision problem? I use GL_RGBA16F for the normals, GL_RGBA32F for the positions, GL_DEPTH_COMPONENT24 for depth and GL_RGBA for the albedo (Yes, an enormous waste, but I will optimize later). </p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload