Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/intern
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2017-05-17 03:46:42 +0300
committerCampbell Barton <ideasman42@gmail.com>2017-05-17 03:46:42 +0300
commit8adec78ca574f09242aa4588ad04f498f1e074aa (patch)
tree0f0dbfb1d280a160756a9a4d55fe123bb3ba36e6 /intern
parentc8bf3984ee806cd035c47aa5d7f99828f5667dd7 (diff)
Cleanup: remove GLSL version checks
Diffstat (limited to 'intern')
-rw-r--r--intern/opencolorio/gpu_shader_display_transform.glsl11
-rw-r--r--intern/opencolorio/gpu_shader_display_transform_vertex.glsl12
-rw-r--r--intern/opensubdiv/gpu_shader_opensubdiv_geometry.glsl15
-rw-r--r--intern/opensubdiv/gpu_shader_opensubdiv_vertex.glsl7
4 files changed, 8 insertions, 37 deletions
diff --git a/intern/opencolorio/gpu_shader_display_transform.glsl b/intern/opencolorio/gpu_shader_display_transform.glsl
index 4a63405045d..372d41dfecb 100644
--- a/intern/opencolorio/gpu_shader_display_transform.glsl
+++ b/intern/opencolorio/gpu_shader_display_transform.glsl
@@ -10,14 +10,9 @@ uniform float image_texture_width;
uniform float image_texture_height;
#endif
-#if __VERSION__ < 130
- varying vec2 texCoord_interp;
- #define fragColor gl_FragColor
-#else
- in vec2 texCoord_interp;
- out vec4 fragColor;
- #define texture2D texture
-#endif
+in vec2 texCoord_interp;
+out vec4 fragColor;
+#define texture2D texture
#ifdef USE_CURVE_MAPPING
/* Curve mapping parameters
diff --git a/intern/opencolorio/gpu_shader_display_transform_vertex.glsl b/intern/opencolorio/gpu_shader_display_transform_vertex.glsl
index 7f30d4b55a6..054f7f3ec91 100644
--- a/intern/opencolorio/gpu_shader_display_transform_vertex.glsl
+++ b/intern/opencolorio/gpu_shader_display_transform_vertex.glsl
@@ -1,15 +1,9 @@
uniform mat4 ModelViewProjectionMatrix;
-#if __VERSION__ == 120
- attribute vec2 texCoord;
- attribute vec2 pos;
- varying vec2 texCoord_interp;
-#else
- in vec2 texCoord;
- in vec2 pos;
- out vec2 texCoord_interp;
-#endif
+in vec2 texCoord;
+in vec2 pos;
+out vec2 texCoord_interp;
void main()
{
diff --git a/intern/opensubdiv/gpu_shader_opensubdiv_geometry.glsl b/intern/opensubdiv/gpu_shader_opensubdiv_geometry.glsl
index 3a83d44a8be..b16a5cca733 100644
--- a/intern/opensubdiv/gpu_shader_opensubdiv_geometry.glsl
+++ b/intern/opensubdiv/gpu_shader_opensubdiv_geometry.glsl
@@ -29,22 +29,11 @@ struct VertexData {
vec2 uv;
};
-#if __VERSION__ >= 150
layout(lines_adjacency) in;
- #ifdef WIREFRAME
+#ifdef WIREFRAME
layout(line_strip, max_vertices = 8) out;
- #else
-layout(triangle_strip, max_vertices = 4) out;
- #endif
#else
- #extension GL_EXT_geometry_shader4: require
- /* application provides input/output layout info */
-#endif
-
-#if __VERSION__ < 140
- #extension GL_ARB_uniform_buffer_object: require
- #extension GL_ARB_texture_buffer_object: enable
- #extension GL_EXT_texture_buffer_object: enable
+layout(triangle_strip, max_vertices = 4) out;
#endif
uniform mat4 modelViewMatrix;
diff --git a/intern/opensubdiv/gpu_shader_opensubdiv_vertex.glsl b/intern/opensubdiv/gpu_shader_opensubdiv_vertex.glsl
index 6d3c06f59c9..6fcf5ad20cd 100644
--- a/intern/opensubdiv/gpu_shader_opensubdiv_vertex.glsl
+++ b/intern/opensubdiv/gpu_shader_opensubdiv_vertex.glsl
@@ -43,11 +43,4 @@ void main()
{
outpt.v.position = modelViewMatrix * position;
outpt.v.normal = normalize(normalMatrix * normal);
-
-#if __VERSION__ < 140
- /* Some compilers expects gl_Position to be written.
- * It's not needed once we explicitly switch to GLSL 1.40 or above.
- */
- gl_Position = outpt.v.position;
-#endif
}