1
0
Fork 0

revert the reflection shader patch, it didn't work out the way I hoped it would

This commit is contained in:
Erik Hofman 2011-07-16 15:11:52 +02:00
parent 16c73c0e5e
commit 7300bc4bb0
3 changed files with 4 additions and 2 deletions

BIN
Shaders/.landmass.vert.swp Normal file

Binary file not shown.

View file

@ -12,6 +12,7 @@ varying vec3 reflVec;
varying vec4 Diffuse;
varying float alpha;
varying float fogCoord;
uniform samplerCube Environment;
uniform sampler2D Rainbow;
@ -57,8 +58,6 @@ void main (void)
// calculate the fog factor
const float LOG2 = 1.442695;
float fogCoord = abs(ecPosition.z);
// float fogCoord = abs(ecPosition.z / ecPosition.w);
float fogFactor = exp2(-gl_Fog.density * gl_Fog.density * fogCoord * fogCoord * LOG2);
fogFactor = clamp(fogFactor, 0.0, 1.0);

View file

@ -10,6 +10,7 @@ varying vec3 reflVec;
varying vec4 Diffuse;
varying float alpha;
varying float fogCoord;
uniform mat4 osg_ViewMatrixInverse;
@ -36,6 +37,8 @@ void main(void)
else
alpha = gl_Color.a;
fogCoord = abs(ecPosition.z);
// Vertex in eye coordinates
vec3 vertVec = ecPosition.xyz;