Commit 3916a108 authored by Francois Bertel's avatar Francois Bertel

ENH:New rule of thumb for GLSL. Start any shader code with version 110 in...

ENH:New rule of thumb for GLSL. Start any shader code with version 110 in order to detect errors on Linux/nVidia, as by default nVidia GLSL compiler on Linux tolerates everything and is equivalent to 110 as the spec states.
parent c1cb838c
......@@ -15,6 +15,8 @@
// Fragment shader used by the composite z render pass.
#version 110
uniform sampler2D depth;
void main(void)
......
......@@ -16,6 +16,8 @@
//
// Fragment shader used by the depth peeling algorithm.
#version 110
#extension GL_ARB_texture_rectangle: enable
uniform sampler2DRectShadow shadowTex;
......
......@@ -15,6 +15,8 @@
// Fragment shader used by the gaussian blur filter render pass.
#version 110
uniform sampler2D source;
uniform float coef[3];
uniform float offsetx;
......
......@@ -16,6 +16,7 @@
// This file defines some lighting functions.
// They can be used either in a vertex or fragment shader.
#version 110
// Example in vertex shader:
// Reminder: two-sided/one-sided is controlled by GL_VERTEX_PROGRAM_TWO_SIDE
......
......@@ -18,6 +18,8 @@
// defined by the user on a property. For example, the depth peeling algorithm
// defines its own main() function for the fragment shader.
#version 110
void propFuncFS();
void main()
......
......@@ -17,6 +17,8 @@
// no main() is provided at the renderer level and some vertex shader is
// defined by the user on a property.
#version 110
void propFuncVS();
void main()
......
......@@ -15,6 +15,8 @@
// Default fragment shader used on property.
#version 110
uniform int useTexture;
uniform sampler2D texture;
......
......@@ -15,6 +15,8 @@
// Default vertex shader used on property.
#version 110
void propFuncVS()
{
// default is empty. So far.
......
......@@ -16,6 +16,8 @@
//
// Fragment shader used by the depth peeling algorithm.
#version 110
// #extension GL_ARB_texture_rectangle: enable
uniform sampler2DRectShadow shadowTex;
......
......@@ -15,6 +15,8 @@
// Fragment shader used by the shadow mapping render pass.
#version 110
// NOTE: this shader is concatened on the fly by vtkShadowMapPass.cxx by adding
// a line at the beginning like:
// #define VTK_LIGHTING_NUMBER_OF_LIGHTS equal to the number of shadowing
......
......@@ -15,11 +15,14 @@
// Vertex shader used by the shadow mapping render pass.
#version 110
// NOTE: this shader is concatened on the fly by vtkShadowMapPass.cxx by adding
// a line at the beginning like:
// #define VTK_LIGHTING_NUMBER_OF_LIGHTS equal to the number of shadowing
// lights.
void propFuncVS();
// defined in vtkLighting_s.glsl
......
......@@ -15,6 +15,8 @@
// Fragment shader used by the first pass of the Sobel filter render pass.
#version 110
uniform sampler2D source;
uniform float step; // 1/W
......
......@@ -15,6 +15,8 @@
// Fragment shader used by the second pass of the Sobel filter render pass.
#version 110
uniform sampler2D gx1;
uniform sampler2D gy1;
uniform float step; // 1/H
......
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