Add wall shadow shaders
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
#version 430 core
|
||||
layout (points) in;
|
||||
layout (triangle_strip, max_vertices = 4) out;
|
||||
|
||||
in vec4 vBackPoss[];
|
||||
uniform vec2 lightPos;
|
||||
|
||||
void main()
|
||||
{
|
||||
vec2 posa = gl_in[0].gl_Position.xy;
|
||||
vec2 posb = gl_in[0].gl_Position.zw;
|
||||
vec2 v = normalize( posb - posa);
|
||||
vec2 off = vec2( -(v.y *0.2)
|
||||
, v.x *0.2 );
|
||||
|
||||
gl_Position = vec4 (posa, 0 , 1);
|
||||
EmitVertex();
|
||||
gl_Position = vec4 (posb, 0 , 1);
|
||||
EmitVertex();
|
||||
gl_Position = vec4 (posa + off, 0 , 1);
|
||||
EmitVertex();
|
||||
gl_Position = vec4 (posb + off, 0 , 1);
|
||||
EmitVertex();
|
||||
|
||||
EndPrimitive();
|
||||
}
|
||||
Reference in New Issue
Block a user