Loading...
Searching...
No Matches
CommonUBOs.hpp
1#pragma once
2
3#include <cstdint>
4
5namespace score::gfx
6{
7#pragma pack(push, 1)
12{
13 float time{};
14 float timeDelta{};
15 float progress{};
16 float sampleRate{};
17
18 int32_t passIndex{};
19 int32_t frameIndex{};
20
21 float renderSize[2]{2048, 2048};
22 float date[4]{0.f, 0.f, 0.f, 0.f};
23};
24
29{
30 // clang-format off
31 float mvp[16]{};
32 float mv[16]{};
33 float model[16]{
34 1., 0., 0., 0.,
35 0., 1., 0., 0.,
36 0., 0., 1., 0.,
37 0., 0., 0., 1.,
38 };
39 float view[16]{};
40 float projection[16]{};
41 float modelNormal[9]{};
42 float padding[3]; // Needed as a mat3 needs a bit more space...
43 float fov = 90.;
44 // clang-format on
45};
46
47static_assert(
48 sizeof(ModelCameraUBO) == sizeof(float) * (16 + 16 + 16 + 16 + 16 + 9 + 3 + 1));
49
54{
55 float clipSpaceCorrMatrix[16]{};
56
57 float renderSize[2]{};
58};
59
64{
65 float scale[2]{1.f, 1.f};
66 float textureSize[2]{1.f, 1.f};
67};
68
69#pragma pack(pop)
70}
Graphics rendering pipeline for ossia score.
Definition Filter/PreviewWidget.hpp:12
UBO shared across all entities shown with the same camera.
Definition CommonUBOs.hpp:29
UBO shared across all entities shown on the same output.
Definition CommonUBOs.hpp:54
UBO specific to individual processes / nodes.
Definition CommonUBOs.hpp:12
UBO shared across all video objects.
Definition CommonUBOs.hpp:64