fix ubershader lighting in Rembrandt
IAR80: remove range animations for now Signed-off-by: Emilian Huminiuc <emilianh@gmail.com>
This commit is contained in:
parent
0a662adee1
commit
feb30c83b5
3 changed files with 24 additions and 4 deletions
|
@ -140,6 +140,9 @@ please see Docs/README.model-combined.eff for documentation
|
||||||
<fogtype>
|
<fogtype>
|
||||||
<use>/sim/rendering/shaders/skydome</use>
|
<use>/sim/rendering/shaders/skydome</use>
|
||||||
</fogtype>
|
</fogtype>
|
||||||
|
<rembrandt>
|
||||||
|
<use>/sim/rendering/rembrandt</use>
|
||||||
|
</rembrandt>
|
||||||
<!-- END fog include -->
|
<!-- END fog include -->
|
||||||
</parameters>
|
</parameters>
|
||||||
|
|
||||||
|
@ -752,6 +755,13 @@ please see Docs/README.model-combined.eff for documentation
|
||||||
</value>
|
</value>
|
||||||
</uniform>
|
</uniform>
|
||||||
<!-- END fog include -->
|
<!-- END fog include -->
|
||||||
|
<uniform>
|
||||||
|
<name>rembrandt_enabled</name>
|
||||||
|
<type>int</type>
|
||||||
|
<value>
|
||||||
|
<use>rembrandt</use>
|
||||||
|
</value>
|
||||||
|
</uniform>
|
||||||
</pass>
|
</pass>
|
||||||
</technique>
|
</technique>
|
||||||
|
|
||||||
|
@ -1360,7 +1370,13 @@ please see Docs/README.model-combined.eff for documentation
|
||||||
</value>
|
</value>
|
||||||
</uniform>
|
</uniform>
|
||||||
<!-- END fog include -->
|
<!-- END fog include -->
|
||||||
|
<uniform>
|
||||||
|
<name>rembrandt_enabled</name>
|
||||||
|
<type>int</type>
|
||||||
|
<value>
|
||||||
|
<use>rembrandt</use>
|
||||||
|
</value>
|
||||||
|
</uniform>
|
||||||
</pass>
|
</pass>
|
||||||
</technique>
|
</technique>
|
||||||
</PropertyList>
|
</PropertyList>
|
|
@ -75,7 +75,7 @@ void main (void)
|
||||||
//vec3 ambient = fg_SunAmbientColor.rgb;
|
//vec3 ambient = fg_SunAmbientColor.rgb;
|
||||||
vec3 N;
|
vec3 N;
|
||||||
vec3 dotN;
|
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;
|
float pf;
|
||||||
|
|
||||||
///BEGIN bump
|
///BEGIN bump
|
||||||
|
@ -94,7 +94,7 @@ void main (void)
|
||||||
float v = dot(viewVec, normalize(VNormal));// Map a rainbowish color
|
float v = dot(viewVec, normalize(VNormal));// Map a rainbowish color
|
||||||
vec4 fresnel = texture2D(ReflFresnelTex, vec2(v, 0.0));
|
vec4 fresnel = texture2D(ReflFresnelTex, vec2(v, 0.0));
|
||||||
vec4 rainbow = texture2D(ReflRainbowTex, 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 ));
|
float specular = dot((gl_FrontMaterial.specular * nmap.a).rgb, vec3( 0.3, 0.59, 0.11 ));
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
|
|
|
@ -21,6 +21,7 @@ uniform float hdg;
|
||||||
uniform int refl_dynamic;
|
uniform int refl_dynamic;
|
||||||
uniform int nmap_enabled;
|
uniform int nmap_enabled;
|
||||||
uniform int shader_qual;
|
uniform int shader_qual;
|
||||||
|
uniform int rembrandt_enabled;
|
||||||
|
|
||||||
//////Fog Include///////////
|
//////Fog Include///////////
|
||||||
// uniform int fogType;
|
// uniform int fogType;
|
||||||
|
@ -101,8 +102,11 @@ void main(void)
|
||||||
reflVec = reflVec_stat;
|
reflVec = reflVec_stat;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(rembrandt_enabled < 1){
|
||||||
gl_FrontColor = gl_FrontMaterial.emission + gl_Color * (gl_LightModel.ambient + gl_LightSource[0].ambient);
|
gl_FrontColor = gl_FrontMaterial.emission + gl_Color * (gl_LightModel.ambient + gl_LightSource[0].ambient);
|
||||||
|
} else {
|
||||||
|
gl_FrontColor = gl_Color;
|
||||||
|
}
|
||||||
gl_Position = ftransform();
|
gl_Position = ftransform();
|
||||||
gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
|
gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue