[Bf-blender-cvs] [8f2e9ac] master: OpenGL: fix hq viewport dof on Mac / GL 2.1

Mike Erwin noreply at git.blender.org
Mon Nov 23 06:33:33 CET 2015


Commit: 8f2e9ac7b15022a08553beec257432a28343a9b6
Author: Mike Erwin
Date:   Mon Nov 23 00:32:35 2015 -0500
Branches: master
https://developer.blender.org/rB8f2e9ac7b15022a08553beec257432a28343a9b6

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.

===================================================================

M	source/blender/gpu/shaders/gpu_shader_fx_dof_hq_geo.glsl

===================================================================

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 25ba91f..5ca8159 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




More information about the Bf-blender-cvs mailing list