map visualization features

This commit is contained in:
milek7
2019-04-02 01:21:49 +02:00
parent 851deb9142
commit 33adffb614
9 changed files with 116 additions and 24 deletions

View File

@@ -2,7 +2,14 @@
layout(location = 0) out vec4 out_color;
vec3 hsv2rgb(vec3 c)
{
vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);
vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);
return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);
}
void main()
{
out_color = vec4(vec3(0.3f, time, 0.3f), 1.0f);
out_color = vec4(hsv2rgb(vec3(time, 1.0, 1.0)), 1.0f);
}