X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=shaders%2Fmodel_font.h;h=e3361ab8c6e91d199d9a3313416167472e7befae;hb=53597f45307d8a2120e3a0bbe71797b216e8750b;hp=65d53e3f83d1a1a43d97cdbb0661af2643e5a1cb;hpb=b3ca3b7a45eec11c46eb19772e10021177665adb;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/shaders/model_font.h b/shaders/model_font.h index 65d53e3..e3361ab 100644 --- a/shaders/model_font.h +++ b/shaders/model_font.h @@ -12,9 +12,6 @@ static struct vg_shader _shader_model_font = { "layout (location=0) in vec3 a_co;\n" "layout (location=1) in vec3 a_norm;\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 1 1 \n" "const float k_motion_lerp_amount = 0.01;\n" @@ -34,16 +31,15 @@ static struct vg_shader _shader_model_font = { " aMotionVec1 = vec3( vproj1.xy, vproj1.w );\n" "}\n" "\n" -"#line 9 0 \n" +"#line 6 0 \n" "\n" "uniform mat4x3 uMdl;\n" "uniform mat4 uPv;\n" "uniform mat4 uPvmPrev;\n" "uniform vec4 uOffset;\n" "\n" -"out vec4 aColour;\n" "out vec2 aUv;\n" -"out vec3 aNorm;\n" +"out vec4 aNorm;\n" "out vec3 aCo;\n" "out vec3 aWorldCo;\n" "\n" @@ -57,25 +53,24 @@ static struct vg_shader _shader_model_font = { " vs_motion_out( vproj0, vproj1 );\n" "\n" " gl_Position = vproj0;\n" -" aWorldCo = world_pos0;\n" -" aColour = a_colour;\n" +"\n" " aUv = a_uv;\n" -" aNorm = mat3(uMdl) * a_norm;\n" -" aCo = a_co;\n" +" aNorm = vec4( mat3(uMdl) * a_norm, 0.0 );\n" +" aCo = co;\n" +" aWorldCo = world_pos0;\n" "}\n" ""}, .fs = { .orig_file = "shaders/model_font.fs", .static_src = -"out vec4 FragColor;\n" +"layout (location = 0) out vec4 oColour;\n" "\n" "uniform sampler2D uTexMain;\n" "uniform vec4 uColour;\n" "\n" -"in vec4 aColour;\n" "in vec2 aUv;\n" -"in vec3 aNorm;\n" +"in vec4 aNorm;\n" "in vec3 aCo;\n" "\n" "#line 1 1 \n" @@ -97,12 +92,12 @@ static struct vg_shader _shader_model_font = { " oMotionVec = (vmotion1-vmotion0) * (1.0/k_motion_lerp_amount);\n" "}\n" "\n" -"#line 12 0 \n" +"#line 11 0 \n" "\n" "void main()\n" "{\n" " compute_motion_vectors();\n" -" FragColor = texture( uTexMain, aUv ) * uColour;\n" +" oColour = texture( uTexMain, aUv ) * uColour;\n" "}\n" ""}, };