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