diff --git a/shaders/bulb.frag b/shaders/bulb.frag new file mode 100644 index 0000000..9329edf --- /dev/null +++ b/shaders/bulb.frag @@ -0,0 +1,16 @@ +#version 420 core + +layout(std140, binding = 1) uniform Material +{ + vec3 ka; + vec3 kd; + vec3 ks; + float p; +}; + +out vec4 color; + +void main() +{ + color = vec4(ka, 1); +} \ No newline at end of file diff --git a/shaders/bulb.vert b/shaders/bulb.vert new file mode 100644 index 0000000..7ce8b0b --- /dev/null +++ b/shaders/bulb.vert @@ -0,0 +1,17 @@ +#version 420 core + +layout(location = 0) in vec3 pos; + +layout(std140, binding = 0) uniform Camera +{ + mat4 projection; + mat4 view; + vec3 position; +} camera; + +uniform mat4 model; + +void main() +{ + gl_Position = camera.projection * camera.view * model * vec4(pos, 1.0); +} \ No newline at end of file