Mountain  1.0.0
Simple C++ 2D Game Framework
effect.hpp
1 #pragma once
2 
3 #include "Mountain/core.hpp"
4 #include "Mountain/rendering/render_target.hpp"
5 #include "Mountain/resource/compute_shader.hpp"
7 
8 namespace Mountain
9 {
10  class Effect
11  {
12  public:
13  struct MOUNTAIN_API ImageBinding
14  {
15  uint32_t textureId;
16  uint32_t shaderBinding;
17  Graphics::ImageShaderAccess shaderAccess;
18  };
19 
20  List<ImageBinding> imageBindings;
21 
22  MOUNTAIN_API Effect() = default;
23  MOUNTAIN_API virtual ~Effect() = default;
24 
25  DEFAULT_COPY_MOVE_OPERATIONS(Effect)
26 
27  MOUNTAIN_API virtual void LoadResources() = 0;
28 
36  MOUNTAIN_API void Apply(Vector2i textureSize, bool_t synchronizeImageData) const;
37 
38  protected:
39  Pointer<ComputeShader> m_ComputeShader;
40  };
41 
42  class Vignette : public Effect
43  {
44  public:
45  MOUNTAIN_API void LoadResources() override;
46 
47  MOUNTAIN_API void SetStrength(float_t newStrength) const;
48  };
49 
50  class FilmGrain : public Effect
51  {
52  public:
53  MOUNTAIN_API void LoadResources() override;
54 
55  MOUNTAIN_API void SetIntensity(float_t newIntensity) const;
56  };
57 }
A dynamic array implementation. Wrapper around the std::vector class.
Definition: list.hpp:24
Custom Mountain smart pointer. Represents both a std::shared_ptr and a std::weak_ptr.
Defines the Mountain::Texture class.
MOUNTAIN_API void Apply(Vector2i textureSize, bool_t synchronizeImageData) const
Applies this effect to the bound images.
Contains all declarations of the Mountain Framework.
Definition: audio.hpp:22