35 lines
808 B
Plaintext
35 lines
808 B
Plaintext
// Copyright 2006-2010 (C) - Frictional Games
|
|
//
|
|
// This file is part of HPL1 Engine
|
|
//
|
|
// For conditions of distribution and use, see copyright notice in LICENSE-shaders
|
|
//
|
|
|
|
///////////////////////////////////////////////////////
|
|
/// WATER FOG VERTEX PROGRAM ////////////
|
|
///////////////////////////////////////////////////////
|
|
|
|
vec4 position = gl_Vertex;
|
|
vec3 color = gl_Color.xyz;
|
|
vec2 uv = gl_MultiTexCoord0.xy;
|
|
|
|
out vec3 vColor;
|
|
out vec2 vUv;
|
|
|
|
uniform mat4 worldViewProj;
|
|
uniform float timeCount;
|
|
|
|
void main()
|
|
{
|
|
float amp = 0.04;
|
|
float freq = 15.0;
|
|
float speed = 3.0;
|
|
|
|
gl_Position = (worldViewProj * position);
|
|
gl_Position.y += sin(timeCount*speed + (position.x)*freq)*amp;
|
|
gl_Position.y += sin(timeCount*speed + (position.z)*freq)*amp;
|
|
|
|
vColor = clamp(color, vec3(0.0), vec3(1.0));
|
|
|
|
vUv = uv;
|
|
} |