17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-31 03:09:58 +01:00

Cull the instances of the shadow maps of headlights and lamps on the GPU

This commit is contained in:
2026-10-18 23:14:08 +02:00
parent 64dedb9d53
commit ffe77be754
8 changed files with 144 additions and 13 deletions

View File

@@ -1464,6 +1464,16 @@ global_settings::ConfigParse_gfx( cParser &Parser, std::string_view const Token
Parser.getTokens(1);
Parser >> gfx_gpucull_reflections;
}
else if (Token == "gfx.gpucull.shadows.headlights")
{
Parser.getTokens(1);
Parser >> gfx_gpucull_shadows_headlights;
}
else if (Token == "gfx.gpucull.shadows.lamps")
{
Parser.getTokens(1);
Parser >> gfx_gpucull_shadows_lamps;
}
else if (Token == "gfx.gpucull.sleepers")
{
Parser.getTokens(1);
@@ -1972,6 +1982,8 @@ global_settings::export_as_text( std::ostream &Output ) const {
export_as_text( Output, "gfx.gpucull.multidraw", gfx_gpucull_multidraw );
export_as_text( Output, "gfx.gpucull.shadows", gfx_gpucull_shadows );
export_as_text( Output, "gfx.gpucull.reflections", gfx_gpucull_reflections );
export_as_text( Output, "gfx.gpucull.shadows.headlights", gfx_gpucull_shadows_headlights );
export_as_text( Output, "gfx.gpucull.shadows.lamps", gfx_gpucull_shadows_lamps );
export_as_text( Output, "gfx.gpucull.sleepers", gfx_gpucull_sleepers );
export_as_text( Output, "gfx.depthprepass.scene", gfx_depthprepass_scene );
export_as_text( Output, "gfx.depthprepass.replay", gfx_depthprepass_replay );

View File

@@ -298,6 +298,10 @@ struct global_settings {
// culled in compute passes as well (drawn from their result, or compared), not only those of the main view
bool gfx_gpucull_shadows = true;
bool gfx_gpucull_reflections = true;
// with gfx_gpucull 1 or 2: the same for the maps of the headlights of vehicles and for the scenery parts of the maps of
// scenery lamps, each map with a culling of its own
bool gfx_gpucull_shadows_headlights = true;
bool gfx_gpucull_shadows_lamps = true;
// with gfx_gpucull 1 or 2: the sleepers of the tracks (sleepermodel) of the main view are culled with the instances as well,
// and with 1 drawn from the result
bool gfx_gpucull_sleepers = true;