KP3Dii/Data/resources/shaders/.kp3d/r3d_legacy_v.glsl

25 lines
387 B
GLSL
Raw Normal View History

2024-07-24 18:29:59 +00:00
#version 330 core
uniform mat4 u_mvp;
layout (location = 0) in vec3 position;
layout (location = 1) in vec4 color;
layout (location = 2) in vec2 texcoord;
out vec3 v_position;
out vec4 v_color;
out vec2 v_texcoord;
out float v_id;
void main()
{
v_position = position;
v_color = color;
v_texcoord = texcoord;
v_id = gl_VertexID;
gl_Position = u_mvp * vec4(v_position, 1.0);
}