Add perspective view
This commit is contained in:
@@ -1,8 +1,13 @@
|
||||
#version 330 core
|
||||
|
||||
out vec4 fragmentColor;
|
||||
in vec2 textureCoord;
|
||||
uniform vec4 base_color;
|
||||
uniform sampler2D uni_texture;
|
||||
|
||||
void main()
|
||||
{
|
||||
fragmentColor = vec4(1.0, 0.0, 0.0, 0.0);
|
||||
vec4 temp_color = texture(uni_texture, textureCoord);
|
||||
fragmentColor = temp_color * (1 - base_color.a) + base_color * base_color.a;
|
||||
//fragmentColor = vec4(1.0, 0.0, 0.0, 0.0);
|
||||
}
|
||||
|
@@ -1,10 +1,15 @@
|
||||
#version 330 core
|
||||
|
||||
layout (location = 0) in vec2 inputVertex;
|
||||
layout (location = 1) in vec2 textureInputVertex;
|
||||
|
||||
out vec2 textureCoord;
|
||||
|
||||
uniform mat4 model_matrix;
|
||||
uniform mat4 projection_view_matrix;
|
||||
|
||||
void main()
|
||||
{
|
||||
textureCoord = textureInputVertex;
|
||||
gl_Position = projection_view_matrix * model_matrix * vec4(inputVertex.x , inputVertex.y, 0.0, 1.0);
|
||||
}
|
||||
|
Reference in New Issue
Block a user