Commit eb81836d authored by Ken Martin's avatar Ken Martin

Fix a couple issues with lic

there was a texture pasting size error int he old code and both
versions were eliminating the mask value when they should not.
parent 5158a4ce
......@@ -508,11 +508,11 @@ int vtkImageDataLIC2D::RequestData(
vtkgl::MultiTexCoord2f(vtkgl::TEXTURE0, 0.0f, 0.0f);
glVertex2f(0.0f, 0.0f);
vtkgl::MultiTexCoord2f(vtkgl::TEXTURE0, 1.0f, 0.0f);
glVertex2f((float)magVectorSize[0]+1.0f, 0.0f);
glVertex2f((float)magVectorSize[0], 0.0f);
vtkgl::MultiTexCoord2f(vtkgl::TEXTURE0, 1.0f, 1.0f);
glVertex2f((float)magVectorSize[0]+1.0f, (float)magVectorSize[1]+1.0f);
glVertex2f((float)magVectorSize[0], (float)magVectorSize[1]);
vtkgl::MultiTexCoord2f(vtkgl::TEXTURE0, 0.0f, 1.0f);
glVertex2f(0.0f, (float)magVectorSize[1]+1.0f);
glVertex2f(0.0f, (float)magVectorSize[1]);
glEnd();
vectorTex->UnBind();
......
......@@ -62,12 +62,11 @@ void main(void)
if (dontUse)
{
conv = texture2D(texLIC, lictc).r;
gl_FragData[0] = vec4(texture2D(texLIC, lictc).rg, 0.0, 1.0);
}
else
{
conv = clamp(conv, 0.0, 1.0);
gl_FragData[0] = vec4(conv,texture2D(texLIC, lictc).g, 0.0, 1.0);
}
gl_FragData[0] = vec4(conv, 0.0, 0.0, 1.0);
}
......@@ -458,21 +458,11 @@ int vtkImageDataLIC2D::RequestData(
glClearColor(0.0, 0.0, 0.0, 0.0);
glClear(GL_COLOR_BUFFER_BIT);
float minXTexCoord=static_cast<float>(
static_cast<double>(0.5)/magVectorSize[0]);
float minYTexCoord=static_cast<float>(
static_cast<double>(0.5)/magVectorSize[1]);
float maxXTexCoord=static_cast<float>(
static_cast<double>(magVectorSize[0]-0.5)/magVectorSize[0]);
float maxYTexCoord=static_cast<float>(
static_cast<double>(magVectorSize[1]-0.5)/magVectorSize[1]);
float tcoords[] = {
minXTexCoord, minYTexCoord,
maxXTexCoord, minYTexCoord,
maxXTexCoord, maxYTexCoord,
minXTexCoord, maxYTexCoord};
0.0f, 0.0f,
1.0f, 0.0f,
1.0f, 1.0f,
0.0f, 1.0f};
float verts[] = {
-1.0f, -1.0f, 0.0f,
......
......@@ -1582,7 +1582,7 @@ vtkTextureObject *vtkLineIntegralConvolution2D::Execute(
}
#if (vtkLineIntegralConvolution2DDEBUG >= 2)
bufs.WriteBuffers(rank,"lic2d_licib_a.vtm", "lic2d_licib_s.vtm", computeExten ts1);
bufs.WriteBuffers(rank,"lic2d_licib_a.vtm", "lic2d_licib_s.vtm", computeExtents1);
#endif
// initialize seeds
......
......@@ -67,12 +67,12 @@ void main(void)
if (dontUse)
{
conv = texture2D(texLIC, lictc).r;
gl_FragData[0] = vec4(texture2D(texLIC, lictc).rg, 0.0, 1.0);
}
else
{
conv = clamp(conv, 0.0, 1.0);
gl_FragData[0] = vec4(conv,texture2D(texLIC, lictc).g, 0.0, 1.0);
}
gl_FragData[0] = vec4(conv, 0.0, 0.0, 1.0);
}
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