24 static constexpr ID DirectionalShadow = 1 << 0;
25 static constexpr ID OmniShadow = 1 << 1;
26 static constexpr ID Scene = 1 << 2;
27 static constexpr ID SceneTransparent = 1 << 3;
28 static constexpr ID Composite = 1 << 4;
37 virtual void beforeRender(
Engine& engine, uint8_t pass) = 0;
38 virtual void afterRender(
Engine& engine, uint8_t pass) = 0;
40 virtual void resize(glm::ivec2 resolution) { m_resolution = resolution; }
42 ID id()
const {
return m_id; }
43 uint8_t passes()
const {
return m_passes; }
46 const gl::FBO* fbo =
nullptr;
47 std::optional<glm::ivec2> viewportSize = std::nullopt;
50 glm::ivec2 m_resolution;
53 explicit RenderPass(glm::ivec2 resolution, uint8_t passes = 1)
54 : m_id(1 << s_nextPassIndex++),
56 m_resolution(resolution) {}
59 explicit RenderPass(glm::ivec2 resolution, ID
id, uint8_t passes = 1)
62 m_resolution(resolution) {}
68 inline static unsigned int s_nextPassIndex = 4;
Definition RenderPass.h:19
RenderPass(glm::ivec2 resolution, uint8_t passes=1)
Constructs pass with next available ID, use only for custom passes.
Definition RenderPass.h:53
RenderPass(glm::ivec2 resolution, ID id, uint8_t passes=1)
Constructs pass with specific ID, use only for built-in passes.
Definition RenderPass.h:59