X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=shaders%2Froute.h;h=271a47f328d68575499328749e9b37d58aa52e09;hb=47941822dae18a018c985847b052e70214a3ccc6;hp=650f8a957d0f583fb59567518ff3ed16b4e3cdb8;hpb=1030b1e134d422a3cbc1e06102053447da59ceba;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/shaders/route.h b/shaders/route.h index 650f8a9..271a47f 100644 --- a/shaders/route.h +++ b/shaders/route.h @@ -7,17 +7,19 @@ static struct vg_shader _shader_route = { .link = shader_route_link, .vs = { -.orig_file = "../shaders/standard.vs", +.orig_file = "../../shaders/standard.vs", .static_src = "layout (location=0) in vec3 a_co;\n" "layout (location=1) in vec3 a_norm;\n" -"layout (location=2) in vec4 a_colour;\n" -"layout (location=3) in vec2 a_uv;\n" +"layout (location=2) in vec2 a_uv;\n" +"layout (location=3) in vec4 a_colour;\n" +"layout (location=4) in vec4 a_weights;\n" +"layout (location=5) in ivec4 a_groups;\n" "\n" "#line 2 0 \n" "\n" -"uniform mat4 uPv;\n" "uniform mat4x3 uMdl;\n" +"uniform mat4 uPv;\n" "\n" "out vec4 aColour;\n" "out vec2 aUv;\n" @@ -38,7 +40,7 @@ static struct vg_shader _shader_route = { ""}, .fs = { -.orig_file = "../shaders/route.fs", +.orig_file = "../../shaders/route.fs", .static_src = "out vec4 FragColor;\n" "\n" @@ -197,19 +199,19 @@ static struct vg_shader _shader_route = { ""}, }; -static GLuint _uniform_route_uPv; static GLuint _uniform_route_uMdl; +static GLuint _uniform_route_uPv; static GLuint _uniform_route_uTexGarbage; static GLuint _uniform_route_uTexGradients; static GLuint _uniform_route_uCamera; static GLuint _uniform_route_uColour; static GLuint _uniform_route_g_world_depth; -static void shader_route_uPv(m4x4f m){ - glUniformMatrix4fv( _uniform_route_uPv, 1, GL_FALSE, (float *)m ); -} static void shader_route_uMdl(m4x3f m){ glUniformMatrix4x3fv( _uniform_route_uMdl, 1, GL_FALSE, (float *)m ); } +static void shader_route_uPv(m4x4f m){ + glUniformMatrix4fv( _uniform_route_uPv, 1, GL_FALSE, (float *)m ); +} static void shader_route_uTexGarbage(int i){ glUniform1i( _uniform_route_uTexGarbage, i ); } @@ -230,8 +232,8 @@ static void shader_route_register(void){ } static void shader_route_use(void){ glUseProgram(_shader_route.id); } static void shader_route_link(void){ - _uniform_route_uPv = glGetUniformLocation( _shader_route.id, "uPv" ); _uniform_route_uMdl = glGetUniformLocation( _shader_route.id, "uMdl" ); + _uniform_route_uPv = glGetUniformLocation( _shader_route.id, "uPv" ); _uniform_route_uTexGarbage = glGetUniformLocation( _shader_route.id, "uTexGarbage" ); _uniform_route_uTexGradients = glGetUniformLocation( _shader_route.id, "uTexGradients" ); _uniform_route_uCamera = glGetUniformLocation( _shader_route.id, "uCamera" );