Skip to content

Commit

Permalink
feat(engine): implement active component for cameras and light
Browse files Browse the repository at this point in the history
  • Loading branch information
RodrigoVintem committed Nov 6, 2024
1 parent ecd19c9 commit 04d3499
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions engine/src/render/g_buffer_rasterizer/plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ void cubos::engine::gBufferRasterizerPlugin(Cubos& cubos)
.with<Camera>()
.related<DrawsTo>()
.call([](State& state, const Window& window, const RenderMeshPool& pool, const RenderPalette& palette,
Assets& assets, Query<const LocalToWorld&, Camera&, const DrawsTo&, const Active&> cameras,
Assets& assets, Query<const LocalToWorld&, Camera&, const Active&, const DrawsTo&> cameras,
Query<Entity, GBufferRasterizer&, GBuffer&, RenderDepth&, RenderPicker&> targets,
Query<Entity, const LocalToWorld&, const RenderMesh&, const RenderVoxelGrid&> meshes) {
auto& rd = window->renderDevice();
Expand Down Expand Up @@ -235,7 +235,7 @@ void cubos::engine::gBufferRasterizerPlugin(Cubos& cubos)
}

// Find the active cameras for this target.
for (auto [cameraLocalToWorld, camera, drawsTo, active] : cameras.pin(1, ent))
for (auto [cameraLocalToWorld, camera, active, drawsTo] : cameras.pin(1, ent))
{
// Skip inactive cameras.
if (!active.active)
Expand Down

0 comments on commit 04d3499

Please sign in to comment.