NoJobEngine
2.0.7
Toggle main menu visibility
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
11
namespace
NoJob
12
{
13
struct
FramebufferSpecification
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
;
33
float
EnvironmentIntensity
= 1.0f;
34
float
DiffuseIBLStrength
= 0.18f;
35
float
SpecularIBLStrength
= 0.32f;
36
float
EnvironmentRotation
= 0.0f;
// degrees around world Y
37
std::string
EnvironmentHDRIPath
;
38
std::uint32_t
EnvironmentResolution
= 512;
39
bool
Shadows
=
true
;
40
// 0 = Low, 1 = Medium, 2 = High
41
int
ShadowQuality
= 2;
42
};
43
44
class
Framebuffer
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
}
NoJob::Framebuffer
Definition
Framebuffer.h:45
NoJob::Framebuffer::GetColorAttachmentRendererID
virtual std::uint32_t GetColorAttachmentRendererID() const =0
NoJob::Framebuffer::PresentToDefault
virtual void PresentToDefault(std::uint32_t width, std::uint32_t height)=0
NoJob::Framebuffer::Unbind
virtual void Unbind()=0
NoJob::Framebuffer::Resize
virtual void Resize(std::uint32_t width, std::uint32_t height)=0
NoJob::Framebuffer::Bind
virtual void Bind()=0
NoJob::Framebuffer::SetPostProcessSettings
virtual void SetPostProcessSettings(const FramebufferSpecification &specification)=0
NoJob::Framebuffer::Create
static std::shared_ptr< Framebuffer > Create(const FramebufferSpecification &specification)
Definition
Framebuffer.cpp:8
NoJob::Framebuffer::~Framebuffer
virtual ~Framebuffer()=default
NoJob::Framebuffer::GetSpecification
virtual const FramebufferSpecification & GetSpecification() const =0
NoJob
Definition
BTActionNode.h:13
NoJob::FramebufferSpecification
Definition
Framebuffer.h:14
NoJob::FramebufferSpecification::Exposure
float Exposure
Definition
Framebuffer.h:24
NoJob::FramebufferSpecification::ShadowQuality
int ShadowQuality
Definition
Framebuffer.h:41
NoJob::FramebufferSpecification::AOIntensity
float AOIntensity
Definition
Framebuffer.h:27
NoJob::FramebufferSpecification::DiffuseIBLStrength
float DiffuseIBLStrength
Definition
Framebuffer.h:34
NoJob::FramebufferSpecification::EnvironmentResolution
std::uint32_t EnvironmentResolution
Definition
Framebuffer.h:38
NoJob::FramebufferSpecification::EnvironmentRotation
float EnvironmentRotation
Definition
Framebuffer.h:36
NoJob::FramebufferSpecification::ImageBasedLighting
bool ImageBasedLighting
Definition
Framebuffer.h:32
NoJob::FramebufferSpecification::ScreenSpaceAO
bool ScreenSpaceAO
Definition
Framebuffer.h:23
NoJob::FramebufferSpecification::Height
std::uint32_t Height
Definition
Framebuffer.h:16
NoJob::FramebufferSpecification::Shadows
bool Shadows
Definition
Framebuffer.h:39
NoJob::FramebufferSpecification::FXAA
bool FXAA
Definition
Framebuffer.h:22
NoJob::FramebufferSpecification::SpecularIBLStrength
float SpecularIBLStrength
Definition
Framebuffer.h:35
NoJob::FramebufferSpecification::EnvironmentHDRIPath
std::string EnvironmentHDRIPath
Definition
Framebuffer.h:37
NoJob::FramebufferSpecification::EnvironmentIntensity
float EnvironmentIntensity
Definition
Framebuffer.h:33
NoJob::FramebufferSpecification::Bloom
bool Bloom
Definition
Framebuffer.h:21
NoJob::FramebufferSpecification::Width
std::uint32_t Width
Definition
Framebuffer.h:15
NoJob::FramebufferSpecification::BloomStrength
float BloomStrength
Definition
Framebuffer.h:26
NoJob::FramebufferSpecification::HDR
bool HDR
Definition
Framebuffer.h:20
NoJob::FramebufferSpecification::BloomThreshold
float BloomThreshold
Definition
Framebuffer.h:25
Engine
Renderer
Framebuffer.h
Generated by
1.18.0