diff options
Diffstat (limited to 'source/blender/gpu/shaders/gpu_shader_geometry.glsl')
-rw-r--r-- | source/blender/gpu/shaders/gpu_shader_geometry.glsl | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/source/blender/gpu/shaders/gpu_shader_geometry.glsl b/source/blender/gpu/shaders/gpu_shader_geometry.glsl index fe630dbeddb..705b79cbf56 100644 --- a/source/blender/gpu/shaders/gpu_shader_geometry.glsl +++ b/source/blender/gpu/shaders/gpu_shader_geometry.glsl @@ -1,10 +1,11 @@ + +uniform mat4 ProjectionMatrix; + uniform int PrimitiveIdBase; uniform int osd_active_uv_offset; -#if __VERSION__ >= 150 - layout(lines_adjacency) in; - layout(triangle_strip, max_vertices = 4) out; -#endif +layout(lines_adjacency) in; +layout(triangle_strip, max_vertices = 4) out; in block { VertexData v; @@ -31,17 +32,12 @@ uniform int osd_fvar_count; tessCoord.t); \ } -#ifdef USE_NEW_SHADING # define INTERP_FACE_VARYING_ATT_2(result, fvarOffset, tessCoord) \ { \ vec2 tmp; \ INTERP_FACE_VARYING_2(tmp, fvarOffset, tessCoord); \ result = vec3(tmp, 0); \ } -#else -# define INTERP_FACE_VARYING_ATT_2(result, fvarOffset, tessCoord) \ - INTERP_FACE_VARYING_2(result, fvarOffset, tessCoord) -#endif uniform samplerBuffer FVarDataBuffer; uniform isamplerBuffer FVarDataOffsetBuffer; @@ -69,7 +65,7 @@ void emit_flat(int index, vec3 normal) set_mtface_vertex_attrs(st); - gl_Position = gl_ProjectionMatrix * inpt[index].v.position; + gl_Position = ProjectionMatrix * inpt[index].v.position; EmitVertex(); } @@ -90,7 +86,7 @@ void emit_smooth(int index) set_mtface_vertex_attrs(st); - gl_Position = gl_ProjectionMatrix * inpt[index].v.position; + gl_Position = ProjectionMatrix * inpt[index].v.position; EmitVertex(); } |