Commit 6cd74152 authored by Declara Denis's avatar Declara Denis Committed by Christian Schulte zu Berge
Browse files

Modified CudaConfidenceMaps pipeline to use fused image in fan

Now the pipeline correctly uses the fused confidence image as input
for the fan geometry rendering.
parent 24f269a7
......@@ -26,7 +26,6 @@
uniform sampler2D _texture;
uniform TextureParameters2D _textureParams;
uniform bool isMonochromatic = false; // FIXME: Control from processor
in vec3 ex_TexCoord;
......@@ -34,7 +33,7 @@ out vec4 out_Color;
void main() {
vec4 sample = texture(_texture, vec2(ex_TexCoord.x, 1-ex_TexCoord.y));
if (isMonochromatic) {
if (_textureParams._numChannels == 1) {
out_Color = vec4(sample.rrr, 1);
} else {
out_Color = sample;
......
......@@ -73,10 +73,10 @@ namespace campvis {
_usFusion.p_usImageId.setValue("us.igtl.ImageClient");
_usFusion.p_targetImageID.setValue("us.fusion");
//_usFusion.p_targetImageID.addSharedProperty(&_usFanRenderer.p_inputImage);
_usFusion.p_view.setValue(12);
_usFusion.p_renderToTexture.setValue(true);
_usFusion.p_targetImageID.addSharedProperty(&_usFanRenderer.p_inputImage);
_usFanRenderer.p_inputImage.setValue("us.confidence");
_usFanRenderer.p_renderTargetID.setValue("us.fused_fan");
_usFanRenderer.p_innerRadius.setValue(120.0f/540.0f);
_usFanRenderer.p_halfAngle.setValue(37);
......
......@@ -116,7 +116,6 @@ namespace campvis {
_shader->setUniform("_projectionMatrix", viewportMatrix);
_shader->setUniform("halfAngle", halfAngle);
_shader->setUniform("innerRadius", innerRadius);
_shader->setUniform("isMonochromatic", (texture == nullptr || texture->getParent()->getNumChannels()) == 1);
FramebufferActivationGuard fag(this);
createAndAttachColorTexture();
......
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