|
Estella 0.113.0
A fast 2D and 3D game engine powered by WebAssembly and ECS
|
Motion-trail renderer (TrailRenderer component). More...
#include <TrailPlugin.hpp>

Public Member Functions | |
| void | setTrailSystem (trail::TrailSystem *system) |
| void | collect (RenderCollectContext &ctx) override |
| const char * | collectScope () const override |
| What this plugin's collect is called in a frame profile. | |
| Public Member Functions inherited from esengine::RenderTypePlugin | |
| virtual | ~RenderTypePlugin ()=default |
| virtual void | init (RenderFrameContext &ctx) |
| virtual void | shutdown () |
| virtual bool | castsShadows () const |
| Whether what this plugin draws belongs in a shadow map. | |
| virtual bool | castInputs (RenderFrameContext &, ecs::Registry &, u64 &) |
| For a plugin that casts: one number for everything its depth collect reads apart from the shadow views and the frame's camera, so a frame whose number, views and camera match those of the frame that drew the shadow map need not collect it again. | |
| virtual bool | castHeldInputs (u64 &) const |
| virtual u32 | castMoverCount () const |
| virtual bool | drawsMotion () const |
| virtual bool | drawsScreenUI () const |
| Whether this plugin can draw an entity that lives in a UI tree. | |
| virtual void | scheduleSkins (RenderFrameContext &ctx, ecs::Registry ®istry, SkinCache &cache) |
Make ready the programs entities will be asked for, drawing none. | |
| virtual RenderPrewarmResult | prewarm (RenderFrameContext &ctx, ecs::Registry ®istry, const Entity *entities, u32 count, bool shadowPasses) |
| virtual RenderPrewarmResult | prewarmDocument (RenderFrameContext &ctx, const MeshDocumentRecord *rows, u32 count, bool shadowPasses) |
| The same readiness, asked of a PREPARED cell's own description. | |
| virtual bool | clusterInspect (u32, u32 &, u32 &) const |
| What the last frames drew of the Cluster LOD mesh of the entity entityId. | |
Motion-trail renderer (TrailRenderer component).
Reads the per-entity point history from TrailSystem and turns it into a tapered, fading triangle-strip ribbon streamed through the unified Batch face each frame — CPU-generated verts, exactly like MeshRenderer, so trails sort, clip, and multi-texture-merge like sprites. The RHI is triangle-only, so a ribbon (not a GPU line-strip) is the whole trick: no bottom-layer changes.
Definition at line 28 of file TrailPlugin.hpp.
|
overridevirtual |
Implements esengine::RenderTypePlugin.
Definition at line 19 of file TrailPlugin.cpp.
References esengine::TrailCenter::age01, esengine::appendIndexedBatch(), esengine::BatchDrawKey::blend, esengine::RenderCollectContext::buffer_pool, esengine::RenderCollectContext::camera, esengine::RenderCollectContext::clip_state, esengine::ctx(), esengine::BatchDrawKey::cull, esengine::RenderCollectContext::culled, esengine::BatchDrawKey::depthBias, esengine::BatchDrawKey::depthTest, esengine::BatchDrawKey::depthWrite, esengine::RenderCollectContext::draw_list, esengine::ecs::Transform::ensureDecomposed(), esengine::RenderCollectContext::frame_context, esengine::RenderCollectContext::frustum, esengine::BatchDrawKey::materialId, esengine::packColor(), esengine::trail::TrailState::points, esengine::TrailCenter::pos, esengine::rebased(), esengine::RenderCollectContext::registry, esengine::ribbonSide(), esengine::BatchDrawKey::shaderId, esengine::Trail, and esengine::CameraView::viewDepth().
|
inlineoverridevirtual |
What this plugin's collect is called in a frame profile.
A literal: the profiler keys scopes by content and keeps the pointer. A type that does not answer is reported as other rather than folded into a neighbour, whose cost it would become.
Reimplemented from esengine::RenderTypePlugin.
Definition at line 33 of file TrailPlugin.hpp.
|
inline |
Definition at line 30 of file TrailPlugin.hpp.