Rendu
A lightweight rendering engine for experimentations
Main Page
Modules
Namespaces
Classes
Files
Related Pages
File List
Loading...
Searching...
No Matches
src
engine
processing
SSAO.hpp
1
#pragma once
2
3
#include "processing/BilateralBlur.hpp"
4
#include "processing/BoxBlur.hpp"
5
#include "resources/Texture.hpp"
6
#include "resources/Buffer.hpp"
7
#include "Common.hpp"
8
14
class
SSAO
{
15
16
public
:
17
19
enum class
Quality
:
int
{
20
LOW
= 0,
21
MEDIUM
= 1,
22
HIGH
= 2
23
};
24
33
SSAO
(uint width, uint height, uint downscale,
float
radius
,
const
std::string & name);
34
41
void
process
(
const
glm::mat4 & projection,
const
Texture
& depthTex,
const
Texture
& normalTex);
42
48
void
resize
(uint width, uint height);
49
53
void
clear
()
const
;
54
59
const
Texture
*
texture
()
const
;
60
64
float
&
radius
();
65
69
Quality
&
quality
();
70
71
private
:
72
Texture
_ssaoTexture
;
73
Texture
_finalTexture
;
74
BilateralBlur
_highBlur
;
75
BoxBlur
_mediumBlur
;
76
Program
*
_programSSAO
;
77
UniformBuffer<glm::vec4>
_samples
;
78
Texture
_noisetexture
=
Texture
(
"SSAO noise"
);
79
float
_radius
= 0.5f;
80
uint
_downscale
= 1;
81
Quality
_quality
=
Quality::MEDIUM
;
82
};
BilateralBlur
Apply an approximate bilateral blur to a texture. This can be used to blur while preserving edges,...
Definition:
BilateralBlur.hpp:13
BoxBlur
Applies a box blur of fixed radius 2. Correspond to uniformly averaging values over a 5x5 square wind...
Definition:
BoxBlur.hpp:12
Program
Represents a group of shaders used for rendering.
Definition:
Program.hpp:31
SSAO
Computes screen space ambient occlusion from a depth and view-space normal buffer (brought to [0,...
Definition:
SSAO.hpp:14
SSAO::_programSSAO
Program * _programSSAO
The SSAO program.
Definition:
SSAO.hpp:76
SSAO::process
void process(const glm::mat4 &projection, const Texture &depthTex, const Texture &normalTex)
Definition:
SSAO.cpp:62
SSAO::_mediumBlur
BoxBlur _mediumBlur
Medium quality blur.
Definition:
SSAO.hpp:75
SSAO::_finalTexture
Texture _finalTexture
SSAO texture.
Definition:
SSAO.hpp:73
SSAO::Quality
Quality
Definition:
SSAO.hpp:19
SSAO::Quality::LOW
@ LOW
Bilinear upscaling.
SSAO::Quality::HIGH
@ HIGH
Bilateral blur.
SSAO::Quality::MEDIUM
@ MEDIUM
Approximate box blur and bilinear upscaling.
SSAO::_noisetexture
Texture _noisetexture
Random noise texture.
Definition:
SSAO.hpp:78
SSAO::_highBlur
BilateralBlur _highBlur
High quality blur.
Definition:
SSAO.hpp:74
SSAO::_radius
float _radius
SSAO intersection test radius.
Definition:
SSAO.hpp:79
SSAO::quality
Quality & quality()
Definition:
SSAO.cpp:117
SSAO::_quality
Quality _quality
Quality of the upscaling/blurring.
Definition:
SSAO.hpp:81
SSAO::radius
float & radius()
Definition:
SSAO.cpp:113
SSAO::clear
void clear() const
Definition:
SSAO.cpp:98
SSAO::_samples
UniformBuffer< glm::vec4 > _samples
The 3D directional samples.
Definition:
SSAO.hpp:77
SSAO::_ssaoTexture
Texture _ssaoTexture
SSAO texture.
Definition:
SSAO.hpp:72
SSAO::texture
const Texture * texture() const
Definition:
SSAO.cpp:109
SSAO::resize
void resize(uint width, uint height)
Definition:
SSAO.cpp:103
SSAO::_downscale
uint _downscale
SSAO internal resolution downscaling.
Definition:
SSAO.hpp:80
Texture
Represents a texture containing one or more images, stored on the CPU and/or GPU.
Definition:
Texture.hpp:12
UniformBuffer
Represents a buffer containing uniform data, stored on the CPU and GPU. Depending on the update frequ...
Definition:
Buffer.hpp:164
Generated by
Doxygen
1.9.5 - Theme by
Simon Rodriguez