MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ set_weight()

void MayaFlux::Buffers::TextureArrayBuffer::set_weight ( uint32_t  layer,
float  weight 
)

Set the weight of one layer.

What a weight does is up to the shader. In the shipped shader a weight of zero or less hides the layer. Layers past WEIGHT_SLOTS have no weight.

Parameters
layerLayer index.
weightWeight passed to the shader.

Definition at line 259 of file TextureArrayBuffer.cpp.

260{
261 if (layer >= m_layers || layer >= m_push.weights.size()) {
262 return;
263 }
264
265 m_push.weights.at(layer) = weight;
266 flush_push();
267}
double weight
std::array< float, WEIGHT_SLOTS > weights

References flush_push(), m_layers, m_push, weight, and MayaFlux::Buffers::TextureArrayBuffer::Push::weights.

+ Here is the call graph for this function: