Skip to content

enable detachedRenderables for effect children so off screen EveChildTurrets still render the firing effect - #158

Open
Ikreb1 wants to merge 4 commits into
mainfrom
EF-21552-firing-effect-cull-fix
Open

Ikreb1 wants to merge 4 commits into
mainfrom
EF-21552-firing-effect-cull-fix

Conversation

@Ikreb1

@Ikreb1 Ikreb1 commented Nov 19, 2026

Copy link
Copy Markdown
Member

Summary

enable detachedRenderables for effect children so off screen EveChildTurrets still render the firing effect

Linked issue (optional)

(https://fenriscreations.atlassian.net/browse/EF-21552)

Testing

tested in client

AI assistance

AI diagnosed the issue

Copilot AI balanced review requested due to automatic review settings November 19, 2026 10:15
@Ikreb1
Ikreb1 force-pushed the EF-21552-firing-effect-cull-fix branch from 72a0d54 to 32f2fcc Compare November 19, 2026 10:16
github-actions[bot]

This comment was marked as outdated.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Detached firing effects can be rendered twice when captured in impostor sprites, while nested turret effects still disappear because three child wrappers do not forward detached renderables.

2 open issues
What changed in this PR

This PR adds a detached-renderable path to Trinity’s space-object rendering so turret firing effects can remain visible when their owner is off-screen or rendered as an impostor.

Changes:

  • Add a default no-op GetDetachedRenderables() hook for space-object children.
  • Override the hook for turrets to submit firing effects independently.
  • Collect detached effect renderables when normal child rendering is skipped.
File Description
trinity/​Eve/​SpaceObject/​EveSpaceObject2.cpp Collects detached effects for culled or impostored owners.
trinity/​Eve/​SpaceObject/​Children/​EveSpaceObjectChild.h Declares and documents the detached-renderable hook.
trinity/​Eve/​SpaceObject/​Children/​EveSpaceObjectChild.cpp Provides the default no-op implementation.
trinity/​Eve/​SpaceObject/​Children/​EveChildTurret.h Declares the turret override.
trinity/​Eve/​SpaceObject/​Children/​EveChildTurret.cpp Submits turret firing effects through the new hook.

Review effort: Balanced

@github-actions
github-actions Bot dismissed their stale review November 19, 2026 13:01

outdated review

github-actions[bot]

This comment was marked as outdated.

@github-actions
github-actions Bot dismissed their stale review November 19, 2026 15:41

outdated review

github-actions[bot]

This comment was marked as outdated.

Ikreb1 and others added 3 commits November 19, 2026 15:41
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@Ikreb1
Ikreb1 force-pushed the EF-21552-firing-effect-cull-fix branch from 6de2718 to 4038975 Compare November 19, 2026 15:41
@github-actions
github-actions Bot dismissed their stale review November 19, 2026 15:47

outdated review

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cpp-linter Review

Used clang-format v21.1.8

Click here for the full clang-format patch
diff --git a/trinity/Eve/SpaceObject/Children/EveChildContainer.h b/trinity/Eve/SpaceObject/Children/EveChildContainer.h
--- a/trinity/Eve/SpaceObject/Children/EveChildContainer.h
+++ b/trinity/Eve/SpaceObject/Children/EveChildContainer.h
@@ -66 +66 @@ public:
-	virtual bool OnModified( Be::Var * val );
+	virtual bool OnModified( Be::Var* val );
@@ -72 +72 @@ public:
-	void AddTransformModifier( IEveChildTransformModifier * modifier ) override;
+	void AddTransformModifier( IEveChildTransformModifier* modifier ) override;
@@ -74 +74 @@ public:
-	void SetOwner( IEveSpaceObject2 * owner ) override;
+	void SetOwner( IEveSpaceObject2* owner ) override;
@@ -80,2 +80,2 @@ public:
-	void AddToEffectChildrenList( EveSpaceObjectChild * child );
-	void RemoveFromEffectChildrenList( EveSpaceObjectChild * child );
+	void AddToEffectChildrenList( EveSpaceObjectChild* child );
+	void RemoveFromEffectChildrenList( EveSpaceObjectChild* child );
@@ -89 +89 @@ public:
-	void AddController( ITr2Controller * controller );
+	void AddController( ITr2Controller* controller );
@@ -103 +103 @@ public:
-	void AddAttachment( IEveSpaceObjectAttachment * attachment );
+	void AddAttachment( IEveSpaceObjectAttachment* attachment );
@@ -108 +108 @@ public:
-	void GetBatches( ITriRenderBatchAccumulator * batches, TriBatchType batchType, const Tr2PerObjectData* perObjectData, Tr2RenderReason reason = TR2RENDERREASON_NORMAL );
+	void GetBatches( ITriRenderBatchAccumulator* batches, TriBatchType batchType, const Tr2PerObjectData* perObjectData, Tr2RenderReason reason = TR2RENDERREASON_NORMAL );
@@ -111 +111 @@ public:
-	Tr2PerObjectData* GetPerObjectData( ITriRenderBatchAccumulator * accumulator );
+	Tr2PerObjectData* GetPerObjectData( ITriRenderBatchAccumulator* accumulator );
@@ -127 +127 @@ public:
-	void GetLocalToWorldTransform( Matrix & transform ) const;
+	void GetLocalToWorldTransform( Matrix& transform ) const;
@@ -132 +132 @@ public:
-	void GetLights( Tr2LightManager & lightManager ) const override;
+	void GetLights( Tr2LightManager& lightManager ) const override;
@@ -150,2 +150,2 @@ public:
-	void GetDebugOptions( Tr2DebugRendererOptions & options );
-	void RenderDebugInfo( ITr2DebugRenderer2 & renderer );
+	void GetDebugOptions( Tr2DebugRendererOptions& options );
+	void RenderDebugInfo( ITr2DebugRenderer2& renderer );
@@ -153 +153 @@ public:
-	void GetWorldVelocity( Vector3 & velocity ) const;
+	void GetWorldVelocity( Vector3& velocity ) const;
@@ -158 +158 @@ public:
-	void SetAnimationOwner( ITr2GrannyAnimationOwner * animationOwner );
+	void SetAnimationOwner( ITr2GrannyAnimationOwner* animationOwner );
diff --git a/trinity/Eve/SpaceObject/Children/EveChildEffectPropagator.h b/trinity/Eve/SpaceObject/Children/EveChildEffectPropagator.h
--- a/trinity/Eve/SpaceObject/Children/EveChildEffectPropagator.h
+++ b/trinity/Eve/SpaceObject/Children/EveChildEffectPropagator.h
@@ -32 +32 @@ public:
-	bool OnModified( Be::Var * value ) override;
+	bool OnModified( Be::Var* value ) override;
@@ -44,2 +44,2 @@ public:
-	void GetDebugOptions( Tr2DebugRendererOptions & options ) override;
-	void RenderDebugInfo( ITr2DebugRenderer2 & renderer ) override;
+	void GetDebugOptions( Tr2DebugRendererOptions& options ) override;
+	void RenderDebugInfo( ITr2DebugRenderer2& renderer ) override;
@@ -84 +84 @@ private:
-	void ProcessLocators( IEveSpaceObject2 * parent );
+	void ProcessLocators( IEveSpaceObject2* parent );
@@ -88 +88 @@ private:
-	void ProcessRefLocators( IEveSpaceObject2 * parent );
+	void ProcessRefLocators( IEveSpaceObject2* parent );
@@ -98 +98 @@ private:
-	void SetEffect( EveChildInstanceContainer * effect );
+	void SetEffect( EveChildInstanceContainer* effect );
diff --git a/trinity/Eve/SpaceObject/Children/EveChildInstanceContainer.h b/trinity/Eve/SpaceObject/Children/EveChildInstanceContainer.h
--- a/trinity/Eve/SpaceObject/Children/EveChildInstanceContainer.h
+++ b/trinity/Eve/SpaceObject/Children/EveChildInstanceContainer.h
@@ -67 +67 @@ public:
-	void GetLocalToWorldTransform( Matrix & transform ) const;
+	void GetLocalToWorldTransform( Matrix& transform ) const;
@@ -73 +73 @@ public:
-	void GetWorldVelocity( Vector3 & velocity ) const;
+	void GetWorldVelocity( Vector3& velocity ) const;
@@ -75,2 +75,2 @@ public:
-	void AddTransformModifier( IEveChildTransformModifier * modifier ) override;
-	void SetOwner( IEveSpaceObject2 * owner ) override;
+	void AddTransformModifier( IEveChildTransformModifier* modifier ) override;
+	void SetOwner( IEveSpaceObject2* owner ) override;
@@ -82,2 +82,2 @@ public:
-	void AddToEffectChildrenList( EveSpaceObjectChild * child );
-	void RemoveFromEffectChildrenList( EveSpaceObjectChild * child );
+	void AddToEffectChildrenList( EveSpaceObjectChild* child );
+	void RemoveFromEffectChildrenList( EveSpaceObjectChild* child );
@@ -105,2 +105,2 @@ public:
-	void GetDebugOptions( Tr2DebugRendererOptions & options );
-	void RenderDebugInfo( ITr2DebugRenderer2 & renderer );
+	void GetDebugOptions( Tr2DebugRendererOptions& options );
+	void RenderDebugInfo( ITr2DebugRenderer2& renderer );
@@ -110 +110 @@ public:
-	bool OnModified( Be::Var * value ) override;
+	bool OnModified( Be::Var* value ) override;
@@ -135 +135 @@ public:
-	void SetSource( EveSpaceObjectChild * source );
+	void SetSource( EveSpaceObjectChild* source );
@@ -138 +138 @@ protected:
-	void CreateInstances( IEveSpaceObject2 * parent );
+	void CreateInstances( IEveSpaceObject2* parent );
diff --git a/trinity/Eve/SpaceObject/Children/EveChildPlug.h b/trinity/Eve/SpaceObject/Children/EveChildPlug.h
--- a/trinity/Eve/SpaceObject/Children/EveChildPlug.h
+++ b/trinity/Eve/SpaceObject/Children/EveChildPlug.h
@@ -50 +50 @@ public:
-	bool OnModified( Be::Var * value ) override;
+	bool OnModified( Be::Var* value ) override;
@@ -55,2 +55,2 @@ public:
-	void AddToEffectChildrenList( EveSpaceObjectChild * child );
-	void RemoveFromEffectChildrenList( EveSpaceObjectChild * child );
+	void AddToEffectChildrenList( EveSpaceObjectChild* child );
+	void RemoveFromEffectChildrenList( EveSpaceObjectChild* child );
@@ -73 +73 @@ public:
-	void GetLocalToWorldTransform( Matrix & transform ) const;
+	void GetLocalToWorldTransform( Matrix& transform ) const;
@@ -79 +79 @@ public:
-	void SetOwner( IEveSpaceObject2 * owner ) override;
+	void SetOwner( IEveSpaceObject2* owner ) override;
@@ -97,2 +97,2 @@ public:
-	void GetDebugOptions( Tr2DebugRendererOptions & options );
-	void RenderDebugInfo( ITr2DebugRenderer2 & renderer );
+	void GetDebugOptions( Tr2DebugRendererOptions& options );
+	void RenderDebugInfo( ITr2DebugRenderer2& renderer );
@@ -101 +101 @@ public:
-	void AddExternalParameter( Tr2ExternalParameter * externalParameter );
+	void AddExternalParameter( Tr2ExternalParameter* externalParameter );
diff --git a/trinity/Eve/SpaceObject/Children/EveChildRef.h b/trinity/Eve/SpaceObject/Children/EveChildRef.h
--- a/trinity/Eve/SpaceObject/Children/EveChildRef.h
+++ b/trinity/Eve/SpaceObject/Children/EveChildRef.h
@@ -48 +48 @@ public:
-	virtual bool OnModified( Be::Var * value );
+	virtual bool OnModified( Be::Var* value );
@@ -58,2 +58,2 @@ public:
-	void AddToEffectChildrenList( EveSpaceObjectChild * child );
-	void RemoveFromEffectChildrenList( EveSpaceObjectChild * child );
+	void AddToEffectChildrenList( EveSpaceObjectChild* child );
+	void RemoveFromEffectChildrenList( EveSpaceObjectChild* child );
@@ -73 +73 @@ public:
-	void GetLocalToWorldTransform( Matrix & transform ) const;
+	void GetLocalToWorldTransform( Matrix& transform ) const;
@@ -79 +79 @@ public:
-	void SetOwner( IEveSpaceObject2 * owner ) override;
+	void SetOwner( IEveSpaceObject2* owner ) override;
@@ -97,2 +97,2 @@ public:
-	void GetDebugOptions( Tr2DebugRendererOptions & options );
-	void RenderDebugInfo( ITr2DebugRenderer2 & renderer );
+	void GetDebugOptions( Tr2DebugRendererOptions& options );
+	void RenderDebugInfo( ITr2DebugRenderer2& renderer );
diff --git a/trinity/Eve/SpaceObject/Children/EveChildSocket.h b/trinity/Eve/SpaceObject/Children/EveChildSocket.h
--- a/trinity/Eve/SpaceObject/Children/EveChildSocket.h
+++ b/trinity/Eve/SpaceObject/Children/EveChildSocket.h
@@ -43 +43 @@ public:
-	bool AddParameterForExternal( Tr2ExternalParameter & externalParam );
+	bool AddParameterForExternal( Tr2ExternalParameter& externalParam );
@@ -53 +53 @@ public:
-	virtual bool OnModified( Be::Var * value );
+	virtual bool OnModified( Be::Var* value );
@@ -58,2 +58,2 @@ public:
-	void AddToEffectChildrenList( EveSpaceObjectChild * child );
-	void RemoveFromEffectChildrenList( EveSpaceObjectChild * child );
+	void AddToEffectChildrenList( EveSpaceObjectChild* child );
+	void RemoveFromEffectChildrenList( EveSpaceObjectChild* child );
@@ -76 +76 @@ public:
-	void GetLocalToWorldTransform( Matrix & transform ) const;
+	void GetLocalToWorldTransform( Matrix& transform ) const;
@@ -82 +82 @@ public:
-	void SetOwner( IEveSpaceObject2 * owner ) override;
+	void SetOwner( IEveSpaceObject2* owner ) override;
@@ -102,2 +102,2 @@ public:
-	void GetDebugOptions( Tr2DebugRendererOptions & options );
-	void RenderDebugInfo( ITr2DebugRenderer2 & renderer );
+	void GetDebugOptions( Tr2DebugRendererOptions& options );
+	void RenderDebugInfo( ITr2DebugRenderer2& renderer );
diff --git a/trinity/Eve/SpaceObject/Children/EveChildTurret.h b/trinity/Eve/SpaceObject/Children/EveChildTurret.h
--- a/trinity/Eve/SpaceObject/Children/EveChildTurret.h
+++ b/trinity/Eve/SpaceObject/Children/EveChildTurret.h
@@ -26 +26 @@ public:
-	bool OnModified( Be::Var * value ) override;
+	bool OnModified( Be::Var* value ) override;
@@ -30,2 +30,2 @@ public:
-	void GetDebugOptions( Tr2DebugRendererOptions & options ) override;
-	void RenderDebugInfo( ITr2DebugRenderer2 & renderer ) override;
+	void GetDebugOptions( Tr2DebugRendererOptions& options ) override;
+	void RenderDebugInfo( ITr2DebugRenderer2& renderer ) override;
@@ -91 +91 @@ protected:
-	void SetFiringEffect( EveTurretFiringFX * firingEffect );
+	void SetFiringEffect( EveTurretFiringFX* firingEffect );
@@ -94 +94 @@ protected:
-	void SetTargetObject( IRoot * target );
+	void SetTargetObject( IRoot* target );
diff --git a/trinity/Eve/SpaceObject/Children/ProceduralContainer/EveChildProceduralContainer.h b/trinity/Eve/SpaceObject/Children/ProceduralContainer/EveChildProceduralContainer.h
--- a/trinity/Eve/SpaceObject/Children/ProceduralContainer/EveChildProceduralContainer.h
+++ b/trinity/Eve/SpaceObject/Children/ProceduralContainer/EveChildProceduralContainer.h
@@ -43 +43 @@ public:
-	bool OnModified( Be::Var * value ) override;
+	bool OnModified( Be::Var* value ) override;
@@ -51 +51 @@ public:
-	void AddTransformModifier( IEveChildTransformModifier * modifier ) override;
+	void AddTransformModifier( IEveChildTransformModifier* modifier ) override;
@@ -86 +86 @@ public:
-	void SetOwner( IEveSpaceObject2 * owner ) override;
+	void SetOwner( IEveSpaceObject2* owner ) override;
@@ -100,2 +100,2 @@ public:
-	void GetDebugOptions( Tr2DebugRendererOptions & options ) override;
-	void RenderDebugInfo( ITr2DebugRenderer2 & renderer ) override;
+	void GetDebugOptions( Tr2DebugRendererOptions& options ) override;
+	void RenderDebugInfo( ITr2DebugRenderer2& renderer ) override;

✨ Powered by cpp-linter -- ⭐ Star • ❤️ Sponsor • 💬 Feedback

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

EveStretch3’s renderable and quad collectors omit the detached methods, causing visible turrets used directly or through wrappers to lose firing effects.

1 open issue
2 resolved since last review

Review effort: Balanced

Comment on lines +37 to +39
void GetDetachedRenderables( std::vector<ITr2Renderable*>& renderables ) override;
void RegisterWithQuadRenderer( Tr2QuadRenderer& quadRenderer ) override;
void AddDetachedQuadsToQuadRenderer( const TriFrustum& frustum, Tr2QuadRenderer& quadRenderer ) const override;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants