per-primitive coloring

This commit is contained in:
2020-03-10 01:01:55 -04:00
parent c345e54d02
commit c5ad4597ce
4 changed files with 30 additions and 14 deletions

View File

@@ -1,12 +1,14 @@
#version 430
layout(location=2) uniform vec3 c;
//layout(location=2) uniform vec3 c;
in vec4 pos;
in vec4 col;
out vec4 color;
void main() {
float d = smoothstep(-2, 2, pos.z);
color = vec4(c * d, 1);
color = col;
// float d = smoothstep(-2, 2, pos.z);
// color = vec4(c * d, 1);
}