Quantcast
Channel: GameDev.net
Viewing all articles
Browse latest Browse all 17625

Question about Multi Rendering targets in OpenGL

$
0
0

Hello! I'm trying to implement bloom to my OpenGL game but I'm a bit confused. I want to create a second color attachment for saving the scene highlights. I'm using multisampled textures and have no idea how to do this.

Do I need to create two multi sampled color attachments?  Two multisampledTextures like below?

glGenTextures(1, &multisampledTexture);
glBindTexture(GL_TEXTURE_2D_MULTISAMPLE, multisampledTexture);
glTexImage2DMultisample(GL_TEXTURE_2D_MULTISAMPLE, 4, GL_RGB, width, height, GL_TRUE);
glBindTexture(GL_TEXTURE_2D_MULTISAMPLE, 0);
glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D_MULTISAMPLE, multisampledTexture, 0);

I'm completely lost and don't know how to do this :( I don't want to know how to accomplish …


Viewing all articles
Browse latest Browse all 17625

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>