Commit 0089cde3 authored by Sebastian Eichelbaum's avatar Sebastian Eichelbaum
Browse files

[FIX #248] colormapper now uses correct upper threshold

parent 82ab1429
......@@ -92,15 +92,13 @@ float clipThreshold( in vec3 valueDescaled, in int colormap, in float thresholdV
{
float isVec = float( colormap == 6 );
return max( 1.0 - float( thresholdEnabled ),
isVec * clamp( sign( length( valueDescaled ) - thresholdVLower ) +
sign( 1.0 - ( length( valueDescaled ) - thresholdVUpper ) ),
sign( - ( length( valueDescaled ) - thresholdVUpper ) ),
0.0, 1.0 )
+
( 1.0 - isVec ) * clamp( sign( valueDescaled.r - ( thresholdVLower - 0.001 ) ) + // or
sign( 1.0 - ( valueDescaled.r - ( thresholdVUpper - 0.001 ) ) ),
( 1.0 - isVec ) * clamp( sign( valueDescaled.r - ( thresholdVLower ) ) + // or
sign( - ( valueDescaled.r - ( thresholdVUpper ) ) ),
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