From 603b6104ce85dde5eb85d39474977bf059e2dd8a Mon Sep 17 00:00:00 2001 From: CobaltXII Date: Fri, 28 Dec 2018 20:54:14 -0500 Subject: [PATCH] glsl/block_vertex.glsl now passes vertex attributes to the fragment shader --- glsl/block_vertex.glsl | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/glsl/block_vertex.glsl b/glsl/block_vertex.glsl index 118ffba..b242900 100644 --- a/glsl/block_vertex.glsl +++ b/glsl/block_vertex.glsl @@ -10,7 +10,15 @@ uniform mat4 matrix_projection; uniform mat4 matrix_view; +out vec3 frag_texture; + +out float frag_lighting; + void main() { - gl_Position = vec4(vertex_position, 1.0f); + gl_Position = matrix_projection * matrix_view * vec4(vertex_position, 1.0f); + + frag_texture = vertex_texture; + + frag_lighting = vertex_lighting; } \ No newline at end of file