CommonUBOs.hpp
1 #pragma once
2 
3 #include <cstdint>
4 
5 namespace score::gfx
6 {
7 #pragma pack(push, 1)
11 struct ProcessUBO
12 {
13  float time{};
14  float timeDelta{};
15  float progress{};
16 
17  int32_t passIndex{};
18  int32_t frameIndex{};
19 
20  float date[4]{0.f, 0.f, 0.f, 0.f};
21  float mouse[4]{0.5f, 0.5f, 0.5f, 0.5f};
22  float channelTime[4]{0.5f, 0.5f, 0.5f, 0.5f};
23 
24  float sampleRate{};
25 };
26 
31 {
32  float mvp[16]{};
33  float mv[16]{};
34  float model[16]{};
35  float view[16]{};
36  float projection[16]{};
37  float modelNormal[9]{};
38  float padding[3]; // Needed as a mat3 needs a bit more space...
39 };
40 
41  static_assert(
42  sizeof(ModelCameraUBO) == sizeof(float) * (16 + 16 + 16 + 16 + 16 + 9 + 3));
43 
47 struct OutputUBO
48 {
49  float clipSpaceCorrMatrix[16]{};
50 
51  float renderSize[2]{};
52 };
53 
58 {
59  float scale[2]{1.f, 1.f};
60  float textureSize[2]{1.f, 1.f};
61 };
62 
63 #pragma pack(pop)
64 }
Graphics rendering pipeline for ossia score.
Definition: Filter/PreviewWidget.hpp:12
UBO shared across all entities shown with the same camera.
Definition: CommonUBOs.hpp:31
UBO shared across all entities shown on the same output.
Definition: CommonUBOs.hpp:48
UBO specific to individual processes / nodes.
Definition: CommonUBOs.hpp:12
UBO shared across all video objects.
Definition: CommonUBOs.hpp:58