Archived
1
Fork 0
This repository has been archived on 2025-04-12. You can view files and clone it, but cannot push or open issues or pull requests.
graph/shaders/triangle.frag
2018-10-16 13:03:26 -04:00

14 lines
368 B
GLSL

#version 460 core
layout(location = 0) in vec3 inFragPos;
layout(location = 1) in vec3 inNormal;
layout(location = 0) out vec4 outColor;
void main() {
const vec3 norm = normalize(inNormal);
const vec3 lightDir = normalize(vec3(5) - inFragPos);
const float diff = max(dot(norm, lightDir), 0.0);
outColor = vec4(vec3(0.1) + vec3(diff), 1.0);
}