Awake Scene Rendering
Status: stable.
awake:scene:scene3d bridges awake:scene:scene-core (ECS Transform, entities) and
awake:engine:render:contract (backend-neutral Renderer/DrawCall/Mesh/Material) --
it owns the components a scene author attaches to make an entity visible, and the systems
that turn those components into a frame's DrawCall list every frame.
Installation
implementation(project(":awake:scene:scene3d"))
api-depends on both awake:scene:scene-core and awake:engine:render:contract, so a
consumer gets Transform/Mesh/Material/DrawCall visible transitively.
Components (components/)
MeshRenderer-- one mesh/material pair drawn at an entity'sTransform. The common case.InstancedMeshRenderer/InstancedSkinnedMeshRenderer-- many copies of one mesh/material drawn in a single GPU-instanced call; carries its own list of transforms (and joint palettes for the skinned variant) instead of relying on per-entityTransforms.ParticleEmitter-- a fixed-capacity pool of camera-facing billboard particles, spawned/aged byParticleSystemand drawn instanced byRenderSystem3D. See its own doc comment for the full knob list (burst spawning, cone spread, gradient color, ground-stop, sprite-strip frames) andspawnParticleBurstfor a one-shot "play this effect here" helper.Camera-- wrapsawake:core'sCoreCameramath;isPrimarymarks the oneRenderSystem3Dactually renders through.Light-- a single scene-wide directional light (RenderSystem3D.sceneLightfalls back toDEFAULT_SCENE_LIGHTwhen noLightentity exists).LodGroup-- picks one mesh/material level by distance to the camera each frame.MeshBounds-- opt-in local AABB; entities without it are never frustum/occlusion-culled.Occluder-- opt-in occluder box; seeawake:core'sOcclusion.ktfor the containment test.PbrMaterial/SkinnedPose-- per-entity material factors / joint palette, read byRenderSystem3Dinto aDrawCall'sextraUniformFloats.WorldDebugSettings-- singleton toggles (showFrustum/showBounds/showOcclusion) read byDebugVisualizationSystem.
Systems (systems/)
RenderSystem3D-- the one system that assembles a frame'sDrawCalllist: frustum/occlusion cullsMeshRenderer/LodGroupentities, builds instanced draw calls forInstancedMeshRenderer/InstancedSkinnedMeshRenderer/ParticleEmitter, resolves the scene light, and callsRenderer.draw.ParticleSystem-- spawns/advances everyParticleEmitter's particle pool (position/age/ fade, cone-spread velocity, ground-stop, burst cleanup). Kept separate fromRenderSystem3D(draw-call assembly) so simulation stays a single-responsibility step.DebugVisualizationSystem-- turnsWorldDebugSettings's toggles intoRendererdebug-line draws (frustum/bounds/occlusion wireframes).RenderSystemSupport.kt-- shared helpers (primaryCamera,CONSERVATIVE_ASPECT) used by both systems above.
Scope
This module has no rendering-backend code of its own -- it only builds DrawCalls and hands
them to whatever Renderer the app is running (awake:backend:vulkan/awake:backend:webgpu).
It also has no scene-authoring/DSL surface -- that's awake:scene:authoring; this module is
consumed by it, not the other way around.