NoJobEngine 2.0.7
Loading...
Searching...
No Matches
Framebuffer.h
Go to the documentation of this file.
1
6#pragma once
7#include <cstdint>
8#include <memory>
9#include <string>
10
11namespace NoJob
12{
14 {
15 std::uint32_t Width = 1280;
16 std::uint32_t Height = 720;
17
18 // Advanced Renderer V2. Scene color is rendered in linear HDR and
19 // resolved through the post-processing chain when Unbind() is called.
20 bool HDR = true;
21 bool Bloom = true;
22 bool FXAA = true;
23 bool ScreenSpaceAO = true;
24 float Exposure = 1.0f;
25 float BloomThreshold = 1.0f;
26 float BloomStrength = 0.12f;
27 float AOIntensity = 0.35f;
28
29 // Renderer V3 environment / IBL controls. Kept in the graphics
30 // settings structure so the editor and both scene render targets use
31 // exactly the same values.
32 bool ImageBasedLighting = true;
34 float DiffuseIBLStrength = 0.18f;
35 float SpecularIBLStrength = 0.32f;
36 float EnvironmentRotation = 0.0f; // degrees around world Y
38 std::uint32_t EnvironmentResolution = 512;
39 bool Shadows = true;
40 // 0 = Low, 1 = Medium, 2 = High
42 };
43
45 {
46 public:
47 virtual ~Framebuffer() = default;
48
49 virtual void Bind() = 0;
50 virtual void Unbind() = 0;
51 virtual void Resize(std::uint32_t width, std::uint32_t height) = 0;
52 virtual void PresentToDefault(std::uint32_t width, std::uint32_t height) = 0;
53
54 virtual std::uint32_t GetColorAttachmentRendererID() const = 0;
55 virtual const FramebufferSpecification& GetSpecification() const = 0;
56 virtual void SetPostProcessSettings(const FramebufferSpecification& specification) = 0;
57
58 static std::shared_ptr<Framebuffer> Create(
59 const FramebufferSpecification& specification);
60 };
61}
virtual std::uint32_t GetColorAttachmentRendererID() const =0
virtual void PresentToDefault(std::uint32_t width, std::uint32_t height)=0
virtual void Unbind()=0
virtual void Resize(std::uint32_t width, std::uint32_t height)=0
virtual void Bind()=0
virtual void SetPostProcessSettings(const FramebufferSpecification &specification)=0
static std::shared_ptr< Framebuffer > Create(const FramebufferSpecification &specification)
virtual ~Framebuffer()=default
virtual const FramebufferSpecification & GetSpecification() const =0