The name of the initial branch for new projects is now "main" instead of "master". Existing projects remain unchanged. More information: https://doku.lrz.de/display/PUBLIC/GitLab

Commit aeb8f778 authored by Christian Schulte zu Berge's avatar Christian Schulte zu Berge
Browse files

Fixed geometry integration in EEPGenerator

parent 8422aa85
...@@ -57,7 +57,7 @@ void main() { ...@@ -57,7 +57,7 @@ void main() {
float fragDepth = gl_FragCoord.z; float fragDepth = gl_FragCoord.z;
if (_integrateGeometry) { if (_integrateGeometry) {
float geometryDepth = getElement2DNormalized(_geometryDepthTexture, _geometryDepthTexParams, fragCoordNormalized).z; float geometryDepth = getElement2DNormalized(_geometryDepthTexture, _geometryDepthTexParams, fragCoordNormalized).r;
if (_isEntrypoint) { if (_isEntrypoint) {
// integrating geometry into Entrypoints // integrating geometry into Entrypoints
...@@ -76,13 +76,13 @@ void main() { ...@@ -76,13 +76,13 @@ void main() {
} }
else { else {
// integrating geometry into Exitpoints // integrating geometry into Exitpoints
float entryDepth = getElement2DNormalized(_entryDepthTexture, _entryDepthTexParams, fragCoordNormalized).z; float entryDepth = getElement2DNormalized(_entryDepthTexture, _entryDepthTexParams, fragCoordNormalized).r;
float exitDepth = gl_FragCoord.z; float exitDepth = gl_FragCoord.z;
if (geometryDepth <= entryDepth) { if (geometryDepth <= entryDepth) {
// geometry before Entrypoint // geometry before Entrypoint
out_Color = vec4(0.0); out_Color = vec4(0.0);
fragDepth = exitDepth; fragDepth = geometryDepth;
} }
else if (geometryDepth <= exitDepth) { else if (geometryDepth <= exitDepth) {
// geometry between entrypoint and exitpoint // geometry between entrypoint and exitpoint
......
...@@ -138,9 +138,6 @@ namespace campvis { ...@@ -138,9 +138,6 @@ namespace campvis {
LERROR("No suitable virtual mirror geometry found."); LERROR("No suitable virtual mirror geometry found.");
} }
} }
FramebufferActivationGuard fag(this);
decorateRenderProlog(data, _shader);
const tgt::Camera& cam = p_camera.getValue(); const tgt::Camera& cam = p_camera.getValue();
tgt::TextureUnit geometryDepthUnit, entryDepthUnit; tgt::TextureUnit geometryDepthUnit, entryDepthUnit;
...@@ -174,6 +171,8 @@ namespace campvis { ...@@ -174,6 +171,8 @@ namespace campvis {
_shader->setIgnoreUniformLocationError(false); _shader->setIgnoreUniformLocationError(false);
FramebufferActivationGuard fag(this);
decorateRenderProlog(data, _shader);
glEnable(GL_CULL_FACE); glEnable(GL_CULL_FACE);
glEnable(GL_DEPTH_TEST); glEnable(GL_DEPTH_TEST);
......
Markdown is supported
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