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/source
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 /source
parentc8bf3984ee806cd035c47aa5d7f99828f5667dd7 (diff)
Cleanup: remove GLSL version checks
Diffstat (limited to 'source')
-rw-r--r--source/blender/draw/modes/shaders/edit_curve_overlay_frag.glsl6
-rw-r--r--source/blender/draw/modes/shaders/edit_lattice_overlay_frag.glsl6
-rw-r--r--source/blender/gpu/shaders/gpu_shader_2D_flat_color_vert.glsl13
-rw-r--r--source/blender/gpu/shaders/gpu_shader_2D_image_vert.glsl12
-rw-r--r--source/blender/gpu/shaders/gpu_shader_2D_line_dashed_frag.glsl9
-rw-r--r--source/blender/gpu/shaders/gpu_shader_2D_line_dashed_legacy_vert.glsl9
-rw-r--r--source/blender/gpu/shaders/gpu_shader_2D_line_dashed_vert.glsl6
-rw-r--r--source/blender/gpu/shaders/gpu_shader_2D_point_uniform_size_aa_vert.glsl9
-rw-r--r--source/blender/gpu/shaders/gpu_shader_2D_point_uniform_size_outline_aa_vert.glsl9
-rw-r--r--source/blender/gpu/shaders/gpu_shader_2D_point_uniform_size_varying_color_outline_aa_vert.glsl15
-rw-r--r--source/blender/gpu/shaders/gpu_shader_2D_point_varying_size_varying_color_vert.glsl15
-rw-r--r--source/blender/gpu/shaders/gpu_shader_2D_smooth_color_frag.glsl9
-rw-r--r--source/blender/gpu/shaders/gpu_shader_2D_smooth_color_vert.glsl13
-rw-r--r--source/blender/gpu/shaders/gpu_shader_2D_vert.glsl6
-rw-r--r--source/blender/gpu/shaders/gpu_shader_3D_flat_color_vert.glsl19
-rw-r--r--source/blender/gpu/shaders/gpu_shader_3D_image_vert.glsl12
-rw-r--r--source/blender/gpu/shaders/gpu_shader_3D_line_dashed_legacy_vert.glsl9
-rw-r--r--source/blender/gpu/shaders/gpu_shader_3D_line_dashed_vert.glsl6
-rw-r--r--source/blender/gpu/shaders/gpu_shader_3D_normal_smooth_color_vert.glsl30
-rw-r--r--source/blender/gpu/shaders/gpu_shader_3D_normal_vert.glsl12
-rw-r--r--source/blender/gpu/shaders/gpu_shader_3D_point_fixed_size_varying_color_vert.glsl12
-rw-r--r--source/blender/gpu/shaders/gpu_shader_3D_point_uniform_size_aa_vert.glsl9
-rw-r--r--source/blender/gpu/shaders/gpu_shader_3D_point_uniform_size_outline_aa_vert.glsl9
-rw-r--r--source/blender/gpu/shaders/gpu_shader_3D_point_varying_size_varying_color_vert.glsl15
-rw-r--r--source/blender/gpu/shaders/gpu_shader_3D_point_varying_size_vert.glsl9
-rw-r--r--source/blender/gpu/shaders/gpu_shader_3D_smooth_color_frag.glsl9
-rw-r--r--source/blender/gpu/shaders/gpu_shader_3D_smooth_color_vert.glsl13
-rw-r--r--source/blender/gpu/shaders/gpu_shader_3D_vert.glsl6
-rw-r--r--source/blender/gpu/shaders/gpu_shader_checker_frag.glsl6
-rw-r--r--source/blender/gpu/shaders/gpu_shader_diag_stripes_frag.glsl6
-rw-r--r--source/blender/gpu/shaders/gpu_shader_edges_front_back_ortho_vert.glsl20
-rw-r--r--source/blender/gpu/shaders/gpu_shader_edges_front_back_persp_legacy_vert.glsl20
-rw-r--r--source/blender/gpu/shaders/gpu_shader_fire_frag.glsl13
-rw-r--r--source/blender/gpu/shaders/gpu_shader_flat_color_alpha_test_0_frag.glsl9
-rw-r--r--source/blender/gpu/shaders/gpu_shader_flat_color_frag.glsl9
-rw-r--r--source/blender/gpu/shaders/gpu_shader_fullscreen_vert.glsl12
-rw-r--r--source/blender/gpu/shaders/gpu_shader_fx_depth_resolve.glsl8
-rw-r--r--source/blender/gpu/shaders/gpu_shader_fx_dof_frag.glsl43
-rw-r--r--source/blender/gpu/shaders/gpu_shader_fx_dof_hq_frag.glsl55
-rw-r--r--source/blender/gpu/shaders/gpu_shader_fx_dof_hq_vert.glsl42
-rw-r--r--source/blender/gpu/shaders/gpu_shader_fx_dof_vert.glsl40
-rw-r--r--source/blender/gpu/shaders/gpu_shader_fx_ssao_frag.glsl15
-rw-r--r--source/blender/gpu/shaders/gpu_shader_image_alpha_color_frag.glsl11
-rw-r--r--source/blender/gpu/shaders/gpu_shader_image_color_frag.glsl11
-rw-r--r--source/blender/gpu/shaders/gpu_shader_image_depth_linear_frag.glsl11
-rw-r--r--source/blender/gpu/shaders/gpu_shader_image_interlace_frag.glsl23
-rw-r--r--source/blender/gpu/shaders/gpu_shader_image_mask_uniform_color_frag.glsl11
-rw-r--r--source/blender/gpu/shaders/gpu_shader_image_modulate_alpha_frag.glsl11
-rw-r--r--source/blender/gpu/shaders/gpu_shader_image_rect_modulate_alpha_frag.glsl11
-rw-r--r--source/blender/gpu/shaders/gpu_shader_image_shuffle_color_frag.glsl11
-rw-r--r--source/blender/gpu/shaders/gpu_shader_keyframe_diamond_frag.glsl15
-rw-r--r--source/blender/gpu/shaders/gpu_shader_keyframe_diamond_vert.glsl24
-rw-r--r--source/blender/gpu/shaders/gpu_shader_material.glsl35
-rw-r--r--source/blender/gpu/shaders/gpu_shader_point_uniform_color_aa_frag.glsl9
-rw-r--r--source/blender/gpu/shaders/gpu_shader_point_uniform_color_frag.glsl6
-rw-r--r--source/blender/gpu/shaders/gpu_shader_point_uniform_color_outline_aa_frag.glsl9
-rw-r--r--source/blender/gpu/shaders/gpu_shader_point_varying_color_frag.glsl9
-rw-r--r--source/blender/gpu/shaders/gpu_shader_point_varying_color_outline_aa_frag.glsl12
-rw-r--r--source/blender/gpu/shaders/gpu_shader_sep_gaussian_blur_frag.glsl11
-rw-r--r--source/blender/gpu/shaders/gpu_shader_sep_gaussian_blur_vert.glsl12
-rw-r--r--source/blender/gpu/shaders/gpu_shader_simple_lighting_frag.glsl16
-rw-r--r--source/blender/gpu/shaders/gpu_shader_simple_lighting_smooth_color_frag.glsl23
-rw-r--r--source/blender/gpu/shaders/gpu_shader_smoke_frag.glsl5
-rw-r--r--source/blender/gpu/shaders/gpu_shader_smoke_vert.glsl6
-rw-r--r--source/blender/gpu/shaders/gpu_shader_text_frag.glsl14
-rw-r--r--source/blender/gpu/shaders/gpu_shader_text_vert.glsl18
-rw-r--r--source/blender/gpu/shaders/gpu_shader_uniform_color_frag.glsl6
-rw-r--r--source/blender/gpu/shaders/gpu_shader_vertex.glsl9
-rw-r--r--source/blender/gpu/shaders/gpu_shader_vertex_world.glsl9
-rw-r--r--source/blender/gpu/shaders/gpu_shader_vsm_store_frag.glsl9
-rw-r--r--source/blender/gpu/shaders/gpu_shader_vsm_store_vert.glsl6
71 files changed, 244 insertions, 724 deletions
diff --git a/source/blender/draw/modes/shaders/edit_curve_overlay_frag.glsl b/source/blender/draw/modes/shaders/edit_curve_overlay_frag.glsl
index 57e96143c75..29bf0c18448 100644
--- a/source/blender/draw/modes/shaders/edit_curve_overlay_frag.glsl
+++ b/source/blender/draw/modes/shaders/edit_curve_overlay_frag.glsl
@@ -4,11 +4,7 @@ flat in int vertFlag;
#define VERTEX_SELECTED (1 << 0)
#define VERTEX_ACTIVE (1 << 1)
-#if __VERSION__ == 120
- #define FragColor gl_FragColor
-#else
- out vec4 FragColor;
-#endif
+out vec4 FragColor;
void main()
{
diff --git a/source/blender/draw/modes/shaders/edit_lattice_overlay_frag.glsl b/source/blender/draw/modes/shaders/edit_lattice_overlay_frag.glsl
index 57e96143c75..29bf0c18448 100644
--- a/source/blender/draw/modes/shaders/edit_lattice_overlay_frag.glsl
+++ b/source/blender/draw/modes/shaders/edit_lattice_overlay_frag.glsl
@@ -4,11 +4,7 @@ flat in int vertFlag;
#define VERTEX_SELECTED (1 << 0)
#define VERTEX_ACTIVE (1 << 1)
-#if __VERSION__ == 120
- #define FragColor gl_FragColor
-#else
- out vec4 FragColor;
-#endif
+out vec4 FragColor;
void main()
{
diff --git a/source/blender/gpu/shaders/gpu_shader_2D_flat_color_vert.glsl b/source/blender/gpu/shaders/gpu_shader_2D_flat_color_vert.glsl
index 96c833f3b93..769e2b0e37c 100644
--- a/source/blender/gpu/shaders/gpu_shader_2D_flat_color_vert.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_2D_flat_color_vert.glsl
@@ -1,17 +1,10 @@
uniform mat4 ModelViewProjectionMatrix;
-#if __VERSION__ == 120
- attribute vec2 pos;
- attribute vec4 color;
+in vec2 pos;
+in vec4 color;
- flat varying vec4 finalColor;
-#else
- in vec2 pos;
- in vec4 color;
-
- flat out vec4 finalColor;
-#endif
+flat out vec4 finalColor;
void main()
{
diff --git a/source/blender/gpu/shaders/gpu_shader_2D_image_vert.glsl b/source/blender/gpu/shaders/gpu_shader_2D_image_vert.glsl
index 2f26bb4d8d1..228f3f1da19 100644
--- a/source/blender/gpu/shaders/gpu_shader_2D_image_vert.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_2D_image_vert.glsl
@@ -2,15 +2,9 @@
uniform mat4 ModelViewProjectionMatrix;
/* Keep in sync with intern/opencolorio/gpu_shader_display_transform_vertex.glsl */
-#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/source/blender/gpu/shaders/gpu_shader_2D_line_dashed_frag.glsl b/source/blender/gpu/shaders/gpu_shader_2D_line_dashed_frag.glsl
index 1bca505390b..346d3b3c6d9 100644
--- a/source/blender/gpu/shaders/gpu_shader_2D_line_dashed_frag.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_2D_line_dashed_frag.glsl
@@ -1,13 +1,8 @@
// Draw dashed lines, perforated in screen space.
-#if __VERSION__ == 120
- noperspective varying float distance_along_line;
- #define fragColor gl_FragColor
-#else
- noperspective in float distance_along_line;
- out vec4 fragColor;
-#endif
+noperspective in float distance_along_line;
+out vec4 fragColor;
uniform float dash_width;
diff --git a/source/blender/gpu/shaders/gpu_shader_2D_line_dashed_legacy_vert.glsl b/source/blender/gpu/shaders/gpu_shader_2D_line_dashed_legacy_vert.glsl
index 82f88bfcd56..c401b2c17c3 100644
--- a/source/blender/gpu/shaders/gpu_shader_2D_line_dashed_legacy_vert.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_2D_line_dashed_legacy_vert.glsl
@@ -5,13 +5,8 @@
uniform mat4 ModelViewProjectionMatrix;
uniform vec2 viewport_size;
-#if __VERSION__ == 120
- attribute vec2 pos;
- noperspective varying float distance_along_line;
-#else
- in vec2 pos;
- noperspective out float distance_along_line;
-#endif
+in vec2 pos;
+noperspective out float distance_along_line;
void main()
{
diff --git a/source/blender/gpu/shaders/gpu_shader_2D_line_dashed_vert.glsl b/source/blender/gpu/shaders/gpu_shader_2D_line_dashed_vert.glsl
index d261ba0dc75..14f56d7e0dd 100644
--- a/source/blender/gpu/shaders/gpu_shader_2D_line_dashed_vert.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_2D_line_dashed_vert.glsl
@@ -3,11 +3,7 @@
uniform mat4 ModelViewProjectionMatrix;
-#if __VERSION__ == 120
- attribute vec2 pos;
-#else
- in vec2 pos;
-#endif
+in vec2 pos;
void main()
{
diff --git a/source/blender/gpu/shaders/gpu_shader_2D_point_uniform_size_aa_vert.glsl b/source/blender/gpu/shaders/gpu_shader_2D_point_uniform_size_aa_vert.glsl
index 201e5e90ecc..1f833cfb7be 100644
--- a/source/blender/gpu/shaders/gpu_shader_2D_point_uniform_size_aa_vert.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_2D_point_uniform_size_aa_vert.glsl
@@ -2,13 +2,8 @@
uniform mat4 ModelViewProjectionMatrix;
uniform float size;
-#if __VERSION__ == 120
- attribute vec2 pos;
- varying vec2 radii;
-#else
- in vec2 pos;
- out vec2 radii;
-#endif
+in vec2 pos;
+out vec2 radii;
void main() {
gl_Position = ModelViewProjectionMatrix * vec4(pos, 0.0, 1.0);
diff --git a/source/blender/gpu/shaders/gpu_shader_2D_point_uniform_size_outline_aa_vert.glsl b/source/blender/gpu/shaders/gpu_shader_2D_point_uniform_size_outline_aa_vert.glsl
index a37ae16f837..99bdeb22904 100644
--- a/source/blender/gpu/shaders/gpu_shader_2D_point_uniform_size_outline_aa_vert.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_2D_point_uniform_size_outline_aa_vert.glsl
@@ -3,13 +3,8 @@ uniform mat4 ModelViewProjectionMatrix;
uniform float size;
uniform float outlineWidth;
-#if __VERSION__ == 120
- attribute vec2 pos;
- varying vec4 radii;
-#else
- in vec2 pos;
- out vec4 radii;
-#endif
+in vec2 pos;
+out vec4 radii;
void main() {
gl_Position = ModelViewProjectionMatrix * vec4(pos, 0.0, 1.0);
diff --git a/source/blender/gpu/shaders/gpu_shader_2D_point_uniform_size_varying_color_outline_aa_vert.glsl b/source/blender/gpu/shaders/gpu_shader_2D_point_uniform_size_varying_color_outline_aa_vert.glsl
index d3a142cc7bd..5fad95236df 100644
--- a/source/blender/gpu/shaders/gpu_shader_2D_point_uniform_size_varying_color_outline_aa_vert.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_2D_point_uniform_size_varying_color_outline_aa_vert.glsl
@@ -3,17 +3,10 @@ uniform mat4 ModelViewProjectionMatrix;
uniform float size;
uniform float outlineWidth;
-#if __VERSION__ == 120
- attribute vec2 pos;
- attribute vec4 color;
- varying vec4 radii;
- varying vec4 fillColor;
-#else
- in vec2 pos;
- in vec4 color;
- out vec4 radii;
- out vec4 fillColor;
-#endif
+in vec2 pos;
+in vec4 color;
+out vec4 radii;
+out vec4 fillColor;
void main() {
gl_Position = ModelViewProjectionMatrix * vec4(pos, 0.0, 1.0);
diff --git a/source/blender/gpu/shaders/gpu_shader_2D_point_varying_size_varying_color_vert.glsl b/source/blender/gpu/shaders/gpu_shader_2D_point_varying_size_varying_color_vert.glsl
index 42ff51e3d03..d6aacf0cdc5 100644
--- a/source/blender/gpu/shaders/gpu_shader_2D_point_varying_size_varying_color_vert.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_2D_point_varying_size_varying_color_vert.glsl
@@ -1,17 +1,10 @@
uniform mat4 ModelViewProjectionMatrix;
-#if __VERSION__ == 120
- attribute vec2 pos;
- attribute float size;
- attribute vec4 color;
- varying vec4 finalColor;
-#else
- in vec2 pos;
- in float size;
- in vec4 color;
- out vec4 finalColor;
-#endif
+in vec2 pos;
+in float size;
+in vec4 color;
+out vec4 finalColor;
void main()
{
diff --git a/source/blender/gpu/shaders/gpu_shader_2D_smooth_color_frag.glsl b/source/blender/gpu/shaders/gpu_shader_2D_smooth_color_frag.glsl
index 654439d1feb..4a4bfb6a616 100644
--- a/source/blender/gpu/shaders/gpu_shader_2D_smooth_color_frag.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_2D_smooth_color_frag.glsl
@@ -1,11 +1,6 @@
-#if __VERSION__ == 120
- noperspective varying vec4 finalColor;
- #define fragColor gl_FragColor
-#else
- noperspective in vec4 finalColor;
- out vec4 fragColor;
-#endif
+noperspective in vec4 finalColor;
+out vec4 fragColor;
void main()
{
diff --git a/source/blender/gpu/shaders/gpu_shader_2D_smooth_color_vert.glsl b/source/blender/gpu/shaders/gpu_shader_2D_smooth_color_vert.glsl
index 9daf2d75016..fe91f4d0902 100644
--- a/source/blender/gpu/shaders/gpu_shader_2D_smooth_color_vert.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_2D_smooth_color_vert.glsl
@@ -1,17 +1,10 @@
uniform mat4 ModelViewProjectionMatrix;
-#if __VERSION__ == 120
- attribute vec2 pos;
- attribute vec4 color;
+in vec2 pos;
+in vec4 color;
- noperspective varying vec4 finalColor;
-#else
- in vec2 pos;
- in vec4 color;
-
- noperspective out vec4 finalColor;
-#endif
+noperspective out vec4 finalColor;
void main()
{
diff --git a/source/blender/gpu/shaders/gpu_shader_2D_vert.glsl b/source/blender/gpu/shaders/gpu_shader_2D_vert.glsl
index 4049171f73d..89e3c52f9f8 100644
--- a/source/blender/gpu/shaders/gpu_shader_2D_vert.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_2D_vert.glsl
@@ -1,11 +1,7 @@
uniform mat4 ModelViewProjectionMatrix;
-#if __VERSION__ == 120
- attribute vec2 pos;
-#else
- in vec2 pos;
-#endif
+in vec2 pos;
void main()
{
diff --git a/source/blender/gpu/shaders/gpu_shader_3D_flat_color_vert.glsl b/source/blender/gpu/shaders/gpu_shader_3D_flat_color_vert.glsl
index f65fbe2a2e2..7dccddf8acf 100644
--- a/source/blender/gpu/shaders/gpu_shader_3D_flat_color_vert.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_3D_flat_color_vert.glsl
@@ -1,25 +1,14 @@
uniform mat4 ModelViewProjectionMatrix;
-#if __VERSION__ == 120
- attribute vec3 pos;
+in vec3 pos;
#if defined(USE_COLOR_U32)
- attribute int color;
+in int color;
#else
- attribute vec4 color;
+in vec4 color;
#endif
- flat varying vec4 finalColor;
-#else
- in vec3 pos;
-#if defined(USE_COLOR_U32)
- in int color;
-#else
- in vec4 color;
-#endif
-
- flat out vec4 finalColor;
-#endif
+flat out vec4 finalColor;
void main()
{
diff --git a/source/blender/gpu/shaders/gpu_shader_3D_image_vert.glsl b/source/blender/gpu/shaders/gpu_shader_3D_image_vert.glsl
index e9f847f28b3..eb877ab20b6 100644
--- a/source/blender/gpu/shaders/gpu_shader_3D_image_vert.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_3D_image_vert.glsl
@@ -1,15 +1,9 @@
uniform mat4 ModelViewProjectionMatrix;
-#if __VERSION__ == 120
- attribute vec2 texCoord;
- attribute vec3 pos;
- varying vec2 texCoord_interp;
-#else
- in vec2 texCoord;
- in vec3 pos;
- out vec2 texCoord_interp;
-#endif
+in vec2 texCoord;
+in vec3 pos;
+out vec2 texCoord_interp;
void main()
{
diff --git a/source/blender/gpu/shaders/gpu_shader_3D_line_dashed_legacy_vert.glsl b/source/blender/gpu/shaders/gpu_shader_3D_line_dashed_legacy_vert.glsl
index 9587ac65116..eab4c1b4543 100644
--- a/source/blender/gpu/shaders/gpu_shader_3D_line_dashed_legacy_vert.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_3D_line_dashed_legacy_vert.glsl
@@ -4,13 +4,8 @@
uniform mat4 ModelViewProjectionMatrix;
uniform vec2 viewport_size;
-#if __VERSION__ == 120
- attribute vec3 pos;
- noperspective varying float distance_along_line;
-#else
- in vec3 pos;
- noperspective out float distance_along_line;
-#endif
+in vec3 pos;
+noperspective out float distance_along_line;
void main()
{
diff --git a/source/blender/gpu/shaders/gpu_shader_3D_line_dashed_vert.glsl b/source/blender/gpu/shaders/gpu_shader_3D_line_dashed_vert.glsl
index f86088e8d79..a02b0d219fb 100644
--- a/source/blender/gpu/shaders/gpu_shader_3D_line_dashed_vert.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_3D_line_dashed_vert.glsl
@@ -3,11 +3,7 @@
uniform mat4 ModelViewProjectionMatrix;
-#if __VERSION__ == 120
- attribute vec3 pos;
-#else
- in vec3 pos;
-#endif
+in vec3 pos;
void main()
{
diff --git a/source/blender/gpu/shaders/gpu_shader_3D_normal_smooth_color_vert.glsl b/source/blender/gpu/shaders/gpu_shader_3D_normal_smooth_color_vert.glsl
index e29cfd5ab1c..e6b8fed7265 100644
--- a/source/blender/gpu/shaders/gpu_shader_3D_normal_smooth_color_vert.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_3D_normal_smooth_color_vert.glsl
@@ -2,30 +2,16 @@
uniform mat4 ModelViewProjectionMatrix;
uniform mat3 NormalMatrix;
-#if __VERSION__ == 120
- attribute vec3 pos;
- attribute vec3 nor;
- attribute vec4 color;
+in vec3 pos;
+in vec3 nor;
+in vec4 color;
-# ifdef USE_FLAT_NORMAL
- flat varying vec4 finalColor;
- flat varying vec3 normal;
-# else
- varying vec4 finalColor;
- varying vec3 normal;
-# endif
+#ifdef USE_FLAT_NORMAL
+flat out vec3 normal;
+flat out vec4 finalColor;
#else
- in vec3 pos;
- in vec3 nor;
- in vec4 color;
-
-# ifdef USE_FLAT_NORMAL
- flat out vec3 normal;
- flat out vec4 finalColor;
-# else
- out vec3 normal;
- out vec4 finalColor;
-# endif
+out vec3 normal;
+out vec4 finalColor;
#endif
void main()
diff --git a/source/blender/gpu/shaders/gpu_shader_3D_normal_vert.glsl b/source/blender/gpu/shaders/gpu_shader_3D_normal_vert.glsl
index 5084e438d40..a3f447a85f9 100644
--- a/source/blender/gpu/shaders/gpu_shader_3D_normal_vert.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_3D_normal_vert.glsl
@@ -2,15 +2,9 @@
uniform mat4 ModelViewProjectionMatrix;
uniform mat3 NormalMatrix;
-#if __VERSION__ == 120
- attribute vec3 pos;
- attribute vec3 nor;
- varying vec3 normal;
-#else
- in vec3 pos;
- in vec3 nor;
- out vec3 normal;
-#endif
+in vec3 pos;
+in vec3 nor;
+out vec3 normal;
void main()
{
diff --git a/source/blender/gpu/shaders/gpu_shader_3D_point_fixed_size_varying_color_vert.glsl b/source/blender/gpu/shaders/gpu_shader_3D_point_fixed_size_varying_color_vert.glsl
index 84e77e59e90..2fe9c0623fa 100644
--- a/source/blender/gpu/shaders/gpu_shader_3D_point_fixed_size_varying_color_vert.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_3D_point_fixed_size_varying_color_vert.glsl
@@ -1,15 +1,9 @@
uniform mat4 ModelViewProjectionMatrix;
-#if __VERSION__ == 120
- attribute vec3 pos;
- attribute vec4 color;
- varying vec4 finalColor;
-#else
- in vec3 pos;
- in vec4 color;
- out vec4 finalColor;
-#endif
+in vec3 pos;
+in vec4 color;
+out vec4 finalColor;
void main()
{
diff --git a/source/blender/gpu/shaders/gpu_shader_3D_point_uniform_size_aa_vert.glsl b/source/blender/gpu/shaders/gpu_shader_3D_point_uniform_size_aa_vert.glsl
index 287f95b48ab..ebc945fcf35 100644
--- a/source/blender/gpu/shaders/gpu_shader_3D_point_uniform_size_aa_vert.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_3D_point_uniform_size_aa_vert.glsl
@@ -2,13 +2,8 @@
uniform mat4 ModelViewProjectionMatrix;
uniform float size;
-#if __VERSION__ == 120
- attribute vec3 pos;
- varying vec2 radii;
-#else
- in vec3 pos;
- out vec2 radii;
-#endif
+in vec3 pos;
+out vec2 radii;
void main() {
gl_Position = ModelViewProjectionMatrix * vec4(pos, 1.0);
diff --git a/source/blender/gpu/shaders/gpu_shader_3D_point_uniform_size_outline_aa_vert.glsl b/source/blender/gpu/shaders/gpu_shader_3D_point_uniform_size_outline_aa_vert.glsl
index d05920002ed..0d6b90cfba4 100644
--- a/source/blender/gpu/shaders/gpu_shader_3D_point_uniform_size_outline_aa_vert.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_3D_point_uniform_size_outline_aa_vert.glsl
@@ -3,13 +3,8 @@ uniform mat4 ModelViewProjectionMatrix;
uniform float size;
uniform float outlineWidth;
-#if __VERSION__ == 120
- attribute vec3 pos;
- varying vec4 radii;
-#else
- in vec3 pos;
- out vec4 radii;
-#endif
+in vec3 pos;
+out vec4 radii;
void main() {
gl_Position = ModelViewProjectionMatrix * vec4(pos, 1.0);
diff --git a/source/blender/gpu/shaders/gpu_shader_3D_point_varying_size_varying_color_vert.glsl b/source/blender/gpu/shaders/gpu_shader_3D_point_varying_size_varying_color_vert.glsl
index 7999435f0e4..e14b9535c89 100644
--- a/source/blender/gpu/shaders/gpu_shader_3D_point_varying_size_varying_color_vert.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_3D_point_varying_size_varying_color_vert.glsl
@@ -1,17 +1,10 @@
uniform mat4 ModelViewProjectionMatrix;
-#if __VERSION__ == 120
- attribute vec3 pos;
- attribute float size;
- attribute vec4 color;
- varying vec4 finalColor;
-#else
- in vec3 pos;
- in float size;
- in vec4 color;
- out vec4 finalColor;
-#endif
+in vec3 pos;
+in float size;
+in vec4 color;
+out vec4 finalColor;
void main()
{
diff --git a/source/blender/gpu/shaders/gpu_shader_3D_point_varying_size_vert.glsl b/source/blender/gpu/shaders/gpu_shader_3D_point_varying_size_vert.glsl
index 1fcda765b99..e4f173ab617 100644
--- a/source/blender/gpu/shaders/gpu_shader_3D_point_varying_size_vert.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_3D_point_varying_size_vert.glsl
@@ -1,13 +1,8 @@
uniform mat4 ModelViewProjectionMatrix;
-#if __VERSION__ == 120
- attribute vec3 pos;
- attribute float size;
-#else
- in vec3 pos;
- in float size;
-#endif
+in vec3 pos;
+in float size;
void main()
{
diff --git a/source/blender/gpu/shaders/gpu_shader_3D_smooth_color_frag.glsl b/source/blender/gpu/shaders/gpu_shader_3D_smooth_color_frag.glsl
index 955a49aa7d2..41fdefd22e8 100644
--- a/source/blender/gpu/shaders/gpu_shader_3D_smooth_color_frag.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_3D_smooth_color_frag.glsl
@@ -1,11 +1,6 @@
-#if __VERSION__ == 120
- varying vec4 finalColor;
- #define fragColor gl_FragColor
-#else
- in vec4 finalColor;
- out vec4 fragColor;
-#endif
+in vec4 finalColor;
+out vec4 fragColor;
void main()
{
diff --git a/source/blender/gpu/shaders/gpu_shader_3D_smooth_color_vert.glsl b/source/blender/gpu/shaders/gpu_shader_3D_smooth_color_vert.glsl
index 22c2cfa8b93..a1feb2f75b7 100644
--- a/source/blender/gpu/shaders/gpu_shader_3D_smooth_color_vert.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_3D_smooth_color_vert.glsl
@@ -1,17 +1,10 @@
uniform mat4 ModelViewProjectionMatrix;
-#if __VERSION__ == 120
- attribute vec3 pos;
- attribute vec4 color;
+in vec3 pos;
+in vec4 color;
- varying vec4 finalColor;
-#else
- in vec3 pos;
- in vec4 color;
-
- out vec4 finalColor;
-#endif
+out vec4 finalColor;
void main()
{
diff --git a/source/blender/gpu/shaders/gpu_shader_3D_vert.glsl b/source/blender/gpu/shaders/gpu_shader_3D_vert.glsl
index 32da3a99c63..059473ebb74 100644
--- a/source/blender/gpu/shaders/gpu_shader_3D_vert.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_3D_vert.glsl
@@ -1,11 +1,7 @@
uniform mat4 ModelViewProjectionMatrix;
-#if __VERSION__ == 120
- attribute vec3 pos;
-#else
- in vec3 pos;
-#endif
+in vec3 pos;
void main()
{
diff --git a/source/blender/gpu/shaders/gpu_shader_checker_frag.glsl b/source/blender/gpu/shaders/gpu_shader_checker_frag.glsl
index 3b24af916a0..545f6d19e21 100644
--- a/source/blender/gpu/shaders/gpu_shader_checker_frag.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_checker_frag.glsl
@@ -3,11 +3,7 @@ uniform vec4 color1;
uniform vec4 color2;
uniform int size;
-#if __VERSION__ == 120
- #define fragColor gl_FragColor
-#else
- out vec4 fragColor;
-#endif
+out vec4 fragColor;
void main()
{
diff --git a/source/blender/gpu/shaders/gpu_shader_diag_stripes_frag.glsl b/source/blender/gpu/shaders/gpu_shader_diag_stripes_frag.glsl
index 74cf1c5a3dc..beb71c58100 100644
--- a/source/blender/gpu/shaders/gpu_shader_diag_stripes_frag.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_diag_stripes_frag.glsl
@@ -4,11 +4,7 @@ uniform vec4 color2;
uniform int size1;
uniform int size2;
-#if __VERSION__ == 120
- #define fragColor gl_FragColor
-#else
- out vec4 fragColor;
-#endif
+out vec4 fragColor;
void main()
{
diff --git a/source/blender/gpu/shaders/gpu_shader_edges_front_back_ortho_vert.glsl b/source/blender/gpu/shaders/gpu_shader_edges_front_back_ortho_vert.glsl
index ed281141e16..4ed7ed56c11 100644
--- a/source/blender/gpu/shaders/gpu_shader_edges_front_back_ortho_vert.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_edges_front_back_ortho_vert.glsl
@@ -15,23 +15,13 @@ uniform vec3 eye; // direction we are looking
uniform mat4 ModelViewProjectionMatrix;
-#if __VERSION__ == 120
- attribute vec3 pos;
+in vec3 pos;
- // normals of faces this edge joins (object coords)
- attribute vec3 N1;
- attribute vec3 N2;
+// normals of faces this edge joins (object coords)
+in vec3 N1;
+in vec3 N2;
- flat varying vec4 finalColor;
-#else
- in vec3 pos;
-
- // normals of faces this edge joins (object coords)
- in vec3 N1;
- in vec3 N2;
-
- flat out vec4 finalColor;
-#endif
+flat out vec4 finalColor;
// TODO: in float angle; // [-pi .. +pi], + peak, 0 flat, - valley
diff --git a/source/blender/gpu/shaders/gpu_shader_edges_front_back_persp_legacy_vert.glsl b/source/blender/gpu/shaders/gpu_shader_edges_front_back_persp_legacy_vert.glsl
index baf69c3e272..30b3bdb890d 100644
--- a/source/blender/gpu/shaders/gpu_shader_edges_front_back_persp_legacy_vert.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_edges_front_back_persp_legacy_vert.glsl
@@ -26,23 +26,13 @@ uniform mat4 ModelViewMatrix;
uniform mat4 ModelViewProjectionMatrix;
uniform mat3 NormalMatrix;
-#if __VERSION__ == 120
- attribute vec3 pos;
+in vec3 pos;
- // normals of faces this edge joins (object coords)
- attribute vec3 N1;
- attribute vec3 N2;
+// normals of faces this edge joins (object coords)
+in vec3 N1;
+in vec3 N2;
- flat varying vec4 finalColor;
-#else
- in vec3 pos;
-
- // normals of faces this edge joins (object coords)
- in vec3 N1;
- in vec3 N2;
-
- flat out vec4 finalColor;
-#endif
+flat out vec4 finalColor;
// TODO: in float angle; // [-pi .. +pi], + peak, 0 flat, - valley
diff --git a/source/blender/gpu/shaders/gpu_shader_fire_frag.glsl b/source/blender/gpu/shaders/gpu_shader_fire_frag.glsl
index 45f86e036a1..025cb0ee6e4 100644
--- a/source/blender/gpu/shaders/gpu_shader_fire_frag.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_fire_frag.glsl
@@ -1,13 +1,8 @@
-#if __VERSION__ == 120
- varying vec3 coords;
- #define fragColor gl_FragColor
-#else
- in vec3 coords;
- out vec4 fragColor;
- #define texture1D texture
- #define texture3D texture
-#endif
+in vec3 coords;
+out vec4 fragColor;
+#define texture1D texture
+#define texture3D texture
uniform sampler3D flame_texture;
uniform sampler1D spectrum_texture;
diff --git a/source/blender/gpu/shaders/gpu_shader_flat_color_alpha_test_0_frag.glsl b/source/blender/gpu/shaders/gpu_shader_flat_color_alpha_test_0_frag.glsl
index 10b4c2ac39d..cefae1021d2 100644
--- a/source/blender/gpu/shaders/gpu_shader_flat_color_alpha_test_0_frag.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_flat_color_alpha_test_0_frag.glsl
@@ -1,11 +1,6 @@
-#if __VERSION__ == 120
- flat varying vec4 finalColor;
- #define fragColor gl_FragColor
-#else
- flat in vec4 finalColor;
- out vec4 fragColor;
-#endif
+flat in vec4 finalColor;
+out vec4 fragColor;
void main()
{
diff --git a/source/blender/gpu/shaders/gpu_shader_flat_color_frag.glsl b/source/blender/gpu/shaders/gpu_shader_flat_color_frag.glsl
index 91097d24cb2..d738ed5ddb2 100644
--- a/source/blender/gpu/shaders/gpu_shader_flat_color_frag.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_flat_color_frag.glsl
@@ -1,11 +1,6 @@
-#if __VERSION__ == 120
- flat varying vec4 finalColor;
- #define fragColor gl_FragColor
-#else
- flat in vec4 finalColor;
- out vec4 fragColor;
-#endif
+flat in vec4 finalColor;
+out vec4 fragColor;
void main()
{
diff --git a/source/blender/gpu/shaders/gpu_shader_fullscreen_vert.glsl b/source/blender/gpu/shaders/gpu_shader_fullscreen_vert.glsl
index cf2d28343cc..fc5cc1cdcc3 100644
--- a/source/blender/gpu/shaders/gpu_shader_fullscreen_vert.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_fullscreen_vert.glsl
@@ -1,13 +1,7 @@
-#if __VERSION__ == 120
- attribute vec2 pos;
- attribute vec2 uvs;
- varying vec4 uvcoordsvar;
-#else
- in vec2 pos;
- in vec2 uvs;
- out vec4 uvcoordsvar;
-#endif
+in vec2 pos;
+in vec2 uvs;
+out vec4 uvcoordsvar;
void main()
{
diff --git a/source/blender/gpu/shaders/gpu_shader_fx_depth_resolve.glsl b/source/blender/gpu/shaders/gpu_shader_fx_depth_resolve.glsl
index 468908b858c..9221e3def2c 100644
--- a/source/blender/gpu/shaders/gpu_shader_fx_depth_resolve.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_fx_depth_resolve.glsl
@@ -1,11 +1,7 @@
uniform sampler2D depthbuffer;
-#if __VERSION__ == 120
- varying vec4 uvcoordsvar;
-#else
- in vec4 uvcoordsvar;
- #define texture2D texture
-#endif
+in vec4 uvcoordsvar;
+#define texture2D texture
void main(void)
{
diff --git a/source/blender/gpu/shaders/gpu_shader_fx_dof_frag.glsl b/source/blender/gpu/shaders/gpu_shader_fx_dof_frag.glsl
index 02af48e1ba7..b8feb8280b2 100644
--- a/source/blender/gpu/shaders/gpu_shader_fx_dof_frag.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_fx_dof_frag.glsl
@@ -16,37 +16,20 @@ uniform vec4 dof_params;
// viewvectors for reconstruction of world space
uniform vec4 viewvecs[3];
-#if __VERSION__ == 120
- // coordinates on framebuffer in normalized (0.0-1.0) uv space
- varying vec4 uvcoordsvar;
-
- /* color texture coordinates, offset by a small amount */
- varying vec2 color_uv1;
- varying vec2 color_uv2;
-
- varying vec2 depth_uv1;
- varying vec2 depth_uv2;
- varying vec2 depth_uv3;
- varying vec2 depth_uv4;
-
- #define FragColor gl_FragColor
-#else
- // coordinates on framebuffer in normalized (0.0-1.0) uv space
- in vec4 uvcoordsvar;
-
- /* color texture coordinates, offset by a small amount */
- in vec2 color_uv1;
- in vec2 color_uv2;
-
- in vec2 depth_uv1;
- in vec2 depth_uv2;
- in vec2 depth_uv3;
- in vec2 depth_uv4;
-
- out vec4 FragColor;
- #define texture2D texture
-#endif
+// coordinates on framebuffer in normalized (0.0-1.0) uv space
+in vec4 uvcoordsvar;
+
+/* color texture coordinates, offset by a small amount */
+in vec2 color_uv1;
+in vec2 color_uv2;
+
+in vec2 depth_uv1;
+in vec2 depth_uv2;
+in vec2 depth_uv3;
+in vec2 depth_uv4;
+out vec4 FragColor;
+#define texture2D texture
float calculate_far_coc(in float zdepth)
{
diff --git a/source/blender/gpu/shaders/gpu_shader_fx_dof_hq_frag.glsl b/source/blender/gpu/shaders/gpu_shader_fx_dof_hq_frag.glsl
index 22d56423bb8..913a8619270 100644
--- a/source/blender/gpu/shaders/gpu_shader_fx_dof_hq_frag.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_fx_dof_hq_frag.glsl
@@ -20,43 +20,24 @@ uniform vec4 dof_params;
/* viewvectors for reconstruction of world space */
uniform vec4 viewvecs[3];
-#if __VERSION__ == 120
- /* initial uv coordinate */
- varying vec2 uvcoord;
-
- /* coordinate used for calculating radius et al set in geometry shader */
- varying vec2 particlecoord;
- varying vec4 color;
-
- /* downsampling coordinates */
- varying vec2 downsample1;
- varying vec2 downsample2;
- varying vec2 downsample3;
- varying vec2 downsample4;
-
- #define fragData0 gl_FragData[0]
- #define fragData1 gl_FragData[1]
- #define fragData2 gl_FragData[2]
-#else
- /* initial uv coordinate */
- in vec2 uvcoord;
-
- /* coordinate used for calculating radius et al set in geometry shader */
- in vec2 particlecoord;
- flat in vec4 color;
-
- /* downsampling coordinates */
- in vec2 downsample1;
- in vec2 downsample2;
- in vec2 downsample3;
- in vec2 downsample4;
-
- layout(location = 0) out vec4 fragData0;
- layout(location = 1) out vec4 fragData1;
- layout(location = 2) out vec4 fragData2;
-
- #define texture2D texture
-#endif
+/* initial uv coordinate */
+in vec2 uvcoord;
+
+/* coordinate used for calculating radius et al set in geometry shader */
+in vec2 particlecoord;
+flat in vec4 color;
+
+/* downsampling coordinates */
+in vec2 downsample1;
+in vec2 downsample2;
+in vec2 downsample3;
+in vec2 downsample4;
+
+layout(location = 0) out vec4 fragData0;
+layout(location = 1) out vec4 fragData1;
+layout(location = 2) out vec4 fragData2;
+
+#define texture2D texture
#define M_PI 3.1415926535897932384626433832795
diff --git a/source/blender/gpu/shaders/gpu_shader_fx_dof_hq_vert.glsl b/source/blender/gpu/shaders/gpu_shader_fx_dof_hq_vert.glsl
index 78fe0e563f2..1dd5bf42b25 100644
--- a/source/blender/gpu/shaders/gpu_shader_fx_dof_hq_vert.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_fx_dof_hq_vert.glsl
@@ -1,33 +1,17 @@
-#if __VERSION__ == 120
- attribute vec2 pos;
- attribute vec2 uvs;
- /* initial uv coordinate */
- varying vec2 uvcoord;
-
- /* coordinate used for calculating radius et al set in geometry shader */
- varying vec2 particlecoord;
-
- /* downsampling coordinates */
- varying vec2 downsample1;
- varying vec2 downsample2;
- varying vec2 downsample3;
- varying vec2 downsample4;
-#else
- in vec2 pos;
- in vec2 uvs;
- /* initial uv coordinate */
- out vec2 uvcoord;
-
- /* coordinate used for calculating radius et al set in geometry shader */
- out vec2 particlecoord;
-
- /* downsampling coordinates */
- out vec2 downsample1;
- out vec2 downsample2;
- out vec2 downsample3;
- out vec2 downsample4;
-#endif
+in vec2 pos;
+in vec2 uvs;
+/* initial uv coordinate */
+out vec2 uvcoord;
+
+/* coordinate used for calculating radius et al set in geometry shader */
+out vec2 particlecoord;
+
+/* downsampling coordinates */
+out vec2 downsample1;
+out vec2 downsample2;
+out vec2 downsample3;
+out vec2 downsample4;
uniform vec2 invrendertargetdim;
uniform ivec2 rendertargetdim;
diff --git a/source/blender/gpu/shaders/gpu_shader_fx_dof_vert.glsl b/source/blender/gpu/shaders/gpu_shader_fx_dof_vert.glsl
index eb2b6b04da8..0fcab6302e4 100644
--- a/source/blender/gpu/shaders/gpu_shader_fx_dof_vert.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_fx_dof_vert.glsl
@@ -1,37 +1,19 @@
uniform vec2 invrendertargetdim;
+in vec2 pos;
+in vec2 uvs;
-#if __VERSION__ == 120
- attribute vec2 pos;
- attribute vec2 uvs;
+/* texture coordinates for framebuffer read */
+out vec4 uvcoordsvar;
- //texture coordinates for framebuffer read
- varying vec4 uvcoordsvar;
+/* color texture coordinates, offset by a small amount */
+out vec2 color_uv1;
+out vec2 color_uv2;
- /* color texture coordinates, offset by a small amount */
- varying vec2 color_uv1;
- varying vec2 color_uv2;
-
- varying vec2 depth_uv1;
- varying vec2 depth_uv2;
- varying vec2 depth_uv3;
- varying vec2 depth_uv4;
-#else
- in vec2 pos;
- in vec2 uvs;
-
- //texture coordinates for framebuffer read
- out vec4 uvcoordsvar;
-
- /* color texture coordinates, offset by a small amount */
- out vec2 color_uv1;
- out vec2 color_uv2;
-
- out vec2 depth_uv1;
- out vec2 depth_uv2;
- out vec2 depth_uv3;
- out vec2 depth_uv4;
-#endif
+out vec2 depth_uv1;
+out vec2 depth_uv2;
+out vec2 depth_uv3;
+out vec2 depth_uv4;
//very simple shader for gull screen FX, just pass values on
diff --git a/source/blender/gpu/shaders/gpu_shader_fx_ssao_frag.glsl b/source/blender/gpu/shaders/gpu_shader_fx_ssao_frag.glsl
index 6477390dca9..d9e037e7047 100644
--- a/source/blender/gpu/shaders/gpu_shader_fx_ssao_frag.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_fx_ssao_frag.glsl
@@ -11,16 +11,11 @@ uniform sampler1D ssao_concentric_tex;
// depth buffer
uniform sampler2D depthbuffer;
-#if __VERSION__ == 120
- // coordinates on framebuffer in normalized (0.0-1.0) uv space
- varying vec4 uvcoordsvar;
- #define FragColor gl_FragColor
-#else
- in vec4 uvcoordsvar;
- out vec4 FragColor;
- #define texture1D texture
- #define texture2D texture
-#endif
+// coordinates on framebuffer in normalized (0.0-1.0) uv space
+in vec4 uvcoordsvar;
+out vec4 FragColor;
+#define texture1D texture
+#define texture2D texture
/* ssao_params.x : pixel scale for the ssao radious */
/* ssao_params.y : factor for the ssao darkening */
diff --git a/source/blender/gpu/shaders/gpu_shader_image_alpha_color_frag.glsl b/source/blender/gpu/shaders/gpu_shader_image_alpha_color_frag.glsl
index bc8758470eb..84d8e2f8d57 100644
--- a/source/blender/gpu/shaders/gpu_shader_image_alpha_color_frag.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_image_alpha_color_frag.glsl
@@ -1,12 +1,7 @@
-#if __VERSION__ == 120
- 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
uniform vec4 color;
uniform sampler2D image;
diff --git a/source/blender/gpu/shaders/gpu_shader_image_color_frag.glsl b/source/blender/gpu/shaders/gpu_shader_image_color_frag.glsl
index b7697b0a3cc..b94c814672f 100644
--- a/source/blender/gpu/shaders/gpu_shader_image_color_frag.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_image_color_frag.glsl
@@ -1,12 +1,7 @@
-#if __VERSION__ == 120
- 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
uniform vec4 color;
uniform sampler2D image;
diff --git a/source/blender/gpu/shaders/gpu_shader_image_depth_linear_frag.glsl b/source/blender/gpu/shaders/gpu_shader_image_depth_linear_frag.glsl
index 7f76fbf03be..3cd4b3f2fa0 100644
--- a/source/blender/gpu/shaders/gpu_shader_image_depth_linear_frag.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_image_depth_linear_frag.glsl
@@ -1,12 +1,7 @@
-#if __VERSION__ == 120
- 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
uniform float znear;
uniform float zfar;
diff --git a/source/blender/gpu/shaders/gpu_shader_image_interlace_frag.glsl b/source/blender/gpu/shaders/gpu_shader_image_interlace_frag.glsl
index 8b303104bb3..2445b0206ec 100644
--- a/source/blender/gpu/shaders/gpu_shader_image_interlace_frag.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_image_interlace_frag.glsl
@@ -4,14 +4,9 @@
#define INTERLACE_COLUMN 1
#define INTERLACE_CHECKERBOARD 2
-#if __VERSION__ == 120
- varying vec2 texCoord_interp;
- #define fragColor gl_FragColor
-#else
- in vec2 texCoord_interp;
- out vec4 fragColor;
- #define texture2DRect texture
-#endif
+:n vec2 texCoord_interp;
+out vec4 fragColor;
+#define texture2DRect texture
uniform int interlace_id;
uniform sampler2DRect image_a;
@@ -19,17 +14,6 @@ uniform sampler2DRect image_b;
bool interlace()
{
-#if __VERSION__ == 120
- if (interlace_id == INTERLACE_CHECKERBOARD) {
- return int(mod(gl_FragCoord.x + gl_FragCoord.y, 2)) != 0;
- }
- else if (interlace_id == INTERLACE_ROW) {
- return int(mod(gl_FragCoord.y, 2)) != 0;
- }
- else if (interlace_id == INTERLACE_COLUMN) {
- return int(mod(gl_FragCoord.x, 2)) != 0;
- }
-#else
if (interlace_id == INTERLACE_CHECKERBOARD) {
return (int(gl_FragCoord.x + gl_FragCoord.y) & 1) != 0;
}
@@ -39,7 +23,6 @@ bool interlace()
else if (interlace_id == INTERLACE_COLUMN) {
return (int(gl_FragCoord.x) & 1) != 0;
}
-#endif
}
void main()
diff --git a/source/blender/gpu/shaders/gpu_shader_image_mask_uniform_color_frag.glsl b/source/blender/gpu/shaders/gpu_shader_image_mask_uniform_color_frag.glsl
index e78779559a1..14f3f465a0a 100644
--- a/source/blender/gpu/shaders/gpu_shader_image_mask_uniform_color_frag.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_image_mask_uniform_color_frag.glsl
@@ -1,12 +1,7 @@
-#if __VERSION__ == 120
- 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
uniform sampler2D image;
uniform vec4 color;
diff --git a/source/blender/gpu/shaders/gpu_shader_image_modulate_alpha_frag.glsl b/source/blender/gpu/shaders/gpu_shader_image_modulate_alpha_frag.glsl
index 74e17198985..80b078975f0 100644
--- a/source/blender/gpu/shaders/gpu_shader_image_modulate_alpha_frag.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_image_modulate_alpha_frag.glsl
@@ -1,12 +1,7 @@
-#if __VERSION__ == 120
- 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
uniform float alpha;
uniform sampler2D image;
diff --git a/source/blender/gpu/shaders/gpu_shader_image_rect_modulate_alpha_frag.glsl b/source/blender/gpu/shaders/gpu_shader_image_rect_modulate_alpha_frag.glsl
index aae3b40efd4..cb7b85f8a5b 100644
--- a/source/blender/gpu/shaders/gpu_shader_image_rect_modulate_alpha_frag.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_image_rect_modulate_alpha_frag.glsl
@@ -1,12 +1,7 @@
-#if __VERSION__ == 120
- varying vec2 texCoord_interp;
- #define fragColor gl_FragColor
-#else
- in vec2 texCoord_interp;
- out vec4 fragColor;
- #define texture2DRect texture
-#endif
+in vec2 texCoord_interp;
+out vec4 fragColor;
+#define texture2DRect texture
uniform float alpha;
uniform sampler2DRect image;
diff --git a/source/blender/gpu/shaders/gpu_shader_image_shuffle_color_frag.glsl b/source/blender/gpu/shaders/gpu_shader_image_shuffle_color_frag.glsl
index fa4f41b79fb..aa3b8bd2727 100644
--- a/source/blender/gpu/shaders/gpu_shader_image_shuffle_color_frag.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_image_shuffle_color_frag.glsl
@@ -1,12 +1,7 @@
-#if __VERSION__ == 120
- 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
uniform sampler2D image;
uniform vec4 color;
diff --git a/source/blender/gpu/shaders/gpu_shader_keyframe_diamond_frag.glsl b/source/blender/gpu/shaders/gpu_shader_keyframe_diamond_frag.glsl
index ebda79558c7..7f445369833 100644
--- a/source/blender/gpu/shaders/gpu_shader_keyframe_diamond_frag.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_keyframe_diamond_frag.glsl
@@ -1,15 +1,8 @@
-#if __VERSION__ == 120
- varying vec4 radii;
- varying vec4 finalColor;
- varying vec4 finalOutlineColor;
- #define fragColor gl_FragColor
-#else
- in vec4 radii;
- in vec4 finalColor;
- in vec4 finalOutlineColor;
- out vec4 fragColor;
-#endif
+in vec4 radii;
+in vec4 finalColor;
+in vec4 finalOutlineColor;
+out vec4 fragColor;
void main() {
vec2 quad = abs(gl_PointCoord - vec2(0.5));
diff --git a/source/blender/gpu/shaders/gpu_shader_keyframe_diamond_vert.glsl b/source/blender/gpu/shaders/gpu_shader_keyframe_diamond_vert.glsl
index 6f33491af55..b86d6fd70fe 100644
--- a/source/blender/gpu/shaders/gpu_shader_keyframe_diamond_vert.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_keyframe_diamond_vert.glsl
@@ -4,23 +4,13 @@ uniform mat4 ModelViewProjectionMatrix;
const float pixel_fudge = sqrt(2.0);
const float outline_width = 1.25 * pixel_fudge;
-#if __VERSION__ == 120
- attribute vec2 pos;
- attribute float size;
- attribute vec4 color;
- attribute vec4 outlineColor;
- varying vec4 finalColor;
- varying vec4 finalOutlineColor;
- varying vec4 radii;
-#else
- in vec2 pos;
- in float size;
- in vec4 color;
- in vec4 outlineColor;
- out vec4 finalColor;
- out vec4 finalOutlineColor;
- out vec4 radii;
-#endif
+in vec2 pos;
+in float size;
+in vec4 color;
+in vec4 outlineColor;
+out vec4 finalColor;
+out vec4 finalOutlineColor;
+out vec4 radii;
void main() {
gl_Position = ModelViewProjectionMatrix * vec4(pos, 0.0, 1.0);
diff --git a/source/blender/gpu/shaders/gpu_shader_material.glsl b/source/blender/gpu/shaders/gpu_shader_material.glsl
index cf45c076020..b74dd857e41 100644
--- a/source/blender/gpu/shaders/gpu_shader_material.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_material.glsl
@@ -12,14 +12,10 @@ uniform mat4 ProjectionMatrixInverse;
uniform mat3 NormalMatrix;
uniform vec4 CameraTexCoFactors;
-#if __VERSION__ == 120
- #define fragColor gl_FragColor
-#else
- out vec4 fragColor;
- #define texture2D texture
- #define shadow2D shadow
- #define textureCube texture
-#endif
+out vec4 fragColor;
+#define texture2D texture
+#define shadow2D shadow
+#define textureCube texture
/* Converters */
@@ -2281,14 +2277,12 @@ void test_shadowbuf(
//float bias = (1.5 - inp*inp)*shadowbias;
co.z -= shadowbias * co.w;
- if (co.w > 0.0 && co.x > 0.0 && co.x / co.w < 1.0 && co.y > 0.0 && co.y / co.w < 1.0)
-#if __VERSION__ == 120
- result = shadow2DProj(shadowmap, co).x;
-#else
+ if (co.w > 0.0 && co.x > 0.0 && co.x / co.w < 1.0 && co.y > 0.0 && co.y / co.w < 1.0) {
result = textureProj(shadowmap, co);
-#endif
- else
+ }
+ else {
result = 1.0;
+ }
}
}
@@ -2592,7 +2586,6 @@ vec3 rotate_vector(vec3 p, vec3 n, float theta) {
#define NUM_LIGHTS 3
-#if __VERSION__ > 120
struct glLight {
vec4 position;
vec4 diffuse;
@@ -2604,12 +2597,6 @@ layout(std140) uniform lightSource {
glLight glLightSource[NUM_LIGHTS];
};
-#define gl_NormalMatrix NormalMatrix
-
-#else
-#define glLightSource gl_LightSource
-#endif
-
/* bsdfs */
void node_bsdf_diffuse(vec4 color, float roughness, vec3 N, out vec4 result)
@@ -2711,7 +2698,7 @@ void node_bsdf_principled(vec4 base_color, float subsurface, vec3 subsurface_rad
/* directional lights */
for (int i = 0; i < NUM_LIGHTS; i++) {
vec3 light_position_world = glLightSource[i].position.xyz;
- vec3 light_position = normalize(gl_NormalMatrix * light_position_world);
+ vec3 light_position = normalize(NormalMatrix * light_position_world);
vec3 H = normalize(light_position + V);
@@ -3160,7 +3147,6 @@ void node_tex_environment_equirectangular(vec3 co, sampler2D ima, out vec4 color
float u = -atan(nco.y, nco.x) / (2.0 * M_PI) + 0.5;
float v = atan(nco.z, hypot(nco.x, nco.y)) / M_PI + 0.5;
-#if __VERSION__ > 120
/* Fix pole bleeding */
float half_width = 0.5 / float(textureSize(ima, 0).x);
v = clamp(v, half_width, 1.0 - half_width);
@@ -3170,9 +3156,6 @@ void node_tex_environment_equirectangular(vec3 co, sampler2D ima, out vec4 color
* at u = 0 or 2PI, hardware filtering is using the smallest mipmap for certain
* texels. So we force the highest mipmap and don't do anisotropic filtering. */
color = textureLod(ima, vec2(u, v), 0.0);
-#else
- color = texture2D(ima, vec2(u, v));
-#endif
}
void node_tex_environment_mirror_ball(vec3 co, sampler2D ima, out vec4 color)
diff --git a/source/blender/gpu/shaders/gpu_shader_point_uniform_color_aa_frag.glsl b/source/blender/gpu/shaders/gpu_shader_point_uniform_color_aa_frag.glsl
index 8c8d81f6997..a1c1a9fa854 100644
--- a/source/blender/gpu/shaders/gpu_shader_point_uniform_color_aa_frag.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_point_uniform_color_aa_frag.glsl
@@ -1,13 +1,8 @@
uniform vec4 color;
-#if __VERSION__ == 120
- varying vec2 radii;
- #define fragColor gl_FragColor
-#else
- in vec2 radii;
- out vec4 fragColor;
-#endif
+in vec2 radii;
+out vec4 fragColor;
void main() {
float dist = length(gl_PointCoord - vec2(0.5));
diff --git a/source/blender/gpu/shaders/gpu_shader_point_uniform_color_frag.glsl b/source/blender/gpu/shaders/gpu_shader_point_uniform_color_frag.glsl
index 8e0c75db6bf..852c76fcb26 100644
--- a/source/blender/gpu/shaders/gpu_shader_point_uniform_color_frag.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_point_uniform_color_frag.glsl
@@ -1,11 +1,7 @@
uniform vec4 color;
-#if __VERSION__ == 120
- #define fragColor gl_FragColor
-#else
- out vec4 fragColor;
-#endif
+out vec4 fragColor;
void main()
{
diff --git a/source/blender/gpu/shaders/gpu_shader_point_uniform_color_outline_aa_frag.glsl b/source/blender/gpu/shaders/gpu_shader_point_uniform_color_outline_aa_frag.glsl
index f83785de95e..83bdc66c4a0 100644
--- a/source/blender/gpu/shaders/gpu_shader_point_uniform_color_outline_aa_frag.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_point_uniform_color_outline_aa_frag.glsl
@@ -2,13 +2,8 @@
uniform vec4 color;
uniform vec4 outlineColor;
-#if __VERSION__ == 120
- varying vec4 radii;
- #define fragColor gl_FragColor
-#else
- in vec4 radii;
- out vec4 fragColor;
-#endif
+in vec4 radii;
+out vec4 fragColor;
void main() {
float dist = length(gl_PointCoord - vec2(0.5));
diff --git a/source/blender/gpu/shaders/gpu_shader_point_varying_color_frag.glsl b/source/blender/gpu/shaders/gpu_shader_point_varying_color_frag.glsl
index 91092a9f727..2d2724bb686 100644
--- a/source/blender/gpu/shaders/gpu_shader_point_varying_color_frag.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_point_varying_color_frag.glsl
@@ -1,11 +1,6 @@
-#if __VERSION__ == 120
- varying vec4 finalColor;
- #define fragColor gl_FragColor
-#else
- in vec4 finalColor;
- out vec4 fragColor;
-#endif
+in vec4 finalColor;
+out vec4 fragColor;
void main()
{
diff --git a/source/blender/gpu/shaders/gpu_shader_point_varying_color_outline_aa_frag.glsl b/source/blender/gpu/shaders/gpu_shader_point_varying_color_outline_aa_frag.glsl
index d6cbe2d9a22..9b7d4bfc6d6 100644
--- a/source/blender/gpu/shaders/gpu_shader_point_varying_color_outline_aa_frag.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_point_varying_color_outline_aa_frag.glsl
@@ -1,15 +1,9 @@
uniform vec4 outlineColor;
-#if __VERSION__ == 120
- varying vec4 radii;
- varying vec4 fillColor;
- #define fragColor gl_FragColor
-#else
- in vec4 radii;
- in vec4 fillColor;
- out vec4 fragColor;
-#endif
+in vec4 radii;
+in vec4 fillColor;
+out vec4 fragColor;
void main() {
float dist = length(gl_PointCoord - vec2(0.5));
diff --git a/source/blender/gpu/shaders/gpu_shader_sep_gaussian_blur_frag.glsl b/source/blender/gpu/shaders/gpu_shader_sep_gaussian_blur_frag.glsl
index d7cdec9441d..d3e4532427b 100644
--- a/source/blender/gpu/shaders/gpu_shader_sep_gaussian_blur_frag.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_sep_gaussian_blur_frag.glsl
@@ -1,14 +1,9 @@
uniform vec2 ScaleU;
uniform sampler2D textureSource;
-#if __VERSION__ == 120
- 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
void main()
{
diff --git a/source/blender/gpu/shaders/gpu_shader_sep_gaussian_blur_vert.glsl b/source/blender/gpu/shaders/gpu_shader_sep_gaussian_blur_vert.glsl
index a0e5b022e67..1319e386c65 100644
--- a/source/blender/gpu/shaders/gpu_shader_sep_gaussian_blur_vert.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_sep_gaussian_blur_vert.glsl
@@ -1,15 +1,9 @@
uniform mat4 ModelViewProjectionMatrix;
-#if __VERSION__ == 120
- attribute vec2 pos;
- attribute vec2 uvs;
- varying vec2 texCoord_interp;
-#else
- in vec2 pos;
- in vec2 uvs;
- out vec2 texCoord_interp;
-#endif
+in vec2 pos;
+in vec2 uvs;
+out vec2 texCoord_interp;
void main()
{
diff --git a/source/blender/gpu/shaders/gpu_shader_simple_lighting_frag.glsl b/source/blender/gpu/shaders/gpu_shader_simple_lighting_frag.glsl
index 4eacd08d5af..4d7131c4eb1 100644
--- a/source/blender/gpu/shaders/gpu_shader_simple_lighting_frag.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_simple_lighting_frag.glsl
@@ -4,20 +4,12 @@ uniform vec4 color;
#endif
uniform vec3 light;
-#if __VERSION__ == 120
- varying vec3 normal;
+in vec3 normal;
#ifdef USE_INSTANCE_COLOR
- varying vec4 finalColor;
-#endif
- #define fragColor gl_FragColor
-#else
- in vec3 normal;
-#ifdef USE_INSTANCE_COLOR
- flat in vec4 finalColor;
- #define color finalColor
-#endif
- out vec4 fragColor;
+flat in vec4 finalColor;
+# define color finalColor
#endif
+out vec4 fragColor;
void main()
{
diff --git a/source/blender/gpu/shaders/gpu_shader_simple_lighting_smooth_color_frag.glsl b/source/blender/gpu/shaders/gpu_shader_simple_lighting_smooth_color_frag.glsl
index e0d122aa57a..58c5f292647 100644
--- a/source/blender/gpu/shaders/gpu_shader_simple_lighting_smooth_color_frag.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_simple_lighting_smooth_color_frag.glsl
@@ -1,25 +1,14 @@
uniform vec3 light;
-#if __VERSION__ == 120
-# ifdef USE_FLAT_NORMAL
- flat varying vec3 normal;
- flat varying vec4 finalColor;
-# else
- varying vec3 normal;
- varying vec4 finalColor;
-# endif
- #define fragColor gl_FragColor
+#ifdef USE_FLAT_NORMAL
+flat in vec3 normal;
+flat in vec4 finalColor;
#else
-# ifdef USE_FLAT_NORMAL
- flat in vec3 normal;
- flat in vec4 finalColor;
-# else
- in vec3 normal;
- in vec4 finalColor;
-# endif
- out vec4 fragColor;
+in vec3 normal;
+in vec4 finalColor;
#endif
+out vec4 fragColor;
void main()
{
diff --git a/source/blender/gpu/shaders/gpu_shader_smoke_frag.glsl b/source/blender/gpu/shaders/gpu_shader_smoke_frag.glsl
index fcb385ed30a..1bf57f0dcc2 100644
--- a/source/blender/gpu/shaders/gpu_shader_smoke_frag.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_smoke_frag.glsl
@@ -1,13 +1,8 @@
-#if __VERSION__ == 120
- varying vec3 coords;
- #define fragColor gl_FragColor
-#else
in vec3 coords;
out vec4 fragColor;
#define texture1D texture
#define texture3D texture
-#endif
uniform vec3 active_color;
uniform float step_size;
diff --git a/source/blender/gpu/shaders/gpu_shader_smoke_vert.glsl b/source/blender/gpu/shaders/gpu_shader_smoke_vert.glsl
index f49272d0913..108376b1c86 100644
--- a/source/blender/gpu/shaders/gpu_shader_smoke_vert.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_smoke_vert.glsl
@@ -1,11 +1,7 @@
uniform mat4 ModelViewProjectionMatrix;
-#if __VERSION__ == 120
- varying vec3 coords;
-#else
- out vec3 coords;
-#endif
+out vec3 coords;
uniform vec3 min_location;
uniform vec3 invsize;
diff --git a/source/blender/gpu/shaders/gpu_shader_text_frag.glsl b/source/blender/gpu/shaders/gpu_shader_text_frag.glsl
index e0a19912520..1654d3bb016 100644
--- a/source/blender/gpu/shaders/gpu_shader_text_frag.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_text_frag.glsl
@@ -1,14 +1,8 @@
-#if __VERSION__ == 120
- flat varying vec4 color_flat;
- noperspective varying vec2 texCoord_interp;
- #define fragColor gl_FragColor
-#else
- flat in vec4 color_flat;
- noperspective in vec2 texCoord_interp;
- out vec4 fragColor;
- #define texture2D texture
-#endif
+flat in vec4 color_flat;
+noperspective in vec2 texCoord_interp;
+out vec4 fragColor;
+#define texture2D texture
uniform sampler2D glyph;
diff --git a/source/blender/gpu/shaders/gpu_shader_text_vert.glsl b/source/blender/gpu/shaders/gpu_shader_text_vert.glsl
index 44568f28c8e..6129f49ce22 100644
--- a/source/blender/gpu/shaders/gpu_shader_text_vert.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_text_vert.glsl
@@ -1,19 +1,11 @@
uniform mat4 ModelViewProjectionMatrix;
-#if __VERSION__ == 120
- attribute vec2 pos;
- attribute vec2 texCoord;
- attribute vec4 color;
- flat varying vec4 color_flat;
- noperspective varying vec2 texCoord_interp;
-#else
- in vec2 pos;
- in vec2 texCoord;
- in vec4 color;
- flat out vec4 color_flat;
- noperspective out vec2 texCoord_interp;
-#endif
+in vec2 pos;
+in vec2 texCoord;
+in vec4 color;
+flat out vec4 color_flat;
+noperspective out vec2 texCoord_interp;
void main()
{
diff --git a/source/blender/gpu/shaders/gpu_shader_uniform_color_frag.glsl b/source/blender/gpu/shaders/gpu_shader_uniform_color_frag.glsl
index af200bf8661..5dd1352adc5 100644
--- a/source/blender/gpu/shaders/gpu_shader_uniform_color_frag.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_uniform_color_frag.glsl
@@ -1,11 +1,7 @@
uniform vec4 color;
-#if __VERSION__ == 120
- #define fragColor gl_FragColor
-#else
- out vec4 fragColor;
-#endif
+out vec4 fragColor;
void main()
{
diff --git a/source/blender/gpu/shaders/gpu_shader_vertex.glsl b/source/blender/gpu/shaders/gpu_shader_vertex.glsl
index 5a6b237b3be..4ebd10d514f 100644
--- a/source/blender/gpu/shaders/gpu_shader_vertex.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_vertex.glsl
@@ -12,13 +12,8 @@ out block {
} outpt;
#endif
-#if __VERSION__ == 120
- varying vec3 varposition;
- varying vec3 varnormal;
-#else
- out vec3 varposition;
- out vec3 varnormal;
-#endif
+out vec3 varposition;
+out vec3 varnormal;
#ifdef CLIP_WORKAROUND
varying float gl_ClipDistance[6];
diff --git a/source/blender/gpu/shaders/gpu_shader_vertex_world.glsl b/source/blender/gpu/shaders/gpu_shader_vertex_world.glsl
index 7a39c3fc674..89a2f391a12 100644
--- a/source/blender/gpu/shaders/gpu_shader_vertex_world.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_vertex_world.glsl
@@ -1,11 +1,6 @@
-#if __VERSION__ == 120
- varying vec3 varposition;
- varying vec3 varnormal;
-#else
- out vec3 varposition;
- out vec3 varnormal;
-#endif
+out vec3 varposition;
+out vec3 varnormal;
/* Color, keep in sync with: gpu_shader_vertex.glsl */
diff --git a/source/blender/gpu/shaders/gpu_shader_vsm_store_frag.glsl b/source/blender/gpu/shaders/gpu_shader_vsm_store_frag.glsl
index 9035a311ecb..6aad94bbf59 100644
--- a/source/blender/gpu/shaders/gpu_shader_vsm_store_frag.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_vsm_store_frag.glsl
@@ -2,13 +2,8 @@
* This fragment shader was initially found at http://fabiensanglard.net/shadowmappingVSM/index.php
*/
-#if __VERSION__ == 120
- varying vec4 v_position;
- #define fragColor gl_FragColor
-#else
- in vec4 v_position;
- out vec4 fragColor;
-#endif
+in vec4 v_position;
+out vec4 fragColor;
void main()
{
diff --git a/source/blender/gpu/shaders/gpu_shader_vsm_store_vert.glsl b/source/blender/gpu/shaders/gpu_shader_vsm_store_vert.glsl
index 96ea22b3483..def835156f7 100644
--- a/source/blender/gpu/shaders/gpu_shader_vsm_store_vert.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_vsm_store_vert.glsl
@@ -1,11 +1,7 @@
uniform mat4 ModelViewProjectionMatrix;
-#if __VERSION__ == 120
- varying vec4 v_position;
-#else
- out vec4 v_position;
-#endif
+out vec4 v_position;
void main()
{