summaryrefslogtreecommitdiff
path: root/gfx/gl/shaders/waterShader.fs
blob: d242566a1063156ff374df8b430cf6f22edc2d87 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#version 330 core
#extension GL_ARB_shading_language_420pack : enable

in vec3 FragPos;
in vec2 TexCoords;
in vec3 Normal;

out vec4 gPosition;
out vec4 gNormal;
out vec4 gAlbedoSpec;

uniform sampler2D texture0;
uniform vec3 waves;

void
main()
{
	gPosition = vec4(FragPos, 1);
	gNormal = vec4(Normal, 1);
	gAlbedoSpec = texture(texture0, TexCoords);
	gAlbedoSpec.a *= clamp(-FragPos.z * .7, .1, 1.0);
}