Skip to content

Commit

Permalink
Changed scala comparisons to greater/less then equal
Browse files Browse the repository at this point in the history
  • Loading branch information
GeorgeFuller committed May 24, 2021
1 parent 8319b43 commit 4397ad3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Sources/Rendering/OpenGL/glsl/vtkVolumeFS.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -638,14 +638,14 @@ return tColor;

bool valueWithinScalarRange(vec4 val, vec4 min, vec4 max) {
bool withinRange = false;
#if vtkNumComponents >= 1
if (val.r > min.r && val.r < max.r) {
#if vtkNumComponents == 1
if (val.r >= min.r && val.r <= max.r) {
withinRange = true;
}
#endif
#if defined(vtkIndependentComponentsOn) && vtkNumComponents == 2
if (val.r > min.r && val.r < max.r &&
val.g > min.g && val.g < max.g) {
if (val.r >= min.r && val.r <= max.r &&
val.g >= min.g && val.g <= max.g) {
withinRange = true;
}
#endif
Expand Down

0 comments on commit 4397ad3

Please sign in to comment.