Global UBO (#2292)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
@@ -29,15 +29,15 @@ void HeatmapTextureLayerTweaker::execute(LayerGroupBase& layerGroup, const Paint
|
||||
|
||||
propertiesUpdated = false;
|
||||
|
||||
mat4 matrix;
|
||||
const auto& size = parameters.staticData.backendSize;
|
||||
mat4 viewportMat;
|
||||
matrix::ortho(viewportMat, 0, size.width, size.height, 0, -1, 1);
|
||||
const HeatmapTexturePropsUBO propsUBO = {
|
||||
/* .matrix = */ util::cast<float>(viewportMat),
|
||||
/* .world = */ {static_cast<float>(size.width), static_cast<float>(size.height)},
|
||||
/* .opacity = */ evaluated.get<HeatmapOpacity>(),
|
||||
/* .pad1 = */ 0,
|
||||
};
|
||||
matrix::ortho(matrix, 0, size.width, size.height, 0, -1, 1);
|
||||
|
||||
const HeatmapTexturePropsUBO propsUBO = {/* .matrix = */ util::cast<float>(matrix),
|
||||
/* .opacity = */ evaluated.get<HeatmapOpacity>(),
|
||||
/* .pad1,2,3 = */ 0,
|
||||
0,
|
||||
0};
|
||||
auto& layerUniforms = layerGroup.mutableUniformBuffers();
|
||||
layerUniforms.createOrUpdate(idHeatmapTexturePropsUBO, &propsUBO, parameters.context);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user