Commit 06fdcfad authored by François Bertel's avatar François Bertel
Browse files

BUG: LIC algorithms are working again on Linux.

vtkLineIntegralConvolution2D_fs1.glsl was using bReset in an expression to
compute tcord0. As it was not a conditional, there was a texture fetch on a
uninitialized texture. The result could be NaN or undefined and this value
multiplied by (1-bReset) would lead to a NaN or undefined result that would
propagate to the final value of tcord0 even if the actual value of (1-bReset)
is 0. The fix is to use a conditional statement instead.
parent 8257ef39
......@@ -17,15 +17,15 @@ IF (VTK_DATA_ROOT)
TestVRMLNormals.cxx
TestTDxGeo.cxx
)
# Temporarily disable LIC tests on non-windows platforms
IF (VTK_USE_GLSL_SHADERS AND WIN32)
# Temporarily disable LIC tests on Mac platforms
IF (VTK_USE_GLSL_SHADERS AND NOT APPLE)
SET(MyTests ${MyTests}
TestImageDataLIC2D.cxx
TestStructuredGridLIC2DXSlice.cxx
TestStructuredGridLIC2DYSlice.cxx
TestStructuredGridLIC2DZSlice.cxx
)
ENDIF (VTK_USE_GLSL_SHADERS AND WIN32)
ENDIF ()
ENDIF (VTK_DATA_ROOT)
# remove some tests if there is no display of if they need args
......
......@@ -97,15 +97,15 @@ IF(VTK_USE_DISPLAY)
TestGenericVertexAttributesGLSLAlphaBlending.cxx
TestGenericVertexAttributesGLSLDepthPeelingPass.cxx
)
# Temporarily disable LIC tests on non-windows platforms
IF(WIN32)
# Temporarily disable LIC tests on Mac
IF(NOT APPLE)
IF (VTK_DATA_ROOT)
SET( RenderingTestsWithArguments
${RenderingTestsWithArguments}
TestSurfaceLIC.cxx
)
ENDIF (VTK_DATA_ROOT)
ENDIF(WIN32)
ENDIF()
ENDIF (VTK_USE_GLSL_SHADERS)
ENDIF(VTK_USE_DISPLAY)
......
......@@ -115,8 +115,15 @@ void main( void )
int bReset = 1 - ( ( uStepType + 1 ) / 2 ) * ( 1 - uStepType / 2 );
// obtain the actual texture coordinate
vec2 tcord0 = float( bReset ) * gl_TexCoord[1].st +
float( 1 - bReset ) * texture2D( texTCoords, gl_TexCoord[0].st ).rg;
vec2 tcord0;
if(bReset==1)
{
tcord0=gl_TexCoord[1].st;
}
else
{
tcord0=texture2D( texTCoords, gl_TexCoord[0].st ).rg;
}
// normalize the contribution of this streamline point to the center ask the
// streamline center to contribute half the texture value per time (the stream-
......
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