Nebula
Loading...
Searching...
No Matches
PostEffects::DofContext Class Reference

#include <dofcontext.h>

Inherits Graphics::GraphicsContext.

Public Member Functions

 DofContext ()
 constructor
virtual ~DofContext ()
 destructor
Public Member Functions inherited from Graphics::GraphicsContext
 GraphicsContext ()
 constructor
virtual ~GraphicsContext ()
 destructor

Static Public Member Functions

static void Create ()
 create context
static void Discard ()
 discard context
static void Setup ()
 setup dof context
static void SetBokeh (float blades, float rotation, float roundness)
 Aperture.x blade count, y rotation in radians, z roundness in [0, 1].
static void SetDirtMask (const CoreGraphics::TextureId texture)
 Aperture intensity for every bokeh disk.
static void Resize (const uint framescriptHash, SizeT width, SizeT height)
 Handle window resize.

Private Member Functions

 __DeclarePluginContext ()

Static Private Member Functions

static Graphics::ContextEntityId Alloc ()
 implement an empty alloc
static void Dealloc (Graphics::ContextEntityId id)
 implement a dummy dealloc

Additional Inherited Members

Static Protected Member Functions inherited from Graphics::GraphicsContext
static void InternalRegisterEntity (const Graphics::GraphicsEntityId id, Graphics::GraphicsContextState &&state)
static void InternalDeregisterEntity (const Graphics::GraphicsEntityId id, Graphics::GraphicsContextState &&state)
template<class ID_ALLOCATOR>
static void InternalDefragment (ID_ALLOCATOR &allocator, Graphics::GraphicsContextState &&state)

Constructor & Destructor Documentation

◆ DofContext()

PostEffects::DofContext::DofContext ( )

constructor

◆ ~DofContext()

PostEffects::DofContext::~DofContext ( )
virtual

destructor

Member Function Documentation

◆ __DeclarePluginContext()

PostEffects::DofContext::__DeclarePluginContext ( )
private

◆ Alloc()

Graphics::ContextEntityId PostEffects::DofContext::Alloc ( )
inlinestaticprivate

implement an empty alloc

◆ Create()

void PostEffects::DofContext::Create ( )
static

create context

◆ Dealloc()

void PostEffects::DofContext::Dealloc ( Graphics::ContextEntityId id)
inlinestaticprivate

implement a dummy dealloc

◆ Discard()

void PostEffects::DofContext::Discard ( )
static

discard context

◆ Resize()

void PostEffects::DofContext::Resize ( const uint framescriptHash,
SizeT width,
SizeT height )
static

Handle window resize.

◆ SetBokeh()

void PostEffects::DofContext::SetBokeh ( float blades,
float rotation,
float roundness )
static

Aperture.x blade count, y rotation in radians, z roundness in [0, 1].

Blade count 3..8 is a regular iris. Any other count is a disk. Roundness 0 is straight blades, 1 is a disk. w is 0 while the dirt mask is the white placeholder. The mask is rebuilt on the next DofMask dispatch.

◆ SetDirtMask()

void PostEffects::DofContext::SetDirtMask ( const CoreGraphics::TextureId texture)
static

Aperture intensity for every bokeh disk.

r is the weight. White leaves the gather unchanged. The initial texture is CoreGraphics::White2D.

◆ Setup()

void PostEffects::DofContext::Setup ( )
static

setup dof context


The documentation for this class was generated from the following files: