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/manif.vs
2023-05-08 10:23:45 +02:00

14 lines
366 B
GLSL

#version 330
layout(location = 0) in vec3 pos;
layout(location = 1) in vec3 normal;
out float il;
uniform mat4 proj, model, view;
void main() {
vec3 Ld = normalize(vec3(0.0, -0.2, -1.0));
vec3 n = normalize(transpose(inverse(view * model)) * vec4(normal, 0.0)).xyz;
il = clamp(dot(n, -Ld), 0.0, 1.0);
gl_Position = proj * view * model * vec4(pos, 1.0);
}