Шейдер отладочных лампочек

This commit is contained in:
parent b80ad37d5a
commit 55dfa6d854
2 changed files with 33 additions and 0 deletions

16
shaders/bulb.frag Normal file
View File

@ -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);
}

17
shaders/bulb.vert Normal file
View File

@ -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);
}