X-Git-Url: https://eleni.mutantstargoat.com/git/?p=demo;a=blobdiff_plain;f=gl_shaders%2Fdefault.v.glsl;fp=gl_shaders%2Fdefault.v.glsl;h=0000000000000000000000000000000000000000;hp=b550308275342f22ec91130a38e2fc2591de6f1b;hb=0f6519c2606f2863d9c7ee8b9754b9f23df281ab;hpb=05d269a194496bcef85da78652b947f5bf1c9bcf diff --git a/gl_shaders/default.v.glsl b/gl_shaders/default.v.glsl deleted file mode 100644 index b550308..0000000 --- a/gl_shaders/default.v.glsl +++ /dev/null @@ -1,31 +0,0 @@ -#version 450 - -#define MATRIX_UNIFORMS 0 - -layout(std140, binding = MATRIX_UNIFORMS) uniform vu { - mat4 mview; - uniform mat4 mmviewproj; - uniform mat4 mmod; -} m; - -const vec3 lpos = vec3(-10.0, 100.0, 10.0); - -/* attributes */ -layout(location = 1) in vec3 attr_pos; -layout(location = 2) in vec3 attr_normal; -layout(location = 3) in vec2 attr_tex; - -/* varyings */ -layout(location = 4) out vec3 pos; -layout(location = 5) out vec2 tex_coord; -layout(location = 6) out vec3 world_normal; - -void main() -{ - gl_Position = m.mmviewproj * vec4(attr_pos, 1.0); - - pos = (m.mview * vec4(attr_pos, 1.0)).xyz; - tex_coord = attr_tex; - - world_normal = (m.mmod * vec4(attr_normal, 1.0)).xyz; -}