• Advertisement
Sign in to follow this  

Why are my framebuffer textures black?

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

http://ogldev.atspace.co.uk/www/tutorial35/tutorial35.html

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

LeJafC5.png

Edited by QQemka

Share this post


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

  • Advertisement