This repository has been archived on 2023-05-27. You can view files and clone it, but cannot push or open issues or pull requests.
api8/shaders/lights.vs

18 lines
312 B
Text
Raw Normal View History

2023-05-01 01:00:50 +02:00
#version 330
layout(location = 0) in vec3 pos;
layout(location = 1) in vec3 normal;
uniform mat4 proj;
uniform mat4 mod;
uniform mat4 view;
out vec4 mvpos;
out vec3 N;
void main() {
N = (inverse(transpose(mod)) * vec4(normal, 0)).xyz;
mvpos = view * mod * vec4(pos, 1.0);
gl_Position = proj * mvpos;
}