Bare minimum water shaders

This commit is contained in:
Joshua Barretto 2022-02-09 14:41:44 +00:00
parent 0facac68b4
commit 17d5a9e222
2 changed files with 10 additions and 0 deletions

View File

@ -51,6 +51,11 @@ layout(location = 0) out vec4 tgt_color;
#include <lod.glsl>
void main() {
#ifdef EXPERIMENTAL_BAREMINIMUM
tgt_color = vec4(simple_lighting(f_pos.xyz, MU_SCATTER, 1.0), 0.5);
return;
#endif
// tgt_color = vec4(1.0 - MU_WATER, 1.0);
// return;
// First 3 normals are negative, next 3 are positive

View File

@ -89,6 +89,11 @@ float wave_height(vec3 pos) {
}
void main() {
#ifdef EXPERIMENTAL_BAREMINIMUM
tgt_color = vec4(simple_lighting(f_pos.xyz, MU_SCATTER, 1.0), 0.5);
return;
#endif
// First 3 normals are negative, next 3 are positive
vec3 normals[6] = vec3[](vec3(-1,0,0), vec3(1,0,0), vec3(0,-1,0), vec3(0,1,0), vec3(0,0,-1), vec3(0,0,1));