To spare few GPU cycle
This commit is contained in:
parent
6e559ab4eb
commit
21ae0c8c69
1 changed files with 1 additions and 9 deletions
|
@ -9,7 +9,6 @@ varying vec3 normal;
|
|||
|
||||
void main(void)
|
||||
{
|
||||
|
||||
vec3 N = normalize(gl_Normal);
|
||||
normal = N;
|
||||
|
||||
|
@ -18,14 +17,7 @@ ecPosition = gl_ModelViewMatrix * gl_Vertex;
|
|||
viewerdir = vec3(gl_ModelViewMatrixInverse[3]) - vec3(gl_Vertex);
|
||||
lightdir = normalize(vec3(gl_ModelViewMatrixInverse * gl_LightSource[0].position));
|
||||
|
||||
vec4 tangent = vec4(1.0, 0.0, 0.0, 0.0);
|
||||
vec4 norm = vec4(0.0, 1.0, 0.0, 0.0);
|
||||
vec4 binormal = vec4(0.0, 0.0, 1.0, 0.0);
|
||||
|
||||
waterTex4.x = dot(ecPosition, tangent);
|
||||
waterTex4.y = dot(ecPosition, binormal);
|
||||
waterTex4.z = dot(ecPosition, norm);
|
||||
waterTex4.w = 0.0;
|
||||
waterTex4 = vec4( ecPosition.xzy, 0.0 );
|
||||
|
||||
vec4 t1 = vec4(0.0, osg_SimulationTime*0.005217, 0.0,0.0);
|
||||
vec4 t2 = vec4(0.0, osg_SimulationTime*-0.0012, 0.0,0.0);
|
||||
|
|
Loading…
Add table
Reference in a new issue