This repository has been archived on 2024-01-06. You can view files and clone it, but cannot push or open issues or pull requests.
|
#version 330 core
|
|
layout(location = 0) in vec3 aPos; // 位置变量的属性位置值为0
|
|
uniform float xOffset;
|
|
uniform float yOffset;
|
|
void main() {
|
|
gl_Position = vec4(aPos.x + xOffset, aPos.y + yOffset, aPos.z,
|
|
1.0); // 注意我们如何把一个vec3作为vec4的构造器的参数
|
|
}
|