Копия с проекта 05
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);
|
||||
}
|
||||
|
||||
16
shaders/shader.vert
Normal file
16
shaders/shader.vert
Normal file
@@ -0,0 +1,16 @@
|
||||
#version 330 core
|
||||
|
||||
layout(location = 0) in vec3 pos;
|
||||
layout(location = 1) in vec2 inTexCoord;
|
||||
layout(location = 2) in vec3 normals;
|
||||
|
||||
uniform mat4 vp;
|
||||
uniform mat4 model;
|
||||
|
||||
out vec2 texCoord;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = vp * model * vec4(pos, 1.0);
|
||||
texCoord = inTexCoord;
|
||||
}
|
||||
Reference in New Issue
Block a user