2020-04-05 15:28:22 +02:00
|
|
|
#version 300 es
|
|
|
|
|
|
|
|
// fragment shaders don't have a default precision so we need
|
|
|
|
// to pick one. mediump is a good default. It means "medium precision"
|
|
|
|
precision mediump float;
|
|
|
|
|
2020-08-01 21:51:54 +02:00
|
|
|
in vec3 pos;
|
2020-04-05 15:28:22 +02:00
|
|
|
uniform vec4 u_color;
|
|
|
|
|
|
|
|
out vec4 outColor;
|
|
|
|
|
|
|
|
void main() {
|
2020-08-01 21:51:54 +02:00
|
|
|
vec3 color = pos.xyz;
|
|
|
|
color.z = color.z + 1.0;
|
|
|
|
color.z = color.z / 2.0;
|
|
|
|
color.z = color.z * 255.0;
|
|
|
|
outColor = vec4(color, 1.0);
|
2020-04-05 15:28:22 +02:00
|
|
|
}
|