Копия проекта с 04

This commit is contained in:
2022-11-14 19:53:14 +03:00
parent 9b27bd16fd
commit 635422c699
17 changed files with 1583 additions and 0 deletions

13
shaders/shader.frag Normal file
View 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);
}

15
shaders/shader.vert Normal file
View File

@@ -0,0 +1,15 @@
#version 330 core
layout(location = 0) in vec3 pos;
layout(location = 1) in vec2 inTexCoord;
uniform mat4 vp;
uniform mat4 model;
out vec2 texCoord;
void main()
{
gl_Position = vp * model * vec4(pos, 1.0);
texCoord = inTexCoord;
}