Improved ATM perfomance (still working on it). Debugging billboards alingment (in progress).

This commit is contained in:
Jonathas Costa
2017-11-03 17:10:03 -04:00
parent 45df1d498a
commit 089cfe727f
7 changed files with 351 additions and 329 deletions

View File

@@ -1019,30 +1019,30 @@ void FramebufferRenderer::render(float blackoutFactor, bool doPerformanceMeasure
glDrawBuffers(1, dBuffer);
glClear(GL_COLOR_BUFFER_BIT);
//// HDR Image Control and Resolve
//_hdrBackGroundProgram->activate();
// HDR Image Control and Resolve
_hdrBackGroundProgram->activate();
//ghoul::opengl::TextureUnit mainColorTextureUnit;
//mainColorTextureUnit.activate();
//glBindTexture(GL_TEXTURE_2D_MULTISAMPLE, _mainColorTexture);
ghoul::opengl::TextureUnit mainColorTextureUnit;
mainColorTextureUnit.activate();
glBindTexture(GL_TEXTURE_2D_MULTISAMPLE, _mainColorTexture);
//_hdrBackGroundProgram->setUniform("mainColorTexture", mainColorTextureUnit);
//_hdrBackGroundProgram->setUniform("nAaSamples", _nAaSamples);
//_hdrBackGroundProgram->setUniform("exposure", _hdrExposure);
//_hdrBackGroundProgram->setUniform("backgroundExposure", _hdrBackground);
//_hdrBackGroundProgram->setUniform("gamma", _gamma);
_hdrBackGroundProgram->setUniform("mainColorTexture", mainColorTextureUnit);
_hdrBackGroundProgram->setUniform("nAaSamples", _nAaSamples);
_hdrBackGroundProgram->setUniform("exposure", _hdrExposure);
_hdrBackGroundProgram->setUniform("backgroundExposure", _hdrBackground);
_hdrBackGroundProgram->setUniform("gamma", _gamma);
//glDisable(GL_DEPTH_TEST);
//glDepthMask(false);
glDisable(GL_DEPTH_TEST);
glDepthMask(false);
//glBindVertexArray(_screenQuad);
//glDrawArrays(GL_TRIANGLES, 0, 6);
//glBindVertexArray(0);
glBindVertexArray(_screenQuad);
glDrawArrays(GL_TRIANGLES, 0, 6);
glBindVertexArray(0);
//glDepthMask(true);
//glEnable(GL_DEPTH_TEST);
glDepthMask(true);
glEnable(GL_DEPTH_TEST);
//_hdrBackGroundProgram->deactivate();
_hdrBackGroundProgram->deactivate();
for (const DeferredcasterTask& deferredcasterTask : tasks.deferredcasterTasks) {