shader vacuuming
[carveJwlIkooP6JGAAIwe30JlM.git] / shaders / scene_position.fs
diff --git a/shaders/scene_position.fs b/shaders/scene_position.fs
new file mode 100644 (file)
index 0000000..57d1f06
--- /dev/null
@@ -0,0 +1,24 @@
+out vec4 FragColor;
+
+uniform vec3 uCamera;
+uniform vec3 uBoard0;
+uniform vec3 uBoard1;
+
+in vec2 aUv;
+in vec4 aNorm;
+in vec3 aCo;
+in vec3 aWorldCo;
+flat in ivec4 aLights;
+
+#include "common_scene.glsl"
+
+void main()
+{
+   float height_full = aWorldCo.y;
+   float height_water = height_full;
+
+   if( height_water > (g_water_plane.y * g_water_plane.w) + 2.0 )
+      height_water = -99999.9;
+
+   FragColor = vec4( height_full, height_water, 0.0, 0.0 );
+}