18
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-21 10:55:01 +01:00

Cull and draw the sleepers of tracks on the GPU with the instances

This commit is contained in:
2026-10-18 03:18:26 +02:00
parent f4b516eeb8
commit bc4df5567f
10 changed files with 293 additions and 48 deletions

View File

@@ -1464,6 +1464,11 @@ global_settings::ConfigParse_gfx( cParser &Parser, std::string_view const Token
Parser.getTokens(1);
Parser >> gfx_gpucull_reflections;
}
else if (Token == "gfx.gpucull.sleepers")
{
Parser.getTokens(1);
Parser >> gfx_gpucull_sleepers;
}
else if (Token == "gfx.depthprepass.scene")
{
Parser.getTokens(1);
@@ -1962,6 +1967,7 @@ 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.sleepers", gfx_gpucull_sleepers );
export_as_text( Output, "gfx.depthprepass.scene", gfx_depthprepass_scene );
export_as_text( Output, "gfx.bufferstreaming", gfx_bufferstreaming );
export_as_text( Output, "gfx.postfx.motionblur.enabled", gfx_postfx_motionblur_enabled );

View File

@@ -298,6 +298,9 @@ 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 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;
// (opengl 4.6) the depth of the whole opaque scene of the main view is drawn before its colour, the instances included
bool gfx_depthprepass_scene = false;
// (opengl 4.6) the model block of every draw and the matrices of instances are written to persistently mapped buffers,