Rise
The Vieneo Province
Loading...
Searching...
No Matches
Rendering::ProceduralLightning11 Class Reference

#include <ProceduralLightning11.h>

Collaboration diagram for Rendering::ProceduralLightning11:
[legend]

Classes

struct  Target
struct  GeometryEntry

Public Types

using Matrix = DirectX::XMFLOAT4X4
using Vector = RiseMath::Vector3

Public Member Functions

HRESULT Initialize (ID3D11Device *device, const std::filesystem::path &directory={})
void Reset ()
HRESULT Render (ID3D11DeviceContext *context, ID3D11RenderTargetView *scene, const SceneDepth11 &depth, const D3D11_VIEWPORT &viewport, const Matrix &view, const Matrix &projection, Vector observerOrigin, Vector ground, Vector cloud, uint32_t seed, const RiseMath::Color &color, float pulse, float visibilityKm, CloudRenderer11 *atmosphere=nullptr, float growth=1.f)
unsigned GeometryBuilds () const
unsigned IndexCount () const
void BeginAfterimage (double now, bool enabled, float ambient, uint64_t viewer)
void ClearAfterimage ()
bool AfterimageActive () const
HRESULT CompositeAfterimage (ID3D11DeviceContext *context, ID3D11RenderTargetView *scene, const SceneDepth11 &depth, const D3D11_VIEWPORT &viewport)

Private Member Functions

HRESULT Geometry (Vector offset, uint32_t seed)
HRESULT AfterimageTargets (const SceneDepth11 &depth, const D3D11_VIEWPORT &viewport)
bool AfterimageSizeMatches (const SceneDepth11 &depth, const D3D11_VIEWPORT &viewport) const

Private Attributes

Target capture
Target resolved
Target history [2]
LightningAfterimage::State afterimage
D3D11_TEXTURE2D_DESC captureDescription {}
D3D11_VIEWPORT captureViewport {}
unsigned historyIndex =0
bool historyClear =true
bool captured =false
Program11 captureProgram
Program11 historyProgram
Program11 ghostProgram
Microsoft::WRL::ComPtr< ID3D11DepthStencilState > noDepth
Microsoft::WRL::ComPtr< ID3D11BlendState > captureBlend
Microsoft::WRL::ComPtr< ID3D11BlendState > ghostBlend
Microsoft::WRL::ComPtr< ID3D11Device > device
Microsoft::WRL::ComPtr< ID3DDeviceContextState > state
Microsoft::WRL::ComPtr< ID3D11RasterizerState > raster
Microsoft::WRL::ComPtr< ID3D11DepthStencilState > depthState
Microsoft::WRL::ComPtr< ID3D11BlendState > blend
Microsoft::WRL::ComPtr< ID3D11SamplerState > sampler
Microsoft::WRL::ComPtr< ID3D11Buffer > vertices
Microsoft::WRL::ComPtr< ID3D11Buffer > indices
Program11 program
std::array< GeometryEntry, LightningTiming::MaxChainedBolts+1 > geometryCache {}
unsigned nextGeometry =0
unsigned indexCount =0
unsigned builds =0

Detailed Description

Definition at line 9 of file ProceduralLightning11.h.

Member Typedef Documentation

◆ Matrix

using Rendering::ProceduralLightning11::Matrix = DirectX::XMFLOAT4X4

Definition at line 12 of file ProceduralLightning11.h.

◆ Vector

Member Function Documentation

◆ AfterimageActive()

bool Rendering::ProceduralLightning11::AfterimageActive ( ) const
inline

Definition at line 24 of file ProceduralLightning11.h.

Here is the caller graph for this function:

◆ AfterimageSizeMatches()

bool Rendering::ProceduralLightning11::AfterimageSizeMatches ( const SceneDepth11 & depth,
const D3D11_VIEWPORT & viewport ) const
private

Definition at line 81 of file ProceduralLightning11.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ AfterimageTargets()

HRESULT Rendering::ProceduralLightning11::AfterimageTargets ( const SceneDepth11 & depth,
const D3D11_VIEWPORT & viewport )
private

Definition at line 89 of file ProceduralLightning11.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ BeginAfterimage()

void Rendering::ProceduralLightning11::BeginAfterimage ( double now,
bool enabled,
float ambient,
uint64_t viewer )

Definition at line 76 of file ProceduralLightning11.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ClearAfterimage()

void Rendering::ProceduralLightning11::ClearAfterimage ( )
inline

Definition at line 23 of file ProceduralLightning11.h.

Here is the caller graph for this function:

◆ CompositeAfterimage()

HRESULT Rendering::ProceduralLightning11::CompositeAfterimage ( ID3D11DeviceContext * context,
ID3D11RenderTargetView * scene,
const SceneDepth11 & depth,
const D3D11_VIEWPORT & viewport )

Definition at line 107 of file ProceduralLightning11.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Geometry()

HRESULT Rendering::ProceduralLightning11::Geometry ( Vector offset,
uint32_t seed )
private

Definition at line 145 of file ProceduralLightning11.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GeometryBuilds()

unsigned Rendering::ProceduralLightning11::GeometryBuilds ( ) const
inline

Definition at line 20 of file ProceduralLightning11.h.

◆ IndexCount()

unsigned Rendering::ProceduralLightning11::IndexCount ( ) const
inline

Definition at line 21 of file ProceduralLightning11.h.

◆ Initialize()

HRESULT Rendering::ProceduralLightning11::Initialize ( ID3D11Device * device,
const std::filesystem::path & directory = {} )

Definition at line 32 of file ProceduralLightning11.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Render()

HRESULT Rendering::ProceduralLightning11::Render ( ID3D11DeviceContext * context,
ID3D11RenderTargetView * scene,
const SceneDepth11 & depth,
const D3D11_VIEWPORT & viewport,
const Matrix & view,
const Matrix & projection,
Vector observerOrigin,
Vector ground,
Vector cloud,
uint32_t seed,
const RiseMath::Color & color,
float pulse,
float visibilityKm,
CloudRenderer11 * atmosphere = nullptr,
float growth = 1.f )

Definition at line 163 of file ProceduralLightning11.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Reset()

void Rendering::ProceduralLightning11::Reset ( )

Definition at line 23 of file ProceduralLightning11.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ afterimage

LightningAfterimage::State Rendering::ProceduralLightning11::afterimage
private

Definition at line 38 of file ProceduralLightning11.h.

◆ blend

Microsoft::WRL::ComPtr<ID3D11BlendState> Rendering::ProceduralLightning11::blend
private

Definition at line 50 of file ProceduralLightning11.h.

◆ builds

unsigned Rendering::ProceduralLightning11::builds =0
private

Definition at line 64 of file ProceduralLightning11.h.

◆ capture

Target Rendering::ProceduralLightning11::capture
private

Definition at line 37 of file ProceduralLightning11.h.

◆ captureBlend

Microsoft::WRL::ComPtr<ID3D11BlendState> Rendering::ProceduralLightning11::captureBlend
private

Definition at line 45 of file ProceduralLightning11.h.

◆ captured

bool Rendering::ProceduralLightning11::captured =false
private

Definition at line 42 of file ProceduralLightning11.h.

◆ captureDescription

D3D11_TEXTURE2D_DESC Rendering::ProceduralLightning11::captureDescription {}
private

Definition at line 39 of file ProceduralLightning11.h.

◆ captureProgram

Program11 Rendering::ProceduralLightning11::captureProgram
private

Definition at line 43 of file ProceduralLightning11.h.

◆ captureViewport

D3D11_VIEWPORT Rendering::ProceduralLightning11::captureViewport {}
private

Definition at line 40 of file ProceduralLightning11.h.

◆ depthState

Microsoft::WRL::ComPtr<ID3D11DepthStencilState> Rendering::ProceduralLightning11::depthState
private

Definition at line 49 of file ProceduralLightning11.h.

◆ device

Microsoft::WRL::ComPtr<ID3D11Device> Rendering::ProceduralLightning11::device
private

Definition at line 46 of file ProceduralLightning11.h.

◆ geometryCache

std::array<GeometryEntry,LightningTiming::MaxChainedBolts+1> Rendering::ProceduralLightning11::geometryCache {}
private

Definition at line 62 of file ProceduralLightning11.h.

◆ ghostBlend

Microsoft::WRL::ComPtr<ID3D11BlendState> Rendering::ProceduralLightning11::ghostBlend
private

Definition at line 45 of file ProceduralLightning11.h.

◆ ghostProgram

Program11 Rendering::ProceduralLightning11::ghostProgram
private

Definition at line 43 of file ProceduralLightning11.h.

◆ history

Target Rendering::ProceduralLightning11::history[2]
private

Definition at line 37 of file ProceduralLightning11.h.

◆ historyClear

bool Rendering::ProceduralLightning11::historyClear =true
private

Definition at line 42 of file ProceduralLightning11.h.

◆ historyIndex

unsigned Rendering::ProceduralLightning11::historyIndex =0
private

Definition at line 41 of file ProceduralLightning11.h.

◆ historyProgram

Program11 Rendering::ProceduralLightning11::historyProgram
private

Definition at line 43 of file ProceduralLightning11.h.

◆ indexCount

unsigned Rendering::ProceduralLightning11::indexCount =0
private

Definition at line 64 of file ProceduralLightning11.h.

◆ indices

Microsoft::WRL::ComPtr<ID3D11Buffer> Rendering::ProceduralLightning11::indices
private

Definition at line 52 of file ProceduralLightning11.h.

◆ nextGeometry

unsigned Rendering::ProceduralLightning11::nextGeometry =0
private

Definition at line 63 of file ProceduralLightning11.h.

◆ noDepth

Microsoft::WRL::ComPtr<ID3D11DepthStencilState> Rendering::ProceduralLightning11::noDepth
private

Definition at line 44 of file ProceduralLightning11.h.

◆ program

Program11 Rendering::ProceduralLightning11::program
private

Definition at line 53 of file ProceduralLightning11.h.

◆ raster

Microsoft::WRL::ComPtr<ID3D11RasterizerState> Rendering::ProceduralLightning11::raster
private

Definition at line 48 of file ProceduralLightning11.h.

◆ resolved

Target Rendering::ProceduralLightning11::resolved
private

Definition at line 37 of file ProceduralLightning11.h.

◆ sampler

Microsoft::WRL::ComPtr<ID3D11SamplerState> Rendering::ProceduralLightning11::sampler
private

Definition at line 51 of file ProceduralLightning11.h.

◆ state

Microsoft::WRL::ComPtr<ID3DDeviceContextState> Rendering::ProceduralLightning11::state
private

Definition at line 47 of file ProceduralLightning11.h.

◆ vertices

Microsoft::WRL::ComPtr<ID3D11Buffer> Rendering::ProceduralLightning11::vertices
private

Definition at line 52 of file ProceduralLightning11.h.


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