fix quality profile water/shadows
[carveJwlIkooP6JGAAIwe30JlM.git] / world_render.c
index 9eac40e3eda13e2c8bcc3acb94f48cb007aa8039..e675abf96501afcebf59316c57e3f0150bf0deda 100644 (file)
@@ -858,6 +858,13 @@ static void world_prerender( world_instance *world ){
    state->g_debug_complexity = k_debug_light_complexity;
    state->g_time_of_day = vg_fractf( world->time );
 
+   if( vg.quality_profile == k_quality_profile_high )
+      state->g_shadow_samples = 8;
+   else if( vg.quality_profile == k_quality_profile_low )
+      state->g_shadow_samples = 2;
+   else
+      state->g_shadow_samples = 0;
+
    state->g_day_phase   = cosf( state->g_time_of_day * VG_PIf * 2.0f );
    state->g_sunset_phase= cosf( state->g_time_of_day * VG_PIf * 4.0f + VG_PIf );