Shadows WIP
- create 2D texture (depthmap)
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,18 @@
|
||||
#version 430
|
||||
|
||||
|
||||
|
||||
in VertexData{
|
||||
vec3 Position;
|
||||
}Input;
|
||||
|
||||
//layout(location = 0 ) out vec4 ShadowMap;
|
||||
layout(location = 0 ) out float ShadowMap;
|
||||
|
||||
void main()
|
||||
{
|
||||
//ShadowMap = vec4(vec3(gl_FragCoord.z), 1.0);
|
||||
//ShadowMap = gl_FragCoord.z;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
#version 430
|
||||
|
||||
uniform mat4 M;
|
||||
uniform mat4 V;
|
||||
uniform mat4 P;
|
||||
|
||||
layout(location = 0) in vec3 Position;
|
||||
|
||||
out VertexData{
|
||||
vec3 Position;
|
||||
}Output;
|
||||
|
||||
void main()
|
||||
{
|
||||
Output.Position = Position;
|
||||
gl_Position = P * V * M * vec4(Position, 1.0);
|
||||
}
|
||||
Reference in New Issue
Block a user