1
0
Fork 0

Make the other sunlight shaders recognize water matId.

Remove duplicate fogFunc line in runway.frag
Signed-off-by: Emilian Huminiuc <emilianh@gmail.com>
This commit is contained in:
Emilian Huminiuc 2012-07-18 20:45:45 +03:00
parent 2b846cbddb
commit 05e3eb80f4
3 changed files with 3 additions and 4 deletions

View file

@ -38,8 +38,6 @@ uniform int fogType;
vec3 fog_Func(vec3 color, int type);
//////////////////////
vec3 fog_Func(vec3 color, int type);
void main (void)
{
//vec3 halfV;

View file

@ -6,6 +6,7 @@ uniform sampler2D spec_emis_tex;
uniform sampler2DShadow shadow_tex;
uniform vec4 fg_SunDiffuseColor;
uniform vec4 fg_SunSpecularColor;
uniform vec4 fg_SunAmbientColor;
uniform vec3 fg_SunDirection;
uniform vec3 fg_Planes;
uniform int fg_ShadowNumber;
@ -81,7 +82,7 @@ void main() {
}
float matID = texture2D( color_tex, coords ).a * 255.0;
if (matID == 255.0)
if (matID >= 254.0)
Idiff += Ispec * spec_emis.x;
gl_FragColor = vec4(mix(vec3(0.0), Idiff + Ispec, shadow) + Iemis, 1.0);

View file

@ -35,7 +35,7 @@ void main() {
}
float matID = texture2D( color_tex, coords ).a * 255.0;
if (matID == 255.0)
if (matID >= 254.0)
Idiff += Ispec * spec_emis.x;
gl_FragColor = vec4(Idiff + Ispec + Iemis, 1.0);