17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-17 06:19:19 +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

@@ -3730,7 +3730,9 @@ void opengl33_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;
@@ -4630,7 +4632,9 @@ void opengl33_renderer::Render_Alpha(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;