Копия проекта с 06
This commit is contained in:
13
shaders/shader.frag
Normal file
13
shaders/shader.frag
Normal file
@@ -0,0 +1,13 @@
|
||||
#version 330 core
|
||||
|
||||
in vec2 texCoord;
|
||||
|
||||
uniform sampler2D tex_diffuse;
|
||||
|
||||
out vec4 color;
|
||||
|
||||
void main()
|
||||
{
|
||||
color = texture(tex_diffuse, texCoord);
|
||||
}
|
||||
|
||||
21
shaders/shader.vert
Normal file
21
shaders/shader.vert
Normal file
@@ -0,0 +1,21 @@
|
||||
#version 420 core
|
||||
|
||||
layout(location = 0) in vec3 pos;
|
||||
layout(location = 1) in vec2 inTexCoord;
|
||||
layout(location = 2) in vec3 normals;
|
||||
|
||||
layout(std140, binding = 0) uniform Camera
|
||||
{
|
||||
mat4 projection;
|
||||
mat4 view;
|
||||
};
|
||||
|
||||
uniform mat4 model;
|
||||
|
||||
out vec2 texCoord;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = projection * view * model * vec4(pos, 1.0);
|
||||
texCoord = inTexCoord;
|
||||
}
|
||||
Reference in New Issue
Block a user