Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
OpenWalnut
OpenWalnut Core
Commits
8d33adaf
Commit
8d33adaf
authored
Aug 08, 2013
by
Sebastian Eichelbaum
Browse files
[MERGE]
parents
36fc86cd
74c9ca16
Changes
76
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
34 additions
and
34 deletions
+34
-34
src/core/graphicsEngine/shaders/shaders/WGEColorMaps.glsl
src/core/graphicsEngine/shaders/shaders/WGEColorMaps.glsl
+3
-3
src/core/graphicsEngine/shaders/shaders/WGEColorMapsImproved.glsl
.../graphicsEngine/shaders/shaders/WGEColorMapsImproved.glsl
+3
-3
src/core/graphicsEngine/shaders/shaders/WGEColormapping-fragment.glsl
...phicsEngine/shaders/shaders/WGEColormapping-fragment.glsl
+11
-11
src/core/graphicsEngine/shaders/shaders/WGEColormapping-uniforms.glsl
...phicsEngine/shaders/shaders/WGEColormapping-uniforms.glsl
+1
-1
src/core/graphicsEngine/shaders/shaders/WGEColormapping-varyings.glsl
...phicsEngine/shaders/shaders/WGEColormapping-varyings.glsl
+1
-1
src/core/graphicsEngine/shaders/shaders/WGEColormapping-vertex.glsl
...raphicsEngine/shaders/shaders/WGEColormapping-vertex.glsl
+1
-1
src/core/graphicsEngine/shaders/shaders/WGECoordinateSystem-fragment.glsl
...sEngine/shaders/shaders/WGECoordinateSystem-fragment.glsl
+1
-1
src/core/graphicsEngine/shaders/shaders/WGECoordinateSystem-vertex.glsl
...icsEngine/shaders/shaders/WGECoordinateSystem-vertex.glsl
+1
-1
src/core/graphicsEngine/shaders/shaders/WGELighting-fragment.glsl
.../graphicsEngine/shaders/shaders/WGELighting-fragment.glsl
+1
-1
src/core/graphicsEngine/shaders/shaders/WGELighting-vertex.glsl
...re/graphicsEngine/shaders/shaders/WGELighting-vertex.glsl
+1
-1
src/core/graphicsEngine/shaders/shaders/WGEPostprocessing.glsl
...ore/graphicsEngine/shaders/shaders/WGEPostprocessing.glsl
+1
-1
src/core/graphicsEngine/shaders/shaders/WGEPostprocessor-vertex.glsl
...aphicsEngine/shaders/shaders/WGEPostprocessor-vertex.glsl
+1
-1
src/core/graphicsEngine/shaders/shaders/WGEPostprocessorCombiner-fragment.glsl
...ne/shaders/shaders/WGEPostprocessorCombiner-fragment.glsl
+1
-1
src/core/graphicsEngine/shaders/shaders/WGEPostprocessorCombiner-vertex.glsl
...gine/shaders/shaders/WGEPostprocessorCombiner-vertex.glsl
+1
-1
src/core/graphicsEngine/shaders/shaders/WGEPostprocessorUtils-vertex.glsl
...sEngine/shaders/shaders/WGEPostprocessorUtils-vertex.glsl
+1
-1
src/core/graphicsEngine/shaders/shaders/WGEShadingTools.glsl
src/core/graphicsEngine/shaders/shaders/WGEShadingTools.glsl
+1
-1
src/core/graphicsEngine/shaders/shaders/WGETensorTools.glsl
src/core/graphicsEngine/shaders/shaders/WGETensorTools.glsl
+1
-1
src/core/graphicsEngine/shaders/shaders/WGETextureTools.glsl
src/core/graphicsEngine/shaders/shaders/WGETextureTools.glsl
+1
-1
src/core/graphicsEngine/shaders/shaders/WGETransformationTools.glsl
...raphicsEngine/shaders/shaders/WGETransformationTools.glsl
+1
-1
src/core/graphicsEngine/shaders/shaders/WGEUtils.glsl
src/core/graphicsEngine/shaders/shaders/WGEUtils.glsl
+1
-1
No files found.
src/core/graphicsEngine/shaders/shaders/WGEColorMaps.glsl
View file @
8d33adaf
...
...
@@ -25,7 +25,7 @@
#ifndef WGECOLORMAPS_GLSL
#define WGECOLORMAPS_GLSL
#version 1
2
0
#version 1
3
0
uniform
int
useColorMap
;
...
...
@@ -438,7 +438,7 @@ void colorMap( inout vec3 col, in float value, int cmap )
* \param colormap the colormap index to use
*/
void
colormap
(
inout
vec4
color
,
in
vec4
value
,
float
minV
,
float
scaleV
,
float
thresholdV
,
float
alpha
,
int
colormap
,
bool
active
)
bool
cm
active
)
{
// below threshold?
bool
clip
=
(
value
.
r
+
value
.
g
+
value
.
b
)
/
3
.
0
<
(
(
minV
+
thresholdV
)
/
scaleV
);
...
...
@@ -478,7 +478,7 @@ void colormap( inout vec4 color, in vec4 value, float minV, float scaleV, float
}
// finally mix colors according to alpha
color
=
mix
(
color
,
col
,
float
(
active
)
*
alpha
);
color
=
mix
(
color
,
col
,
float
(
cm
active
)
*
alpha
);
}
#endif // WGECOLORMAPS_GLSL
...
...
src/core/graphicsEngine/shaders/shaders/WGEColorMapsImproved.glsl
View file @
8d33adaf
...
...
@@ -25,7 +25,7 @@
#ifndef WGECOLORMAPSIMPROVED_GLSL
#define WGECOLORMAPSIMPROVED_GLSL
#version 1
2
0
#version 1
3
0
#include "WGEUtils.glsl"
...
...
@@ -463,7 +463,7 @@ vec4 colormap( in vec4 value, float minV, float scaleV,
bool
clipZeroEnabled
,
float
thresholdVLower
,
float
thresholdVUpper
,
bool
thresholdEnabled
,
vec2
window
,
bool
windowEnabled
,
float
alpha
,
int
colormap
,
bool
active
)
float
alpha
,
int
colormap
,
bool
cm
active
)
{
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Scale the input data to original space, and apply windowing
...
...
@@ -550,7 +550,7 @@ vec4 colormap( in vec4 value, float minV, float scaleV,
alpha
*
// did the user specified an alpha?
clip
*
// value clip?
clipTh
*
// clip due to threshold?
float
(
active
)
);
// is it active?
float
(
cm
active
)
);
// is it active?
}
#endif // WGECOLORMAPS_GLSL
...
...
src/core/graphicsEngine/shaders/shaders/WGEColormapping-fragment.glsl
View file @
8d33adaf
...
...
@@ -25,7 +25,7 @@
#ifndef WGECOLORMAPPING_FRAGMENT_GLSL
#define WGECOLORMAPPING_FRAGMENT_GLSL
#version 1
2
0
#version 1
3
0
#include "WGEColorMapsImproved.glsl"
...
...
@@ -55,7 +55,7 @@ void colormap( inout vec4 color, in sampler3D sampler, in vec3 coord, in vec3 si
bool
clipZeroEnabled
,
float
thresholdVLower
,
float
thresholdVUpper
,
bool
thresholdEnabled
,
bool
windowEnabled
,
vec2
window
,
float
alpha
,
int
cmap
,
bool
active
)
float
alpha
,
int
cmap
,
bool
cm
active
)
{
// This implements a manual trilinear interpolation. Include WGETextureutils.glsl to use this
// vec3 vSize = vec3( 1.0 / float( size.x ),
...
...
@@ -75,14 +75,14 @@ void colormap( inout vec4 color, in sampler3D sampler, in vec3 coord, in vec3 si
// vec3 c101 = getNeighbourVoxel( vSize, coord, vec3( 1.0, 0.0, 1.0 ) );
// vec3 c111 = getNeighbourVoxel( vSize, coord, vec3( 1.0, 1.0, 1.0 ) );
//
// vec4 v00 = mix( colormap( texture3D( sampler, c000 ).rgba, minV, scaleV, thresholdV, thresholdEnabled, alpha, cmap, active ),
// colormap( texture3D( sampler, c100 ).rgba, minV, scaleV, thresholdV, thresholdEnabled, alpha, cmap, active ), coordDiff.x );
// vec4 v10 = mix( colormap( texture3D( sampler, c010 ).rgba, minV, scaleV, thresholdV, thresholdEnabled, alpha, cmap, active ),
// colormap( texture3D( sampler, c110 ).rgba, minV, scaleV, thresholdV, thresholdEnabled, alpha, cmap, active ), coordDiff.x );
// vec4 v01 = mix( colormap( texture3D( sampler, c001 ).rgba, minV, scaleV, thresholdV, thresholdEnabled, alpha, cmap, active ),
// colormap( texture3D( sampler, c101 ).rgba, minV, scaleV, thresholdV, thresholdEnabled, alpha, cmap, active ), coordDiff.x );
// vec4 v11 = mix( colormap( texture3D( sampler, c011 ).rgba, minV, scaleV, thresholdV, thresholdEnabled, alpha, cmap, active ),
// colormap( texture3D( sampler, c111 ).rgba, minV, scaleV, thresholdV, thresholdEnabled, alpha, cmap, active ), coordDiff.x );
// vec4 v00 = mix( colormap( texture3D( sampler, c000 ).rgba, minV, scaleV, thresholdV, thresholdEnabled, alpha, cmap,
cm
active ),
// colormap( texture3D( sampler, c100 ).rgba, minV, scaleV, thresholdV, thresholdEnabled, alpha, cmap,
cm
active ), coordDiff.x );
// vec4 v10 = mix( colormap( texture3D( sampler, c010 ).rgba, minV, scaleV, thresholdV, thresholdEnabled, alpha, cmap,
cm
active ),
// colormap( texture3D( sampler, c110 ).rgba, minV, scaleV, thresholdV, thresholdEnabled, alpha, cmap,
cm
active ), coordDiff.x );
// vec4 v01 = mix( colormap( texture3D( sampler, c001 ).rgba, minV, scaleV, thresholdV, thresholdEnabled, alpha, cmap,
cm
active ),
// colormap( texture3D( sampler, c101 ).rgba, minV, scaleV, thresholdV, thresholdEnabled, alpha, cmap,
cm
active ), coordDiff.x );
// vec4 v11 = mix( colormap( texture3D( sampler, c011 ).rgba, minV, scaleV, thresholdV, thresholdEnabled, alpha, cmap,
cm
active ),
// colormap( texture3D( sampler, c111 ).rgba, minV, scaleV, thresholdV, thresholdEnabled, alpha, cmap,
cm
active ), coordDiff.x );
//
// vec4 src = mix( mix( v00, v10, coordDiff.y ),
// mix( v01, v11, coordDiff.y ), coordDiff.z );
...
...
@@ -94,7 +94,7 @@ void colormap( inout vec4 color, in sampler3D sampler, in vec3 coord, in vec3 si
vec4
src
=
colormap
(
value
,
minV
,
scaleV
,
clipZeroEnabled
,
thresholdVLower
,
thresholdVUpper
,
thresholdEnabled
,
window
,
windowEnabled
,
alpha
,
cmap
,
active
);
alpha
,
cmap
,
cm
active
);
// compositing:
// associated colors needed
...
...
src/core/graphicsEngine/shaders/shaders/WGEColormapping-uniforms.glsl
View file @
8d33adaf
...
...
@@ -25,7 +25,7 @@
#ifndef WGECOLORMAPPING_UNIFORMS_GLSL
#define WGECOLORMAPPING_UNIFORMS_GLSL
#version 1
2
0
#version 1
3
0
// All the uniforms needed. These uniforms get set by the WGEColormapping class for your Node.
...
...
src/core/graphicsEngine/shaders/shaders/WGEColormapping-varyings.glsl
View file @
8d33adaf
...
...
@@ -25,7 +25,7 @@
#ifndef WGECOLORMAPPING_VARYINGS_GLSL
#define WGECOLORMAPPING_VARYINGS_GLSL
#version 1
2
0
#version 1
3
0
/**
* The texture coordinate in local texture space.
...
...
src/core/graphicsEngine/shaders/shaders/WGEColormapping-vertex.glsl
View file @
8d33adaf
...
...
@@ -25,7 +25,7 @@
#ifndef WGECOLORMAPPING_VERTEX_GLSL
#define WGECOLORMAPPING_VERTEX_GLSL
#version 1
2
0
#version 1
3
0
#include "WGEColormapping-uniforms.glsl"
#include "WGEColormapping-varyings.glsl"
...
...
src/core/graphicsEngine/shaders/shaders/WGECoordinateSystem-fragment.glsl
View file @
8d33adaf
...
...
@@ -22,7 +22,7 @@
//
//---------------------------------------------------------------------------
#version 1
2
0
#version 1
3
0
#include "WGEShadingTools.glsl"
...
...
src/core/graphicsEngine/shaders/shaders/WGECoordinateSystem-vertex.glsl
View file @
8d33adaf
...
...
@@ -22,7 +22,7 @@
//
//---------------------------------------------------------------------------
#version 1
2
0
#version 1
3
0
/**
* The normal.
...
...
src/core/graphicsEngine/shaders/shaders/WGELighting-fragment.glsl
View file @
8d33adaf
...
...
@@ -22,7 +22,7 @@
//
//---------------------------------------------------------------------------
#version 1
2
0
#version 1
3
0
#include "WGEShadingTools.glsl"
...
...
src/core/graphicsEngine/shaders/shaders/WGELighting-vertex.glsl
View file @
8d33adaf
...
...
@@ -22,7 +22,7 @@
//
//---------------------------------------------------------------------------
#version 1
2
0
#version 1
3
0
#include "WGETransformationTools.glsl"
...
...
src/core/graphicsEngine/shaders/shaders/WGEPostprocessing.glsl
View file @
8d33adaf
...
...
@@ -25,7 +25,7 @@
#ifndef WGEPOSTPROCESSING_GLSL
#define WGEPOSTPROCESSING_GLSL
#version 1
2
0
#version 1
3
0
// This defines some stuff needed to enable your shader to allow the result to be post-processed.
// You'll need to do the following:
...
...
src/core/graphicsEngine/shaders/shaders/WGEPostprocessor-vertex.glsl
View file @
8d33adaf
...
...
@@ -25,7 +25,7 @@
#ifndef WGEPOSTPROCESSOR_VERTEX_GLSL
#define WGEPOSTPROCESSOR_VERTEX_GLSL
#version 1
2
0
#version 1
3
0
#include "WGEPostprocessorUtils-vertex.glsl"
...
...
src/core/graphicsEngine/shaders/shaders/WGEPostprocessorCombiner-fragment.glsl
View file @
8d33adaf
...
...
@@ -25,7 +25,7 @@
#ifndef WGEPOSTPROCESSORCOMBINER_FRAGMENT_GLSL
#define WGEPOSTPROCESSORCOMBINER_FRAGMENT_GLSL
#version 1
2
0
#version 1
3
0
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Input-Texture Uniforms
...
...
src/core/graphicsEngine/shaders/shaders/WGEPostprocessorCombiner-vertex.glsl
View file @
8d33adaf
...
...
@@ -25,7 +25,7 @@
#ifndef WGEPOSTPROCESSORCOMBINER_VERTEX_GLSL
#define WGEPOSTPROCESSORCOMBINER_VERTEX_GLSL
#version 1
2
0
#version 1
3
0
/**
* Does transfer the quad to image space.
...
...
src/core/graphicsEngine/shaders/shaders/WGEPostprocessorUtils-vertex.glsl
View file @
8d33adaf
...
...
@@ -25,7 +25,7 @@
#ifndef WGEPOSTPROCESSORUTILS_VERTEX_GLSL
#define WGEPOSTPROCESSORUTILS_VERTEX_GLSL
#version 1
2
0
#version 1
3
0
/**
* Does transfer the quad to image space.
...
...
src/core/graphicsEngine/shaders/shaders/WGEShadingTools.glsl
View file @
8d33adaf
...
...
@@ -25,7 +25,7 @@
#ifndef WGESHADINGTOOLS_GLSL
#define WGESHADINGTOOLS_GLSL
#version 1
2
0
#version 1
3
0
/**
* A struct containing the needed light and material parameters commonly used in most shaders.
...
...
src/core/graphicsEngine/shaders/shaders/WGETensorTools.glsl
View file @
8d33adaf
...
...
@@ -25,7 +25,7 @@
#ifndef WGETENSORTOOLS_GLSL
#define WGETENSORTOOLS_GLSL
#version 1
2
0
#version 1
3
0
// (c) 2007 by Mario Hlawitschka
...
...
src/core/graphicsEngine/shaders/shaders/WGETextureTools.glsl
View file @
8d33adaf
...
...
@@ -25,7 +25,7 @@
#ifndef WGETEXTURETOOLS_GLSL
#define WGETEXTURETOOLS_GLSL
#version 1
2
0
#version 1
3
0
#include "WGEUtils.glsl"
...
...
src/core/graphicsEngine/shaders/shaders/WGETransformationTools.glsl
View file @
8d33adaf
...
...
@@ -25,7 +25,7 @@
#ifndef WGETRANSFORMATIONTOOLS_GLSL
#define WGETRANSFORMATIONTOOLS_GLSL
#version 1
2
0
#version 1
3
0
/**
* Projects a given point to screen-space, where (0,0) is the lower left corner and (1,1) the upper right. The Depth
...
...
src/core/graphicsEngine/shaders/shaders/WGEUtils.glsl
View file @
8d33adaf
...
...
@@ -25,7 +25,7 @@
#ifndef WGEUTILS_GLSL
#define WGEUTILS_GLSL
#version 1
2
0
#version 1
3
0
/**
*
...
...
Prev
1
2
3
4
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment