Skip to content

Commit

Permalink
Merge pull request #11 from chamberm/Refactor
Browse files Browse the repository at this point in the history
Refactor
  • Loading branch information
chamberm committed Apr 20, 2018
2 parents 9cd1bcf + 9747023 commit b222da5
Show file tree
Hide file tree
Showing 52 changed files with 4,793 additions and 1,458 deletions.
14 changes: 7 additions & 7 deletions src/CMakeLists.txt
Expand Up @@ -124,7 +124,7 @@ MARK_AS_ADVANCED( USE_GEOMETRY_SHADERS )
# GUI, without features that are not used by lots
# of users.

OPTION(BUILD_LIGHTWEIGHT_GUI "Build lightweight GUI" ON)
OPTION(BUILD_LIGHTWEIGHT_GUI "Build lightweight GUI" OFF)

IF(BUILD_LIGHTWEIGHT_GUI)
ADD_DEFINITIONS( -D_USE_LIGHT_GUI=1 )
Expand All @@ -136,7 +136,7 @@ MARK_AS_ADVANCED( BUILD_LIGHTWEIGHT_GUI )

# Option to enable HD (e.g. 4k resolution) GUI

OPTION(BUILD_HD_GUI_ZOOM "Build HD GUI for 4k" ON)
OPTION(BUILD_HD_GUI_ZOOM "Build HD GUI for 4k" OFF)

IF(BUILD_HD_GUI_ZOOM)
ADD_DEFINITIONS( -D_USE_ZOOM_GUI=1 )
Expand Down Expand Up @@ -202,11 +202,11 @@ ENDIF( WIN32 )

IF( WIN32 )
FIND_FILE( GLEW_DLL_FOUND glew32.dll REQUIRED )
find_file( wxmsw28ud_adv_vc_custom_dll_found wxmsw28ud_adv_vc_custom.dll REQUIRED )
find_file( wxmsw28ud_core_vc_custom_dll_found wxmsw28ud_core_vc_custom.dll REQUIRED )
find_file( wxmsw28ud_gl_vc_custom_dll_found wxmsw28ud_gl_vc_custom.dll REQUIRED )
find_file( wxbase28ud_xml_vc_custom_dll_found wxbase28ud_xml_vc_custom.dll REQUIRED )
find_file( wxbase28ud_vc_custom_dll_found wxbase28ud_vc_custom.dll REQUIRED )
#find_file( wxmsw28ud_adv_vc_custom_dll_found wxmsw28ud_adv_vc_custom.dll REQUIRED )
#find_file( wxmsw28ud_core_vc_custom_dll_found wxmsw28ud_core_vc_custom.dll REQUIRED )
#find_file( wxmsw28ud_gl_vc_custom_dll_found wxmsw28ud_gl_vc_custom.dll REQUIRED )
#find_file( wxbase28ud_xml_vc_custom_dll_found wxbase28ud_xml_vc_custom.dll REQUIRED )
#find_file( wxbase28ud_vc_custom_dll_found wxbase28ud_vc_custom.dll REQUIRED )
find_file( opengl_dll_found opengl32.dll REQUIRED )
find_file( glu_dll_found glu32.dll REQUIRED )
ENDIF( WIN32 )
Expand Down
15 changes: 9 additions & 6 deletions src/GLSL/fibers.fs
Expand Up @@ -6,9 +6,9 @@ uniform int dimX, dimY, dimZ;
uniform float voxX, voxY, voxZ;
uniform sampler3D tex;
uniform float threshold;
uniform int type;
uniform bool useTex;
uniform bool useOverlay;
uniform bool isDistcoloring;

varying vec4 myColor;

Expand All @@ -31,15 +31,17 @@ float lookupTex()

void main()
{
vec4 cooloor = vec4(1.0);
vec4 cooloor = myColor;
float value = lookupTex();
if(isDistcoloring)
value = myColor.r;
float newVal;
if (threshold < 1.0)
newVal = (value - threshold) / (1.0 - threshold);
else
newVal = 1.0;

if (type == 3 && useTex)
if (useTex)
{
if ( useColorMap == 1 )
cooloor.rgb = colorMap1( newVal );
Expand All @@ -63,7 +65,8 @@ void main()
cooloor.a = newVal*newVal;*/

cooloor.a = newVal * myColor.a;
if ( useOverlay )
cooloor.rgb = myColor.rgb;
gl_FragColor = cooloor;
if ( useOverlay && !isDistcoloring)
gl_FragColor = myColor;
else
gl_FragColor = cooloor;
}

0 comments on commit b222da5

Please sign in to comment.