diff options
| author | DrNuget <drnuget@outlook.com> | 2026-01-04 22:12:24 +0200 |
|---|---|---|
| committer | DrNuget <drnuget@outlook.com> | 2026-01-04 22:12:24 +0200 |
| commit | 510f1bac9b71ba240d30bb5bc5df6501e70fafc9 (patch) | |
| tree | 7bc48763071a8c315b82e638a267411c3453dd09 /src/shaders/test.vert | |
| download | opengl-test-510f1bac9b71ba240d30bb5bc5df6501e70fafc9.tar.gz | |
Working 3D with .obj file loading
Diffstat (limited to 'src/shaders/test.vert')
| -rw-r--r-- | src/shaders/test.vert | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/shaders/test.vert b/src/shaders/test.vert new file mode 100644 index 0000000..851352d --- /dev/null +++ b/src/shaders/test.vert @@ -0,0 +1,19 @@ +#version 330 core + +layout (location = 0) in vec3 aPos; + +uniform mat4 projection; +uniform mat4 model; + +out vec4 vertexColor; + +void main() +{ + vec4 v = vec4(aPos, 1.0); + vec4 newPosition = model * v; + vec4 projectedPosition = projection * newPosition; + gl_Position = projectedPosition ; + +// gl_Position = u_mvp * vec4(aPos, 1.0); + vertexColor = vec4(0.0, 0.5, 0.0, 1.0); +} |
