X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=render.h;h=317b30110bc2d6df942816a258f60940871eec82;hb=297468e5a3cc8c7805c16fdd615f42f3876eb908;hp=209bed692d5bc5777fbb3db122b4410ab2a96b56;hpb=47941822dae18a018c985847b052e70214a3ccc6;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/render.h b/render.h index 209bed6..317b301 100644 --- a/render.h +++ b/render.h @@ -49,6 +49,7 @@ VG_STATIC struct pipeline float g_water_fog; int g_light_count; int g_light_preview; + int g_shadow_samples; } ub_world_lighting; @@ -169,6 +170,11 @@ VG_STATIC void render_update_lighting_ub(void) winf->g_light_directions[0][3] = gpipeline.shadow_length; winf->g_light_colours[0][3] = gpipeline.shadow_spread; + if( vg.quality_profile == k_quality_profile_low ) + winf->g_shadow_samples = 0; + else + winf->g_shadow_samples = 8; + glBindBuffer( GL_UNIFORM_BUFFER, gpipeline.ubo_world_lighting ); glBufferSubData( GL_UNIFORM_BUFFER, 0, sizeof(struct ub_world_lighting), &gpipeline.ub_world_lighting );