File: gen_tetra_frag.glsl

package info (click to toggle)
python-moderngl-window 3.1.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 69,096 kB
  • sloc: python: 12,076; makefile: 21
file content (13 lines) | stat: -rw-r--r-- 221 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
#version 330

uniform vec3 color;

out vec4 fragColor;

in vec3 pos;
in vec3 normal;

void main() {
    float l = dot(normalize(-pos), normalize(normal));
    fragColor = vec4(color, 1.0) * (l / 3 + 0.66);
}