Commit before attempting to use volume shadows for walls
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
#version 430 core
|
||||
layout (location = 0) in vec3 pos;
|
||||
|
||||
out vec2 vDistField;
|
||||
out float vLum;
|
||||
|
||||
uniform mat4 worldMat;
|
||||
uniform vec4 lightPosRadLum;
|
||||
|
||||
mat4 perspective =
|
||||
mat4 (1,0,0,0
|
||||
,0,1,0,0
|
||||
,0,0,1,1
|
||||
,0,0,0,1
|
||||
) ;
|
||||
void main()
|
||||
{
|
||||
float r = lightPosRadLum.z ;
|
||||
float x = lightPosRadLum.x ;
|
||||
float y = lightPosRadLum.y ;
|
||||
gl_Position = perspective * worldMat * vec4(pos, 1);
|
||||
vDistField = vec2 ( (pos.x - x)/r , (pos.y - y)/(r*100) ) ;
|
||||
vLum = lightPosRadLum.w;
|
||||
}
|
||||
Reference in New Issue
Block a user