adding gfx and ui stuff
This commit is contained in:
19
gfx/assets/shaders/phong.vertex.glsl
Normal file
19
gfx/assets/shaders/phong.vertex.glsl
Normal file
@@ -0,0 +1,19 @@
|
||||
#version 330 core
|
||||
layout (location = 0) in vec3 a_xyz;
|
||||
layout (location = 1) in vec2 a_uv;
|
||||
layout (location = 2) in vec3 a_normal;
|
||||
|
||||
uniform mat4 model;
|
||||
uniform mat4 view;
|
||||
uniform mat4 projection;
|
||||
|
||||
out vec3 normal;
|
||||
out vec3 frag_position;
|
||||
|
||||
void main() {
|
||||
vec4 a_xyz_vec4 = vec4(a_xyz, 1);
|
||||
|
||||
frag_position = (model * a_xyz_vec4).xyz;
|
||||
normal = mat3(transpose(inverse(model))) * a_normal;
|
||||
gl_Position = projection * view * model * a_xyz_vec4;
|
||||
}
|
||||
Reference in New Issue
Block a user