MOS
cloud_program.hpp
1 #pragma once
2 
3 #include <array>
4 #include <mos/gl/program.hpp>
5 #include <mos/gl/shader.hpp>
6 
7 namespace mos::gl {
8 
10 class Cloud_program : public Program {
11  friend class Renderer;
12 public:
14  GLint map;
15  GLint position;
16  GLint extent;
17  GLint strength;
18  GLint falloff;
19  };
20 
21  struct Camera_uniforms {
22  GLint position;
23  GLint near;
24  GLint far;
25  };
26 
27  struct Light_uniforms {
28  GLint position;
29  GLint color;
30  GLint strength;
31  GLint view;
32  GLint projection;
33  GLint angle;
34  GLint direction;
35  GLint blend;
36  };
37 
39  GLint position;
40  GLint direction;
41  GLint color;
42  GLint strength;
43  };
44 
45 private:
46  explicit Cloud_program(const std::string &name,
47  const Shader &functions_shader);
48 
49 public:
50  GLint model_view_projection;
51  GLint model_view;
52  GLint model{};
53  GLint projection;
54 
55  GLint albedo_sampler;
56  GLint emissive_sampler;
57 
58  GLint resolution;
59 
60  Camera_uniforms camera{};
61 
62  std::array<Environment_uniforms, 2> environment_samplers{};
63  std::array<Light_uniforms, 4> spot_lights{};
64  Directional_light_uniforms directional_light{};
65 };
66 }
Definition: shader.hpp:8
Definition: program.hpp:7
Definition: cloud_program.hpp:21
Definition: cloud_program.hpp:27
Definition: cloud_program.hpp:13
Definition: array_buffers.hpp:5
Uniforms for the particle shader program.
Definition: cloud_program.hpp:10
Render geometry shapes with OpenGL.
Definition: renderer.hpp:40