13 s.writer->set_vertices(data, byte_count);
20 "Cannot add null influence target");
35 proc->add_binding(
"u_influence",
49 (*it)->unbind_buffer(
"u_influence");
59 proc->unbind_buffer(
"u_influence");
69 "Cannot upload influence UBO: no target or failed to map buffer");
76 .color = ctx.
color.value_or(glm::vec3(1.0F)),
78 .size = ctx.
size.value_or(1.0F),
#define MF_ERROR(comp, ctx,...)
#define MF_WARN(comp, ctx,...)
@ UNIFORM
Uniform buffer (host-visible)
std::vector< std::shared_ptr< Buffers::RenderProcessor > > m_influence_targets
void upload_influence_ubo(const InfluenceContext &ctx) const
void set_vertices(const void *data, size_t byte_count)
Set pre-packed interleaved vertex bytes to all registered render sinks.
void clear_influence_targets()
Unbind and remove all influence targets and free the UBO.
void remove_influence_target(const std::shared_ptr< Buffers::RenderProcessor > &proc)
Remove a single influence target and unbind its UBO.
std::vector< RenderSink > m_render_sinks
void add_influence_target(std::shared_ptr< Buffers::RenderProcessor > proc)
Add a render processor to receive GPU-side influence data.
std::shared_ptr< Buffers::VKBuffer > m_influence_ubo
@ Init
Engine/subsystem initialization.
@ Runtime
General runtime operations (default fallback)
@ Nexus
Spatial indexing and scheduling for user-defined behaviour.
@ UNKNOWN
Unknown or undefined modality.
Describes how a VKBuffer binds to a shader descriptor.
glm::vec3 position
Position of the influence point in world space.
std::optional< glm::vec3 > color
Optional color hint for the influence, may be used for visualisation or shader effects.
std::optional< float > size
Optional size hint for the influence, may be used for visualisation or shader effects.
float intensity
Intensity of the influence, typically in the range [0, 1], but may exceed 1 for strong influences.
float radius
Radius of influence around the position, defining the area of effect for spatially-dependent influenc...
Data passed to an Emitter or Agent influence function on each commit.
GPU-side std140 layout matching InfluenceContext plain data fields.