diff options
Diffstat (limited to 'gfx/gl/shaders')
-rw-r--r-- | gfx/gl/shaders/dynamicPointInst.vs | 21 | ||||
-rw-r--r-- | gfx/gl/shaders/spotLight.vs | 2 |
2 files changed, 22 insertions, 1 deletions
diff --git a/gfx/gl/shaders/dynamicPointInst.vs b/gfx/gl/shaders/dynamicPointInst.vs new file mode 100644 index 0000000..1c66979 --- /dev/null +++ b/gfx/gl/shaders/dynamicPointInst.vs @@ -0,0 +1,21 @@ +#version 330 core + +include(`meshIn.glsl') +layout(location = 5) in mat4 model; +include(`materialInterface.glsl') + +uniform mat4 viewProjection; + +void +main() +{ + vec4 worldPos = model * vec4(position, 1.0); + + FragPos = worldPos.xyz; + TexCoords = texCoord; + Normal = (model * vec4(normal, 0.0)).xyz; + Colour = colour; + Material = material; + + gl_Position = viewProjection * worldPos; +} diff --git a/gfx/gl/shaders/spotLight.vs b/gfx/gl/shaders/spotLight.vs index e648553..dca0854 100644 --- a/gfx/gl/shaders/spotLight.vs +++ b/gfx/gl/shaders/spotLight.vs @@ -1,8 +1,8 @@ #version 330 core layout(location = 0) in vec3 v_position; -layout(location = 1) in vec3 v_direction; +uniform vec3 v_direction; uniform vec3 colour; uniform float kq; uniform float arc; |