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

Merge pull request #188 from MaSzyna-EU07/feat/dynobj-seasonal-models

seasonal model variants for vehicle exterior model
This commit is contained in:
2026-09-28 21:21:49 +02:00
committed by GitHub
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;

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;