Jump to content
  • Advertisement
Sign in to follow this  

Why are my framebuffer textures black?

This topic is 603 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

Hello. I am struggling with moving to deferred shading with framebuffers. I got forward rendering working perfectly. I am following this tutorial


My code is doing the same thing, but the textures (position, texcoord, normal, diffuse) are black, just like nothing gets rendered (but i know the draw calls are executed). The uniforms are correct, textures also, i have extensive error checking in all modules

Pieces of code:

framebuffer.hpp https://pastebin.com/292A92zt

framebuffer.cpp https://pastebin.com/DdJC1xDF

function responsible for rendering https://pastebin.com/t1p6Ft11

deffered shader https://pastebin.com/LV8Fg50u

forward shader https://pastebin.com/nAMvZpfi


What may be wrong? Thanks in advance


Edit: Being a master of copypasta, for some reason I've ommited " glBindFramebuffer(GL_FRAMEBUFFER, fbo_); " call. Now everything works just fine.... :D


Edited by QQemka

Share this post

Link to post
Share on other sites
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!