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:
authorMike Erwin <significant.bit@gmail.com>2015-11-23 08:32:35 +0300
committerMike Erwin <significant.bit@gmail.com>2015-11-23 08:32:35 +0300
commit8f2e9ac7b15022a08553beec257432a28343a9b6 (patch)
tree53fd388139f0265e042202c3eaaf6c8541c3ce5e /source
parent2d708d9aeccd5f1786306c23f40806f48802f7f3 (diff)
OpenGL: fix hq viewport dof on Mac / GL 2.1
My earlier fix for GL >= 3 on Windows broke it. Should work for both platforms now.
Diffstat (limited to 'source')
-rw-r--r--source/blender/gpu/shaders/gpu_shader_fx_dof_hq_geo.glsl14
1 files changed, 10 insertions, 4 deletions
diff --git a/source/blender/gpu/shaders/gpu_shader_fx_dof_hq_geo.glsl b/source/blender/gpu/shaders/gpu_shader_fx_dof_hq_geo.glsl
index 25ba91f772d..5ca815952fc 100644
--- a/source/blender/gpu/shaders/gpu_shader_fx_dof_hq_geo.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_fx_dof_hq_geo.glsl
@@ -16,10 +16,16 @@ uniform sampler2D cocbuffer;
#endif
/* initial uv coordinate */
-in vec2 uvcoord[1];
-out vec2 particlecoord;
-out vec4 color;
-
+#if __VERSION__ < 130
+ varying in vec2 uvcoord[1];
+ varying out vec2 particlecoord;
+ varying out vec4 color;
+ #define textureLod texture2DLod
+#else
+ in vec2 uvcoord[1];
+ out vec2 particlecoord;
+ out vec4 color;
+#endif
#define M_PI 3.1415926535897932384626433832795