RedPanda-CPP/windows/templates/GLFW_shader.vs.txt

12 lines
301 B
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#version 330 core
layout (location = 0) in vec3 position;//in 代表输入向量, location与下面的顶点属性描述有关。
layout (location = 1) in vec3 color;
out vec3 ourColor;//out 代表输出3维向量作为片段着色器的输入见下文
void main()
{
gl_Position = vec4(position, 1.0f);
ourColor = color;
}