1
0
Fork 0

Merge branch 'master' of gitorious.org:fg/fgdata into work

This commit is contained in:
Vivian Meazza 2012-04-04 17:40:35 +01:00
commit ec715cba3d
3 changed files with 6 additions and 3 deletions

View file

@ -17,7 +17,6 @@
<technique n="8"> <technique n="8">
<predicate> <predicate>
<and> <and>
<property>/sim/rendering/shader-effects</property>
<property>/sim/rendering/shaders/skydome</property> <property>/sim/rendering/shaders/skydome</property>
<or> <or>
<less-equal> <less-equal>

View file

@ -1357,6 +1357,9 @@ if (qualityLevel == -1) {
elsif (qualityLevel != nil) { elsif (qualityLevel != nil) {
setprop("/sim/rendering/shaders/custom-settings",0); setprop("/sim/rendering/shaders/custom-settings",0);
setprop("/sim/rendering/shaders/quality-level-internal",qualityLevel); setprop("/sim/rendering/shaders/quality-level-internal",qualityLevel);
if (qualityLevel == 0) {
setprop("/sim/rendering/shaders/skydome",0);
}
} }
# overwrite custom shader settings when quality-level is set through the slider # overwrite custom shader settings when quality-level is set through the slider
# in the Rendering Options dialog # in the Rendering Options dialog

View file

@ -15,8 +15,9 @@ void main() {
float specular = dot( gl_FrontMaterial.specular.rgb, vec3( 0.3, 0.59, 0.11 ) ); float specular = dot( gl_FrontMaterial.specular.rgb, vec3( 0.3, 0.59, 0.11 ) );
float shininess = gl_FrontMaterial.shininess; float shininess = gl_FrontMaterial.shininess;
float emission = dot( gl_FrontLightModelProduct.sceneColor.rgb, vec3( 0.3, 0.59, 0.11 ) ); float emission = dot( gl_FrontLightModelProduct.sceneColor.rgb, vec3( 0.3, 0.59, 0.11 ) );
ecNormal = (2.0 * gl_Color.a - 1.0) * ecNormal;
gl_FragData[0] = vec4( (ecNormal.xy + vec2(1.0,1.0)) * 0.5, 0.0, 1.0 ); vec3 normal2 = (2.0 * gl_Color.a - 1.0) * ecNormal;
gl_FragData[0] = vec4( (normal2.xy + vec2(1.0,1.0)) * 0.5, 0.0, 1.0 );
gl_FragData[1] = vec4( gl_Color.rgb * texel.rgb, float( materialID ) / 255.0 ); gl_FragData[1] = vec4( gl_Color.rgb * texel.rgb, float( materialID ) / 255.0 );
gl_FragData[2] = vec4( specular, shininess / 255.0, emission, 1.0 ); gl_FragData[2] = vec4( specular, shininess / 255.0, emission, 1.0 );
} }