1
0
Fork 0

Like the landmass sharder, move the bump factor to the shader file to limit the number of varyings to 7

This commit is contained in:
Erik Hofman 2011-07-16 11:51:45 +02:00
parent 71283a3eae
commit 281445e31e
2 changed files with 2 additions and 8 deletions

View file

@ -6,8 +6,6 @@ varying vec3 VTangent;
varying vec3 VBinormal;
varying vec3 VNormal;
varying vec3 Normal;
varying float bump;
varying float fogCoord;
uniform sampler3D NoiseTex;
uniform sampler2D SampleTex;
@ -61,6 +59,7 @@ float ray_intersect(sampler2D reliefMap, vec2 dp, vec2 ds)
void main (void)
{
float bump = 1.0;
if ( quality_level >= 3.5 ) {
linear_search_steps = 20;
@ -100,6 +99,7 @@ void main (void)
float vegetationlevel = (rawpos.z)+nvL[2]*3000.0;
const float LOG2 = 1.442695;
float fogCoord = abs(ecPosition.z / ecPosition.w);
float fogFactor = exp(-gl_Fog.density * gl_Fog.density * fogCoord * fogCoord);
float biasFactor = exp2(-0.00000002 * fogCoord * fogCoord * LOG2);

View file

@ -5,8 +5,6 @@ varying vec3 VTangent;
varying vec3 VBinormal;
varying vec3 Normal;
varying vec4 constantColor;
varying float bump;
varying float fogCoord;
attribute vec3 tangent;
attribute vec3 binormal;
@ -19,14 +17,10 @@ void main(void)
VNormal = gl_NormalMatrix * gl_Normal;
VTangent = gl_NormalMatrix * tangent;
VBinormal = gl_NormalMatrix * binormal;
bump = 1.0;
gl_FrontColor = gl_Color;
constantColor = gl_FrontMaterial.emission
+ gl_FrontColor * (gl_LightModel.ambient + gl_LightSource[0].ambient);
gl_Position = ftransform();
gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
fogCoord = abs(ecPosition.z / ecPosition.w);
}