Loading...
Searching...
No Matches
score::gfx::ScenePreprocessorNode Class Reference
Bridge from scene_spec (hierarchical, CPU) to geometry_spec (flat, GPU-resident).
More...
Inheritance diagram for score::gfx::ScenePreprocessorNode:
Detailed Description
Bridge from scene_spec (hierarchical, CPU) to geometry_spec (flat, GPU-resident).
Receives a scene_spec on its input port, walks the hierarchy, and emits a geometry_spec on its output port containing one geometry per scene mesh primitive. Each output geometry carries a set of well-known auxiliary buffers:
scene_lights: LightGPU[] (per scene light_component)scene_materials: MaterialGPU[] (per scene material)scene_materials_ext: MaterialExtGPU[] (extended material data)per_draws: PerDrawGPU[] (one per draw: model/normal mat, material/transform/skeleton slots)indirect_draw_cmds: IndirectCmd[] (MDI command buffer; one per draw)scene_counts: SceneCountsUBO (draw/light/material counts)camera: CameraUBO (current-frame camera matrices)camera_prev: CameraUBO (previous-frame camera matrices)env: EnvUBO (environment/fog parameters)world_transforms: mat4[] (current frame, slot-indexed)world_transforms_prev: mat4[] (previous frame, for TAA/motion)scene_light_indices: uint[] (light culling index list)
Conditionally emitted (when present in the scene):
scene_material_uv_xforms: mat3[] (per-material UV transforms)per_draw_bounds: AABB[] (per-draw world-space bounds)shadow_cascades: CascadeUBO[] (shadow cascade matrices)
Per-draw indexing in shaders uses the MDI firstInstance / gl_DrawID mechanism. Shaders read per_draws[gl_DrawID] to recover model/normal matrices and slot indices into the shared tables.
Inputs:
- Port 0: Scene (Types::Scene)
Outputs:
- Port 0: Geometry (Types::Geometry) — flattened scene
Public Member Functions | |
| score::gfx::NodeRenderer * | createRenderer (RenderList &r) const noexcept override |
| Create a renderer in a given context for this node. | |
Public Member Functions inherited from score::gfx::ProcessNode | |
| void | process (Message &&msg) override |
| Process a message from the execution engine. | |
| virtual void | process (Timings tk) |
| virtual void | process (int32_t port, const ossia::value &v) |
| virtual void | process (int32_t port, const ossia::audio_vector &v) |
| virtual void | process (int32_t port, const ossia::transform3d &v) |
| void | process (int32_t port, ossia::monostate) const noexcept |
| virtual void | process (int32_t port, const FunctionMessage &) |
| virtual void | process (int32_t port, const ossia::buffer_spec &) |
| Node () | |
| Node (const Node &)=delete | |
| Node (Node &&)=delete | |
| virtual void | process (Message &&msg) |
| Process a message from the execution engine. | |
| void | process (int32_t port, const ossia::render_target_spec &v) |
Public Member Functions inherited from score::gfx::Node | |
| Node (const Node &)=delete | |
| Node (Node &&)=delete | |
| Node & | operator= (const Node &)=delete |
| Node & | operator= (Node &&)=delete |
| virtual void | renderedNodesChanged () |
| Whenever render nodes are added / removed. | |
| virtual void | update () |
| void | materialChange () noexcept |
| Used to notify a material change from the model to the renderers. | |
| bool | hasMaterialChanged (int64_t &renderer) const noexcept |
| void | renderTargetChange () noexcept |
| Used to notify a render target (texture inlet) change from the model to the renderers. | |
| bool | hasRenderTargetChanged (int64_t &renderer) const noexcept |
| bool | hasExplicitRenderTargetSize (int32_t port) const noexcept |
| Whether a given port has a user-specified render target size. | |
| QSize | resolveRenderTargetSize (int32_t port, RenderList &renderer) const noexcept |
| RenderTargetSpecs | resolveRenderTargetSpecs (int32_t port, RenderList &renderer) const noexcept |
| void | process (int32_t port, const ossia::render_target_spec &v) |
Additional Inherited Members | |
Public Attributes inherited from score::gfx::ProcessNode | |
| ProcessUBO | standardUBO {} |
| Every node matching with a score process will have such an UBO. | |
Public Attributes inherited from score::gfx::Node | |
| std::vector< Port * > | input |
| Input ports of that node. | |
| ossia::small_pod_vector< Port *, 1 > | output |
| Output ports of that node. | |
| ossia::flat_map< RenderList *, score::gfx::NodeRenderer * > | renderedNodes |
| Map associating each RenderList to a Renderer for this model. | |
| ossia::flat_map< int32_t, ossia::render_target_spec > | renderTargetSpecs |
| Render target info. | |
| std::atomic_int64_t | materialChanged {0} |
| std::atomic_int64_t | renderTargetSpecChanged {-1} |
| int32_t | nodeId = score::gfx::invalid_node_index |
| bool | requiresDepth {} |
Member Function Documentation
◆ createRenderer()
|
overridevirtualnoexcept |
Create a renderer in a given context for this node.
Implements score::gfx::Node.
The documentation for this class was generated from the following files:
- ScenePreprocessorNode.hpp
- ScenePreprocessorNode.cpp
Public Member Functions inherited from