Jump to content
  • Advertisement
Sign in to follow this  
linsnos

OpenGL trash in minified textures

This topic is 2609 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi!

EDIT: SOLVED!
Problem: I tried to generate mipmaps before textures had any useful data.
Solution: Turning off mipmapping made my saturday a good one!

On OpenGL 3.3, Ubuntu 11.04, nVidia drivers 280.13, GeForce GT240.

I'm making a deferred shader and wants to display my G-buffer in small screen aligned overlays in the lower part of the screen.
When rendering (one at a time) the G-buffers (FBO textures ) in full window they shows up correctly.
When rendering to the overlays I get trash (seemingly random GPU-memory as static interference, but different between runs, sometimes clear picture).

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.

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.
[attachment=5913:Screenshot_buggyGreen.png]
Best regards from Mr. Desperate. :)

PS. 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?

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!