1
0
Fork 0

fix ubershader lighting in Rembrandt

IAR80: remove range animations for now
Signed-off-by: Emilian Huminiuc <emilianh@gmail.com>
This commit is contained in:
Emilian Huminiuc 2012-04-01 20:20:33 +03:00
parent 0a662adee1
commit feb30c83b5
3 changed files with 24 additions and 4 deletions

View file

@ -140,6 +140,9 @@ please see Docs/README.model-combined.eff for documentation
<fogtype>
<use>/sim/rendering/shaders/skydome</use>
</fogtype>
<rembrandt>
<use>/sim/rendering/rembrandt</use>
</rembrandt>
<!-- END fog include -->
</parameters>
@ -752,6 +755,13 @@ please see Docs/README.model-combined.eff for documentation
</value>
</uniform>
<!-- END fog include -->
<uniform>
<name>rembrandt_enabled</name>
<type>int</type>
<value>
<use>rembrandt</use>
</value>
</uniform>
</pass>
</technique>
@ -1360,7 +1370,13 @@ please see Docs/README.model-combined.eff for documentation
</value>
</uniform>
<!-- END fog include -->
<uniform>
<name>rembrandt_enabled</name>
<type>int</type>
<value>
<use>rembrandt</use>
</value>
</uniform>
</pass>
</technique>
</PropertyList>

View file

@ -75,7 +75,7 @@ void main (void)
//vec3 ambient = fg_SunAmbientColor.rgb;
vec3 N;
vec3 dotN;
float emission = dot( gl_FrontLightModelProduct.sceneColor.rgb, vec3( 0.3, 0.59, 0.11 ) );
float emission = dot( gl_FrontLightModelProduct.sceneColor.rgb + gl_FrontMaterial.emission , vec3( 0.3, 0.59, 0.11 ) );
float pf;
///BEGIN bump
@ -94,7 +94,7 @@ void main (void)
float v = dot(viewVec, normalize(VNormal));// Map a rainbowish color
vec4 fresnel = texture2D(ReflFresnelTex, vec2(v, 0.0));
vec4 rainbow = texture2D(ReflRainbowTex, vec2(v, 0.0));
vec4 color = gl_Color + gl_FrontMaterial.diffuse;
vec4 color = gl_Color * gl_FrontMaterial.diffuse;
float specular = dot((gl_FrontMaterial.specular * nmap.a).rgb, vec3( 0.3, 0.59, 0.11 ));
////////////////////////////////////////////////////////////////////

View file

@ -21,6 +21,7 @@ uniform float hdg;
uniform int refl_dynamic;
uniform int nmap_enabled;
uniform int shader_qual;
uniform int rembrandt_enabled;
//////Fog Include///////////
// uniform int fogType;
@ -101,8 +102,11 @@ void main(void)
reflVec = reflVec_stat;
}
if(rembrandt_enabled < 1){
gl_FrontColor = gl_FrontMaterial.emission + gl_Color * (gl_LightModel.ambient + gl_LightSource[0].ambient);
} else {
gl_FrontColor = gl_Color;
}
gl_Position = ftransform();
gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
}