uniform vec3 uBoard0;
uniform vec3 uBoard1;
-in vec2 aUv;
-in vec4 aNorm;
-in vec3 aCo;
-in vec3 aWorldCo;
-flat in ivec4 aLights;
-
-#include "common_world.glsl"
+#include "common_scene.glsl"
// Water blending
// ==============
void main()
{
- vec3 halfview = normalize( uCamera - aCo );
- vec3 world_pos = vec3( aCo.y, aCo.x, aCo.z );
- FragColor = vec4( world_pos, water_depth( aCo, halfview ) );
+ vec3 halfview = normalize( uCamera - aWorldCo );
+ float depth = water_depth( aWorldCo, halfview );
+ FragColor = vec4( depth, 0.0, 0.0, 0.0 );
}