Commit 61dc581e authored by Bastian Krayer's avatar Bastian Krayer
Browse files

disable depth test for voxelization

parent 41651893
......@@ -51,6 +51,8 @@ void Voxelizer::voxelize(CVK::Geometry& geometry) {
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glDisable(GL_DEPTH_TEST);
glViewport(0, 0, m_res.x, m_res.y);
m_voxelizationShader.useProgram();
......@@ -71,6 +73,7 @@ void Voxelizer::voxelize(CVK::Geometry& geometry) {
// restore viewport
glViewport(m_viewport[0], m_viewport[1], m_viewport[2], m_viewport[3]);
glEnable(GL_DEPTH_TEST);
}
GLuint Voxelizer::getVoxelTexture() { return m_voxelTexture; }
......
......@@ -64,6 +64,7 @@ void Voxelizer::voxelize(CVK::Geometry& geometry) {
glGetIntegerv(GL_VIEWPORT, m_viewport);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glDisable(GL_DEPTH_TEST);
glViewport(0, 0, m_res.x, m_res.y);
......@@ -87,7 +88,6 @@ void Voxelizer::voxelize(CVK::Geometry& geometry) {
// restore viewport
glViewport(m_viewport[0], m_viewport[1], m_viewport[2], m_viewport[3]);
glEnable(GL_DEPTH_TEST);
}
GLuint Voxelizer::getVoxelTexture() { return m_voxelTexture; }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment