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) ...@@ -17,15 +17,15 @@ IF (VTK_DATA_ROOT)
TestVRMLNormals.cxx TestVRMLNormals.cxx
TestTDxGeo.cxx TestTDxGeo.cxx
) )
# Temporarily disable LIC tests on non-windows platforms # Temporarily disable LIC tests on Mac platforms
IF (VTK_USE_GLSL_SHADERS AND WIN32) IF (VTK_USE_GLSL_SHADERS AND NOT APPLE)
SET(MyTests ${MyTests} SET(MyTests ${MyTests}
TestImageDataLIC2D.cxx TestImageDataLIC2D.cxx
TestStructuredGridLIC2DXSlice.cxx TestStructuredGridLIC2DXSlice.cxx
TestStructuredGridLIC2DYSlice.cxx TestStructuredGridLIC2DYSlice.cxx
TestStructuredGridLIC2DZSlice.cxx TestStructuredGridLIC2DZSlice.cxx
) )
ENDIF (VTK_USE_GLSL_SHADERS AND WIN32) ENDIF ()
ENDIF (VTK_DATA_ROOT) ENDIF (VTK_DATA_ROOT)
# remove some tests if there is no display of if they need args # remove some tests if there is no display of if they need args
......
...@@ -97,15 +97,15 @@ IF(VTK_USE_DISPLAY) ...@@ -97,15 +97,15 @@ IF(VTK_USE_DISPLAY)
TestGenericVertexAttributesGLSLAlphaBlending.cxx TestGenericVertexAttributesGLSLAlphaBlending.cxx
TestGenericVertexAttributesGLSLDepthPeelingPass.cxx TestGenericVertexAttributesGLSLDepthPeelingPass.cxx
) )
# Temporarily disable LIC tests on non-windows platforms # Temporarily disable LIC tests on Mac
IF(WIN32) IF(NOT APPLE)
IF (VTK_DATA_ROOT) IF (VTK_DATA_ROOT)
SET( RenderingTestsWithArguments SET( RenderingTestsWithArguments
${RenderingTestsWithArguments} ${RenderingTestsWithArguments}
TestSurfaceLIC.cxx TestSurfaceLIC.cxx
) )
ENDIF (VTK_DATA_ROOT) ENDIF (VTK_DATA_ROOT)
ENDIF(WIN32) ENDIF()
ENDIF (VTK_USE_GLSL_SHADERS) ENDIF (VTK_USE_GLSL_SHADERS)
ENDIF(VTK_USE_DISPLAY) ENDIF(VTK_USE_DISPLAY)
......
...@@ -115,8 +115,15 @@ void main( void ) ...@@ -115,8 +115,15 @@ void main( void )
int bReset = 1 - ( ( uStepType + 1 ) / 2 ) * ( 1 - uStepType / 2 ); int bReset = 1 - ( ( uStepType + 1 ) / 2 ) * ( 1 - uStepType / 2 );
// obtain the actual texture coordinate // obtain the actual texture coordinate
vec2 tcord0 = float( bReset ) * gl_TexCoord[1].st + vec2 tcord0;
float( 1 - bReset ) * texture2D( texTCoords, gl_TexCoord[0].st ).rg; 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 // normalize the contribution of this streamline point to the center ask the
// streamline center to contribute half the texture value per time (the stream- // streamline center to contribute half the texture value per time (the stream-
......
Supports Markdown
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