Implement double frame buffering
This commit is contained in:
18
shaders/pp_frag.glsl
Normal file
18
shaders/pp_frag.glsl
Normal file
@@ -0,0 +1,18 @@
|
||||
#version 330 core
|
||||
|
||||
struct Material {
|
||||
sampler2D diffuse1;
|
||||
sampler2D specular1;
|
||||
float shininess;
|
||||
};
|
||||
|
||||
in vec2 uv_coords;
|
||||
|
||||
uniform Material material;
|
||||
// uniform sampler2D image_texture;
|
||||
|
||||
out vec4 color;
|
||||
|
||||
void main() {
|
||||
color = vec4(vec3(texture(material.diffuse1, uv_coords)), 1.0);
|
||||
}
|
||||
12
shaders/pp_vert.glsl
Normal file
12
shaders/pp_vert.glsl
Normal file
@@ -0,0 +1,12 @@
|
||||
#version 330 core
|
||||
|
||||
layout(location=0) in vec3 position;
|
||||
layout(location=1) in vec3 normal;
|
||||
layout(location=2) in vec2 uv;
|
||||
|
||||
out vec2 uv_coords;
|
||||
|
||||
void main() {
|
||||
gl_Position = vec4(position.x, position.y, 0.0, 1.0);
|
||||
uv_coords = uv;
|
||||
}
|
||||
Reference in New Issue
Block a user