1
0
Fork 0

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

This commit is contained in:
Vivian Meazza 2011-12-17 17:14:46 +00:00
commit 657bd30ae0
3 changed files with 9 additions and 8 deletions

View file

@ -29,7 +29,7 @@
<use>/environment/terminator-relative-position-m</use> <use>/environment/terminator-relative-position-m</use>
</terminator> </terminator>
<fogtype> <fogtype>
<use>/sim/rendering/shaders/skydome</use> <use>/sim/rendering/scattering-shader</use>
</fogtype> </fogtype>
<!-- END fog include --> <!-- END fog include -->
@ -60,8 +60,9 @@
</and> </and>
</or> </or>
<or> <or>
<extension-supported>GL_ATI_shader_texture_lod</extension-supported> <extension-supported>GL_ATI_shader_texture_lod</extension-supported> <!-- not available in NVidia driver -->
<extension-supported>GL_ARB_shader_texture_lod</extension-supported> <extension-supported>GL_ARB_shader_texture_lod</extension-supported> <!-- not available in NVidia driver -->
<extension-supported>GL_EXT_gpu_shader4</extension-supported>
</or> </or>
</and> </and>
</predicate> </predicate>
@ -288,7 +289,7 @@
<and> <and>
<property>/sim/rendering/shaders/urban</property> <property>/sim/rendering/shaders/urban</property>
<less-equal> <less-equal>
<value type="float">2.0</value> <value type="float">1.0</value>
<float-property>/sim/rendering/shaders/urban</float-property> <float-property>/sim/rendering/shaders/urban</float-property>
</less-equal> </less-equal>
<or> <or>

Binary file not shown.

View file

@ -28,8 +28,8 @@ uniform sampler2D NormalTex;
uniform sampler2D QDMTex; uniform sampler2D QDMTex;
uniform float depth_factor; uniform float depth_factor;
uniform float tile_size; uniform float tile_size;
uniform float quality_level; // From /sim/rendering/quality-level uniform float quality_level;
uniform float snowlevel; // From /sim/rendering/snow-level-m uniform float snowlevel;
uniform vec3 night_color; uniform vec3 night_color;
const float scale = 1.0; const float scale = 1.0;
@ -172,7 +172,7 @@ float ray_intersect(vec2 dp, vec2 ds)
void main (void) void main (void)
{ {
if ( quality_level >= 3.5 ) { if ( quality_level >= 3.0 ) {
linear_search_steps = 20; linear_search_steps = 20;
} }
vec3 ecPos3 = ecPosition.xyz / ecPosition.w; vec3 ecPos3 = ecPosition.xyz / ecPosition.w;
@ -196,7 +196,7 @@ void main (void)
float shadow_factor = 1.0; float shadow_factor = 1.0;
// Shadow // Shadow
if ( quality_level >= 3.0 ) { if ( quality_level >= 2.0 ) {
dp += ds * d; dp += ds * d;
vec3 sl = normalize( vec3( dot( l, VTangent ), dot( l, VBinormal ), dot( -l, VNormal ) ) ); vec3 sl = normalize( vec3( dot( l, VTangent ), dot( l, VBinormal ), dot( -l, VNormal ) ) );
ds = sl.xy * depth_factor / sl.z; ds = sl.xy * depth_factor / sl.z;