graphics/07-boilerplate/assets/shaders/default_vertex.glsl

25 lines
669 B
Plaintext
Raw Normal View History

2023-12-15 20:43:42 +00:00
#version 330 core
layout (location = 0) in vec4 position;
layout (location = 1) in vec4 origin;
layout (location = 2) in vec4 color;
layout (location = 3) in vec2 texture_position;
layout (location = 4) in float ctt;
uniform mat4 view_matrix;
uniform mat4 projection_matrix;
out vec4 _color;
out vec2 _texture_position;
out float _ctt;
void main() {
vec3 origined_position = origin.xyz + position.xyz;
origined_position *= 0.2;
2023-12-15 20:43:42 +00:00
//gl_Position = projection_matrix * view_matrix * position;
gl_Position = projection_matrix * view_matrix * vec4(origined_position, 1.0);
2023-12-15 20:43:42 +00:00
_color = color;
_texture_position = texture_position;
_ctt = ctt;
}