This commit is contained in:
Бранимир Караџић 2018-12-14 14:30:23 -08:00
parent 8acd90f98a
commit 7a815f6706
1 changed files with 20 additions and 18 deletions

View File

@ -3,6 +3,13 @@
* License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause
*/
/*
* Reference(s):
* - ASSAO is a SSAO implementation tuned for scalability and flexibility.
* https://web.archive.org/web/20181214222937/https://software.intel.com/en-us/articles/adaptive-screen-space-ambient-occlusion
* https://github.com/GameTechDev/ASSAO
*/
#include <common.h>
#include <camera.h>
#include <bgfx_utils.h>
@ -10,26 +17,21 @@
#include <bx/rng.h>
#include <bx/os.h>
#define USE_ASSAO 0
namespace
{
/*
* ASSAO is a SSAO implementation tuned for scalability and flexibility.
* https://software.intel.com/en-us/articles/adaptive-screen-space-ambient-occlusion
* https://github.com/GameTechDev/ASSAO
*/
// Render passes
// Render passes
#define RENDER_PASS_GBUFFER 0 // GBuffer for normals and albedo
#define RENDER_PASS_COMBINE 1 // Directional light and final result
// Gbuffer has multiple render targets
// Gbuffer has multiple render targets
#define GBUFFER_RT_NORMAL 0
#define GBUFFER_RT_COLOR 1
#define GBUFFER_RT_DEPTH 2
// Random meshes we draw
// Random meshes we draw
#define MODEL_COUNT 120 // In this demo, a model is a mesh plus a transform
#define SAMPLER_POINT_CLAMP (BGFX_SAMPLER_MIN_POINT|BGFX_SAMPLER_MAG_POINT|BGFX_SAMPLER_MIP_POINT|BGFX_SAMPLER_U_CLAMP| BGFX_SAMPLER_V_CLAMP | BGFX_SAMPLER_W_CLAMP)
@ -229,9 +231,9 @@ namespace
ExampleASSAO(const char* _name, const char* _description)
: entry::AppI(_name, _description)
, m_currFrame(UINT32_MAX)
, m_texelHalf(0.0f)
, m_enableSSAO(true)
, m_enableTexturing(true)
, m_texelHalf(0.0f)
, m_framebufferGutter(true)
{
}