a rotating cube (#3)

This commit is contained in:
Akash Shakdwipeea
2024-12-22 20:01:51 +05:30
committed by GitHub
parent 41196e4840
commit 5ecaf14b3d
10 changed files with 312 additions and 43 deletions
+18
View File
@@ -0,0 +1,18 @@
#version 300 es
// an attribute is an input (in) to a vertex shader.
// It will receive data from a buffer
in vec3 position;
// uniforms
uniform mat4 model;
uniform mat4 view;
uniform mat4 projection;
// all shaders have a main function
void main() {
// gl_Position is a special variable a vertex shader
// is responsible for setting
gl_Position = projection * view * model * vec4(position, 1.0);
}