mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-02 13:59:12 +01:00
Cast shadows of vehicle headlights from the scene in their beam in the GL 4.6 renderer
This commit is contained in:
@@ -1639,6 +1639,11 @@ global_settings::ConfigParse_gfx_sky( cParser &Parser, std::string_view const To
|
||||
gfx_lights_shadows_lamps_size = std::clamp( gfx_lights_shadows_lamps_size, 128, 2048 ); }
|
||||
else if( Token == "gfx.lights.shadows.lamps.range" ) { readvalue( gfx_lights_shadows_lamps_range, 0.f, 1000.f ); }
|
||||
else if( Token == "gfx.lights.shadows.vehicles.range" ) { readvalue( gfx_lights_shadows_vehicles_range, 0.f, 1000.f ); }
|
||||
else if( Token == "gfx.lights.shadows.headlights" ) {
|
||||
Parser.getTokens( 1 );
|
||||
Parser >> gfx_lights_shadows_headlights;
|
||||
gfx_lights_shadows_headlights = std::clamp( gfx_lights_shadows_headlights, 0, 4 ); }
|
||||
else if( Token == "gfx.lights.shadows.headlights.range" ) { readvalue( gfx_lights_shadows_headlights_range, 10.f, 1000.f ); }
|
||||
else { return false; }
|
||||
|
||||
return true;
|
||||
@@ -1921,6 +1926,8 @@ global_settings::export_as_text( std::ostream &Output ) const {
|
||||
export_as_text( Output, "gfx.lights.shadows.lamps.size", gfx_lights_shadows_lamps_size );
|
||||
export_as_text( Output, "gfx.lights.shadows.lamps.range", gfx_lights_shadows_lamps_range );
|
||||
export_as_text( Output, "gfx.lights.shadows.vehicles.range", gfx_lights_shadows_vehicles_range );
|
||||
export_as_text( Output, "gfx.lights.shadows.headlights", gfx_lights_shadows_headlights );
|
||||
export_as_text( Output, "gfx.lights.shadows.headlights.range", gfx_lights_shadows_headlights_range );
|
||||
export_as_text( Output, "python.enabled", python_enabled );
|
||||
export_as_text( Output, "python.threadedupload", python_threadedupload );
|
||||
export_as_text( Output, "python.uploadmain", python_uploadmain );
|
||||
|
||||
@@ -357,6 +357,11 @@ struct global_settings {
|
||||
int gfx_lights_shadows_lamps_size { 512 };
|
||||
float gfx_lights_shadows_lamps_range { 100.f };
|
||||
float gfx_lights_shadows_vehicles_range { 50.f };
|
||||
// shadows of the headlights of vehicles (a map drawn with the projector of the beam), with gfx_lights_shadows above 0: for how
|
||||
// many sets of headlights at once (the most important ones, 0-4), and the distance ahead of the vehicle within which things
|
||||
// cast them, metres
|
||||
int gfx_lights_shadows_headlights { 2 };
|
||||
float gfx_lights_shadows_headlights_range { 250.f };
|
||||
|
||||
float ui_fontsize = 13.0f;
|
||||
float ui_scale = 1.0f;
|
||||
|
||||
Reference in New Issue
Block a user