Files
MapLibreParticleLab/include/mbgl/shaders/hillshade_layer_ubo.hpp
Alex Cristici d22362ab22 Global UBO (#2292)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-04-24 17:14:18 +03:00

30 lines
621 B
C++

#pragma once
#include <mbgl/shaders/layer_ubo.hpp>
namespace mbgl {
namespace shaders {
struct alignas(16) HillshadeDrawableUBO {
std::array<float, 4 * 4> matrix;
std::array<float, 2> latrange;
std::array<float, 2> light;
};
static_assert(sizeof(HillshadeDrawableUBO) == 16 * 5);
struct alignas(16) HillshadeEvaluatedPropsUBO {
Color highlight;
Color shadow;
Color accent;
};
static_assert(sizeof(HillshadeEvaluatedPropsUBO) % 16 == 0);
enum {
idHillshadeDrawableUBO = globalUBOCount,
idHillshadeEvaluatedPropsUBO,
hillshadeUBOCount
};
} // namespace shaders
} // namespace mbgl