remove DhApplyShader commented out code

This commit is contained in:
James Seibel
2023-10-18 07:24:13 -05:00
parent 50257c6b94
commit b014317e1a
@@ -99,130 +99,5 @@ public class DhApplyShader extends AbstractShaderRenderer
GL32.glBindFramebuffer(GL32.GL_FRAMEBUFFER, MC_RENDER.getTargetFrameBuffer());
ScreenQuad.INSTANCE.render();
//LOGGER.info("apply start");
//
//GL32.glBindFramebuffer(GL32.GL_FRAMEBUFFER, 0);
//
//// create the temp textures
//GL32.glBindFramebuffer(GL32.GL_FRAMEBUFFER, this.tempFramebufferId);
//GL32.glReadBuffer(GL32.GL_COLOR_ATTACHMENT0);
//
//LOGGER.info("bind color");
//
//GL32.glBindTexture(GL32.GL_TEXTURE_2D, this.tempColorTextureId);
//if (!texturesCreated)
//{
// GL32.glTexImage2D(GL32.GL_TEXTURE_2D,
// 0,
// GL32.GL_RGBA8,
// MC_RENDER.getTargetFrameBufferViewportWidth(), MC_RENDER.getTargetFrameBufferViewportHeight(),
// 0,
// GL32.GL_RGB,
// GL32.GL_UNSIGNED_BYTE,
// (ByteBuffer) null);
// GL32.glTexParameteri(GL32.GL_TEXTURE_2D, GL32.GL_TEXTURE_MIN_FILTER, GL32.GL_LINEAR);
// GL32.glTexParameteri(GL32.GL_TEXTURE_2D, GL32.GL_TEXTURE_MAG_FILTER, GL32.GL_LINEAR);
//}
//GL32.glFramebufferTexture2D(GL32.GL_FRAMEBUFFER, GL32.GL_COLOR_ATTACHMENT0, GL32.GL_TEXTURE_2D, this.tempColorTextureId, 0);
//
//
//LOGGER.info("bind depth");
//
//GL32.glBindTexture(GL32.GL_TEXTURE_2D, this.tempDepthTextureId);
//if (!texturesCreated)
//{
// GL32.glTexImage2D(GL32.GL_TEXTURE_2D,
// 0,
// GL32.GL_DEPTH_COMPONENT32,
// MC_RENDER.getTargetFrameBufferViewportWidth(), MC_RENDER.getTargetFrameBufferViewportHeight(),
// 0,
// GL32.GL_DEPTH_COMPONENT,
// GL32.GL_UNSIGNED_BYTE,
// (ByteBuffer) null);
// GL32.glTexParameteri(GL32.GL_TEXTURE_2D, GL32.GL_TEXTURE_MIN_FILTER, GL32.GL_LINEAR);
// GL32.glTexParameteri(GL32.GL_TEXTURE_2D, GL32.GL_TEXTURE_MAG_FILTER, GL32.GL_LINEAR);
//}
//GL32.glFramebufferTexture2D(GL32.GL_FRAMEBUFFER, GL32.GL_DEPTH_ATTACHMENT, GL32.GL_TEXTURE_2D, this.tempDepthTextureId, 0);
//
//texturesCreated = true;
//GL32.glClear(GL32.GL_COLOR_BUFFER_BIT | GL32.GL_DEPTH_BUFFER_BIT);
//
//
//int tempStatus = GL32.glCheckFramebufferStatus(GL32.GL_FRAMEBUFFER);
//boolean tempComplete = tempStatus == GL32.GL_FRAMEBUFFER_COMPLETE;
//LOGGER.info("copy mc to temp. " + MC_RENDER.getTargetFrameBuffer() + " -> " + this.tempFramebufferId + " (" + tempStatus + " - " + tempComplete + ")");
//
//GL32.glDisable(GL32.GL_MULTISAMPLE);
//
//// copy MC to temp
//GL32.glBindFramebuffer(GL32.GL_READ_FRAMEBUFFER, MC_RENDER.getTargetFrameBuffer());
//GL32.glBindFramebuffer(GL32.GL_DRAW_FRAMEBUFFER, this.tempFramebufferId);
//GL32.glBlitFramebuffer(0, 0, MC_RENDER.getTargetFrameBufferViewportWidth(), MC_RENDER.getTargetFrameBufferViewportHeight(),
// 0, 0, MC_RENDER.getTargetFrameBufferViewportWidth(), MC_RENDER.getTargetFrameBufferViewportHeight(),
// GL32.GL_COLOR_BUFFER_BIT | GL32.GL_DEPTH_BUFFER_BIT,
// GL32.GL_NEAREST);
//
//LOGGER.info("post copy unbind");
//
//GL32.glBindFramebuffer(GL32.GL_READ_FRAMEBUFFER, 0);
//GL32.glBindFramebuffer(GL32.GL_DRAW_FRAMEBUFFER, 0);
//
//
//
//
//// write DH to temp
//LOGGER.info("write dh to temp");
//
//GL32.glActiveTexture(GL32.GL_TEXTURE0);
//GL32.glBindTexture(GL32.GL_TEXTURE_2D, LodRenderer.getActiveColorTextureId());
//GL32.glUniform1i(this.gDhColorTextureUniform, 0);
//
//GL32.glActiveTexture(GL32.GL_TEXTURE1);
//GL32.glBindTexture(GL32.GL_TEXTURE_2D, LodRenderer.getActiveDepthTextureId());
//GL32.glUniform1i(this.gDepthMapUniform, 1);
//
//GL32.glDisable(GL32.GL_DEPTH_TEST);
//
//GL32.glEnable(GL32.GL_BLEND);
//GL32.glBlendEquation(GL32.GL_FUNC_ADD);
//GL32.glBlendFunc(GL32.GL_ONE, GL32.GL_ONE_MINUS_SRC_ALPHA);
//
//LOGGER.info("bind temp");
//GL32.glBindFramebuffer(GL32.GL_FRAMEBUFFER, this.tempFramebufferId);
//
//ScreenQuad.INSTANCE.render();
//
//LOGGER.info("unbind temp");
//GL32.glBindFramebuffer(GL32.GL_FRAMEBUFFER, 0);
//
//
//
//// copy temp to MC
//LOGGER.info("copy temp to MC - bind.");
//
//GL32.glFlush();
//
//GL32.glBindFramebuffer(GL32.GL_READ_FRAMEBUFFER, this.tempFramebufferId);
//GL32.glBindFramebuffer(GL32.GL_DRAW_FRAMEBUFFER, MC_RENDER.getTargetFrameBuffer());
//
//int mcStatus = GL32.glCheckFramebufferStatus(GL32.GL_DRAW_FRAMEBUFFER);
//boolean mcComplete = mcStatus == GL32.GL_FRAMEBUFFER_COMPLETE;
//LOGGER.info("copy temp to MC - blit " + this.tempFramebufferId + " -> " + MC_RENDER.getTargetFrameBuffer() + " (" + mcStatus + " - " + mcComplete + ")");
//
//GL32.glBlitFramebuffer(0, 0, MC_RENDER.getTargetFrameBufferViewportWidth(), MC_RENDER.getTargetFrameBufferViewportHeight(),
// 0, 0, MC_RENDER.getTargetFrameBufferViewportWidth(), MC_RENDER.getTargetFrameBufferViewportHeight(),
// GL32.GL_COLOR_BUFFER_BIT,
// GL32.GL_NEAREST);
//
//GL32.glBindFramebuffer(GL32.GL_READ_FRAMEBUFFER, 0);
//GL32.glBindFramebuffer(GL32.GL_DRAW_FRAMEBUFFER, 0);
//
//GL32.glFlush();
//GL32.glFinish();
//
//GL32.glBindFramebuffer(GL32.GL_FRAMEBUFFER, LodRenderer.getActiveFramebufferId());
//
//LOGGER.info("copy temp to MC - done.");
}
}