diff options
author | Jack Ha <j.ha@ultimaker.com> | 2016-12-30 16:31:53 +0300 |
---|---|---|
committer | Jack Ha <j.ha@ultimaker.com> | 2016-12-30 16:31:53 +0300 |
commit | fc4c60b0dcfe8198831915ebf2d1de2dda653dfb (patch) | |
tree | 7703c044c6756ba579c967cb00b5c1a4d0013641 /resources/shaders | |
parent | 1217281727d9496a7c31b1f36872eec88e91bbdd (diff) |
Added layer view options
Diffstat (limited to 'resources/shaders')
-rw-r--r-- | resources/shaders/overhang.shader | 42 |
1 files changed, 4 insertions, 38 deletions
diff --git a/resources/shaders/overhang.shader b/resources/shaders/overhang.shader index 0e8592f675..4e5999a693 100644 --- a/resources/shaders/overhang.shader +++ b/resources/shaders/overhang.shader @@ -8,50 +8,16 @@ vertex = attribute highp vec4 a_normal; attribute highp vec2 a_uvs; - varying highp vec3 v_vertex; - varying highp vec3 v_normal; + varying highp vec3 f_vertex; + varying highp vec3 f_normal; void main() { vec4 world_space_vert = u_modelMatrix * a_vertex; gl_Position = u_viewProjectionMatrix * world_space_vert; - v_vertex = world_space_vert.xyz; - v_normal = (u_normalMatrix * normalize(a_normal)).xyz; - } - -geometry = - #version 410 - - layout(triangles) in; - layout(triangle_strip, max_vertices = 6) out; - - in vec3 v_normal[]; - in vec3 v_vertex[]; - - out vec3 f_normal; - out vec3 f_vertex; - - void main() - { - int i; - for(i = 0; i < 3; i++) - { - f_normal = v_normal[i]; - f_vertex = v_vertex[i]; - gl_Position = gl_in[i].gl_Position + vec4(-50, 0.0, 0.0, 0.0); - EmitVertex(); - } - EndPrimitive(); - - for(i = 0; i < 3; i++) - { - f_normal = v_normal[i]; - f_vertex = v_vertex[i]; - gl_Position = gl_in[i].gl_Position + vec4(50, 0.0, 0.0, 0.0); - EmitVertex(); - } - EndPrimitive(); + f_vertex = world_space_vert.xyz; + f_normal = (u_normalMatrix * normalize(a_normal)).xyz; } fragment = |