17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-19 18:16:16 +02:00

seasonal model variants for vehicle exterior model

This commit is contained in:
2026-09-28 20:49:18 +02:00
parent 8fbb482350
commit 551f6dbc3b
4 changed files with 35 additions and 3 deletions

View File

@@ -2863,7 +2863,9 @@ opengl_renderer::Render( TSubModel *Submodel ) {
}
case rendermode::shadows: {
// skip if the shadow caster rank is too low for currently set threshold
if( Material( Submodel ).shadow_rank > Global.gfx_shadow_rank_cutoff )
// or if the submodel is hidden (colour pass only fades it out, e.g. inactive seasonal variant)
if( ( Material( Submodel ).shadow_rank > Global.gfx_shadow_rank_cutoff )
|| ( Submodel->fVisible <= 0.f ) )
{
--m_renderpass.draw_stats.submodels;
--m_renderpass.draw_stats.drawcalls;