X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=shaders%2Fscene_position.fs;fp=shaders%2Fscene_position.fs;h=57d1f06dbc615992b95400f87e3ee299d2add56c;hb=f3a2490079baf440238b78e54f4476649eddbda2;hp=0000000000000000000000000000000000000000;hpb=192990d6d24e53749ca046fef808a63cf162ab8a;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/shaders/scene_position.fs b/shaders/scene_position.fs new file mode 100644 index 0000000..57d1f06 --- /dev/null +++ b/shaders/scene_position.fs @@ -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 ); +}