Commit a1df4dd4 by Sebastian Eichelbaum

[FIX #289] raised shader version levels to 130 to fix some issues with more…

[FIX #289] raised shader version levels to 130 to fix some issues with more strict glsl compilers due to features we use which where not available in 120.
parent 441fcab5
......@@ -25,7 +25,7 @@
#ifndef WGECOLORMAPS_GLSL
#define WGECOLORMAPS_GLSL
#version 120
#version 130
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 cmactive )
{
// 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( cmactive ) * alpha );
}
#endif // WGECOLORMAPS_GLSL
......
......@@ -25,7 +25,7 @@
#ifndef WGECOLORMAPSIMPROVED_GLSL
#define WGECOLORMAPSIMPROVED_GLSL
#version 120
#version 130
#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 cmactive )
{
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// 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( cmactive ) ); // is it active?
}
#endif // WGECOLORMAPS_GLSL
......
......@@ -25,7 +25,7 @@
#ifndef WGECOLORMAPPING_FRAGMENT_GLSL
#define WGECOLORMAPPING_FRAGMENT_GLSL
#version 120
#version 130
#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 cmactive )
{
// 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, cmactive ),
// colormap( texture3D( sampler, c100 ).rgba, minV, scaleV, thresholdV, thresholdEnabled, alpha, cmap, cmactive ), coordDiff.x );
// vec4 v10 = mix( colormap( texture3D( sampler, c010 ).rgba, minV, scaleV, thresholdV, thresholdEnabled, alpha, cmap, cmactive ),
// colormap( texture3D( sampler, c110 ).rgba, minV, scaleV, thresholdV, thresholdEnabled, alpha, cmap, cmactive ), coordDiff.x );
// vec4 v01 = mix( colormap( texture3D( sampler, c001 ).rgba, minV, scaleV, thresholdV, thresholdEnabled, alpha, cmap, cmactive ),
// colormap( texture3D( sampler, c101 ).rgba, minV, scaleV, thresholdV, thresholdEnabled, alpha, cmap, cmactive ), coordDiff.x );
// vec4 v11 = mix( colormap( texture3D( sampler, c011 ).rgba, minV, scaleV, thresholdV, thresholdEnabled, alpha, cmap, cmactive ),
// colormap( texture3D( sampler, c111 ).rgba, minV, scaleV, thresholdV, thresholdEnabled, alpha, cmap, cmactive ), 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, cmactive );
// compositing:
// associated colors needed
......
......@@ -25,7 +25,7 @@
#ifndef WGECOLORMAPPING_UNIFORMS_GLSL
#define WGECOLORMAPPING_UNIFORMS_GLSL
#version 120
#version 130
// All the uniforms needed. These uniforms get set by the WGEColormapping class for your Node.
......
......@@ -25,7 +25,7 @@
#ifndef WGECOLORMAPPING_VARYINGS_GLSL
#define WGECOLORMAPPING_VARYINGS_GLSL
#version 120
#version 130
/**
* The texture coordinate in local texture space.
......
......@@ -25,7 +25,7 @@
#ifndef WGECOLORMAPPING_VERTEX_GLSL
#define WGECOLORMAPPING_VERTEX_GLSL
#version 120
#version 130
#include "WGEColormapping-uniforms.glsl"
#include "WGEColormapping-varyings.glsl"
......
......@@ -22,7 +22,7 @@
//
//---------------------------------------------------------------------------
#version 120
#version 130
#include "WGEShadingTools.glsl"
......
......@@ -22,7 +22,7 @@
//
//---------------------------------------------------------------------------
#version 120
#version 130
/**
* The normal.
......
......@@ -22,7 +22,7 @@
//
//---------------------------------------------------------------------------
#version 120
#version 130
#include "WGEShadingTools.glsl"
......
......@@ -22,7 +22,7 @@
//
//---------------------------------------------------------------------------
#version 120
#version 130
#include "WGETransformationTools.glsl"
......
......@@ -25,7 +25,7 @@
#ifndef WGEPOSTPROCESSING_GLSL
#define WGEPOSTPROCESSING_GLSL
#version 120
#version 130
// This defines some stuff needed to enable your shader to allow the result to be post-processed.
// You'll need to do the following:
......
......@@ -25,7 +25,7 @@
#ifndef WGEPOSTPROCESSOR_VERTEX_GLSL
#define WGEPOSTPROCESSOR_VERTEX_GLSL
#version 120
#version 130
#include "WGEPostprocessorUtils-vertex.glsl"
......
......@@ -25,7 +25,7 @@
#ifndef WGEPOSTPROCESSORCOMBINER_FRAGMENT_GLSL
#define WGEPOSTPROCESSORCOMBINER_FRAGMENT_GLSL
#version 120
#version 130
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Input-Texture Uniforms
......
......@@ -25,7 +25,7 @@
#ifndef WGEPOSTPROCESSORCOMBINER_VERTEX_GLSL
#define WGEPOSTPROCESSORCOMBINER_VERTEX_GLSL
#version 120
#version 130
/**
* Does transfer the quad to image space.
......
......@@ -25,7 +25,7 @@
#ifndef WGEPOSTPROCESSORUTILS_VERTEX_GLSL
#define WGEPOSTPROCESSORUTILS_VERTEX_GLSL
#version 120
#version 130
/**
* Does transfer the quad to image space.
......
......@@ -25,7 +25,7 @@
#ifndef WGESHADINGTOOLS_GLSL
#define WGESHADINGTOOLS_GLSL
#version 120
#version 130
/**
* A struct containing the needed light and material parameters commonly used in most shaders.
......
......@@ -25,7 +25,7 @@
#ifndef WGETENSORTOOLS_GLSL
#define WGETENSORTOOLS_GLSL
#version 120
#version 130
// (c) 2007 by Mario Hlawitschka
......
......@@ -25,7 +25,7 @@
#ifndef WGETEXTURETOOLS_GLSL
#define WGETEXTURETOOLS_GLSL
#version 120
#version 130
#include "WGEUtils.glsl"
......
......@@ -25,7 +25,7 @@
#ifndef WGETRANSFORMATIONTOOLS_GLSL
#define WGETRANSFORMATIONTOOLS_GLSL
#version 120
#version 130
/**
* Projects a given point to screen-space, where (0,0) is the lower left corner and (1,1) the upper right. The Depth
......
......@@ -25,7 +25,7 @@
#ifndef WGEUTILS_GLSL
#define WGEUTILS_GLSL
#version 120
#version 130
/**
*
......
......@@ -22,7 +22,7 @@
//
//---------------------------------------------------------------------------
#version 120
#version 130
#include "WGEColormapping-fragment.glsl"
......
......@@ -22,7 +22,7 @@
//
//---------------------------------------------------------------------------
#version 120
#version 130
#include "WGEColormapping-vertex.glsl"
......
......@@ -22,7 +22,7 @@
//
//---------------------------------------------------------------------------
#version 120
#version 130
#include "WGEColorMaps.glsl"
......
......@@ -22,7 +22,7 @@
//
//---------------------------------------------------------------------------
#version 120
#version 130
/////////////////////////////////////////////////////////////////////////////
// Varyings
......
......@@ -22,7 +22,7 @@
//
//---------------------------------------------------------------------------
#version 120
#version 130
/**
* Texture sampler for the face-label texture
......
......@@ -22,7 +22,7 @@
//
//---------------------------------------------------------------------------
#version 120
#version 130
void main()
{
......
......@@ -22,7 +22,7 @@
//
//---------------------------------------------------------------------------
#version 120
#version 130
#ifdef LOCALILLUMINATION_PHONG
#include "WGEShadingTools.glsl"
......
......@@ -22,7 +22,7 @@
//
//---------------------------------------------------------------------------
#version 120
#version 130
#include "WGETransformationTools.glsl"
......
......@@ -22,7 +22,7 @@
//
//---------------------------------------------------------------------------
#version 120
#version 130
#extension GL_EXT_geometry_shader4 : enable
......
......@@ -22,7 +22,7 @@
//
//---------------------------------------------------------------------------
#version 120
#version 130
#extension GL_EXT_geometry_shader4 : enable
......
......@@ -22,7 +22,7 @@
//
//---------------------------------------------------------------------------
#version 120
#version 130
#extension GL_EXT_geometry_shader4 : enable
......
......@@ -22,7 +22,7 @@
//
//---------------------------------------------------------------------------
#version 120
#version 130
#include "WGEColormapping-fragment.glsl"
......
......@@ -22,7 +22,7 @@
//
//---------------------------------------------------------------------------
#version 120
#version 130
#include "WGEColormapping-vertex.glsl"
......
......@@ -22,7 +22,7 @@
//
//---------------------------------------------------------------------------
#version 120
#version 130
#extension GL_EXT_gpu_shader4 : enable
#include "WGEUtils.glsl"
......
......@@ -22,7 +22,7 @@
//
//---------------------------------------------------------------------------
#version 120
#version 130
void main()
{
......
......@@ -22,7 +22,7 @@
//
//---------------------------------------------------------------------------
#version 120
#version 130
void main()
{
......
......@@ -22,7 +22,7 @@
//
//---------------------------------------------------------------------------
#version 120
#version 130
/**
* The texture Unit for the depth field
......
......@@ -22,7 +22,7 @@
//
//---------------------------------------------------------------------------
#version 120
#version 130
void main()
{
......
......@@ -22,7 +22,7 @@
//
//---------------------------------------------------------------------------
#version 120
#version 130
#include "WGEColormapping-fragment.glsl"
......
......@@ -22,7 +22,7 @@
//
//---------------------------------------------------------------------------
#version 120
#version 130
#include "WGEColormapping-vertex.glsl"
......
......@@ -22,7 +22,7 @@
//
//---------------------------------------------------------------------------
#version 120
#version 130
#include "WGEColormapping-fragment.glsl"
#include "WGETextureTools.glsl"
......
......@@ -22,7 +22,7 @@
//
//---------------------------------------------------------------------------
#version 120
#version 130
#include "WGEColormapping-vertex.glsl"
#include "WGETransformationTools.glsl"
......
......@@ -22,7 +22,7 @@
//
//---------------------------------------------------------------------------
#version 120
#version 130
#include "WGEColormapping-fragment.glsl"
......
......@@ -22,7 +22,7 @@
//
//---------------------------------------------------------------------------
#version 120
#version 130
#include "WGEColormapping-vertex.glsl"
......
......@@ -22,7 +22,7 @@
//
//---------------------------------------------------------------------------
#version 120
#version 130
#include "WGEColormapping-fragment.glsl"
......
......@@ -22,7 +22,7 @@
//
//---------------------------------------------------------------------------
#version 120
#version 130
#include "WGEColormapping-vertex.glsl"
......
......@@ -22,7 +22,7 @@
//
//---------------------------------------------------------------------------
#version 120
#version 130
#extension GL_EXT_geometry_shader4 : enable
......
......@@ -22,7 +22,7 @@
//
//---------------------------------------------------------------------------
#version 120
#version 130
#extension GL_EXT_geometry_shader4 : enable
......
......@@ -22,7 +22,7 @@
//
//---------------------------------------------------------------------------
#version 120
#version 130
#extension GL_EXT_geometry_shader4 : enable
......
......@@ -22,7 +22,7 @@
//
//---------------------------------------------------------------------------
#version 120
#version 130
#include "WGEColormapping-fragment.glsl"
......
......@@ -22,7 +22,7 @@
//
//---------------------------------------------------------------------------
#version 120
#version 130
#include "WGEColormapping-vertex.glsl"
......
......@@ -22,7 +22,7 @@
//
//---------------------------------------------------------------------------
#version 120
#version 130
#include "WGEShadingTools.glsl"
#include "WGETextureTools.glsl"
......
......@@ -22,7 +22,7 @@
//
//---------------------------------------------------------------------------
#version 120
#version 130
#extension GL_ARB_gpu_shader5 : enable
// include some utility functions
......
......@@ -22,7 +22,7 @@
//
//---------------------------------------------------------------------------
#version 120
#version 130
varying vec4 verpos;
......
......@@ -22,7 +22,7 @@
//
//---------------------------------------------------------------------------
#version 120
#version 130
/**
* The normal.
......
......@@ -22,7 +22,7 @@
//
//---------------------------------------------------------------------------
#version 120
#version 130
#extension GL_EXT_gpu_shader4 : enable
#include "WGETextureTools.glsl"
......
......@@ -22,7 +22,7 @@
//
//---------------------------------------------------------------------------
#version 120
#version 130
#include "WGETransformationTools.glsl"
......
......@@ -22,7 +22,7 @@
//
//---------------------------------------------------------------------------
#version 120
#version 130
// the Surface normal at this point
varying vec3 v_normal;
......
......@@ -22,7 +22,7 @@
//
//---------------------------------------------------------------------------
#version 120
#version 130
/////////////////////////////////////////////////////////////////////////////
// Varyings
......
......@@ -22,7 +22,7 @@
//
//---------------------------------------------------------------------------
#version 120
#version 130
/////////////////////////////////////////////////////////////////////////////
// Varyings
......
......@@ -22,7 +22,7 @@
//
//---------------------------------------------------------------------------
#version 120
#version 130
#include "WGEColormapping-fragment.glsl"
......
......@@ -22,7 +22,7 @@
//
//---------------------------------------------------------------------------
#version 120
#version 130
#include "WGEColormapping-vertex.glsl"
......
......@@ -22,7 +22,7 @@
//
//---------------------------------------------------------------------------
#version 120
#version 130
#include "WGEColormapping-fragment.glsl"
#include "WGETextureTools.glsl"
......
......@@ -22,7 +22,7 @@
//
//---------------------------------------------------------------------------
#version 120
#version 130
#include "WGEColormapping-vertex.glsl"
#include "WGETransformationTools.glsl"
......
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