Commit aa8931e5 authored by Sebastian Eichelbaum's avatar Sebastian Eichelbaum
Browse files

[FIX] - fixed numerical issue in navslices shader caused some kinds of "black...

[FIX] - fixed numerical issue in navslices shader caused some kinds of "black holes" in some data and rainbow colormaps for example
parent e2b935f7
......@@ -89,14 +89,14 @@ void lookupTex( inout vec4 col, in int type, in sampler3D tex, in float threshol
col1 = clamp( texture3D( tex, v ).rgb, 0.0, 1.0 );
if( ( col1.r + col1.g + col1.b ) / 3.0 - threshold <= 0.0 ) return;
if( ( col1.r + col1.g + col1.b ) / 3.0 - threshold <= -0.0001 ) return;
if( cmap != 0 )
{
if(threshold < 1.0)
{
col1.r = ( col1.r - threshold ) / ( 1.0 - threshold );
if( ( col1.r + col1.g + col1.b ) / 3.0 - threshold <= 0.0 ) return;
if( ( col1.r + col1.g + col1.b ) / 3.0 - threshold <= -0.0001 ) return;
}
colorMap( col1, col1.r, cmap );
......@@ -130,7 +130,7 @@ void main()
else
{
if ( !showComplete )
discard;
discard;
}
}
......
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