Skip to content

Commit

Permalink
No skip low gradient voxels in alpha gradient mode (#1567)
Browse files Browse the repository at this point in the history
  • Loading branch information
Grantim authored Aug 25, 2023
1 parent e77dd77 commit 374ad93
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/MRViewer/MRVolumeShader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ std::string getVolumeFragmentShader()
if ( shadingMode != 0 )
{
vec3 normEye = normalEye(textCoord, dimStepVoxel, shadingMode == 2 );
if ( dot(normEye,normEye) == 0 )
if ( shadingMode == 1 && dot(normEye,normEye) == 0 )
continue;
shadeColor( vec3( eyeM * vec4( rayStart, 1.0 ) ), normEye, color );
Expand Down Expand Up @@ -330,7 +330,7 @@ std::string getVolumePickerFragmentShader()
if ( texture( denseMap, vec2( getVal(density), 0.5 ) ).a == 0.0 )
continue;
if ( shadingMode != 0 && !normalEye(textCoord, dimStepVoxel, shadingMode == 2) )
if ( shadingMode == 1 && !normalEye(textCoord, dimStepVoxel, shadingMode == 2) )
continue;
firstFound = true;
Expand Down

0 comments on commit 374ad93

Please sign in to comment.