diff options
| author | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
|---|---|---|
| committer | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
| commit | 54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch) | |
| tree | d915ac7828703ce4b963efdd9728a1777ba18c1e /apps/openmb/resources/shaders/textured.vert | |
Diffstat (limited to 'apps/openmb/resources/shaders/textured.vert')
| -rw-r--r-- | apps/openmb/resources/shaders/textured.vert | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/apps/openmb/resources/shaders/textured.vert b/apps/openmb/resources/shaders/textured.vert new file mode 100644 index 0000000..f71f407 --- /dev/null +++ b/apps/openmb/resources/shaders/textured.vert @@ -0,0 +1,23 @@ +#version 330 core +layout(location = 0) in vec3 aPos; +layout(location = 1) in vec2 aUV; +layout(location = 2) in vec3 aNormal; + +uniform mat4 model; +uniform mat4 view; +uniform mat4 proj; +uniform mat4 lightSpace; + +out vec2 vUV; +out vec3 vNormal; +out vec3 vFragPos; +out vec4 vFragPosLightSpace; + +void main() +{ + vUV = aUV; + vFragPos = vec3(model * vec4(aPos, 1.0)); + vNormal = mat3(transpose(inverse(model))) * aNormal; + vFragPosLightSpace = lightSpace * vec4(vFragPos, 1.0); + gl_Position = proj * view * model * vec4(aPos, 1.0); +} |