MAGE  v0.171.0
Matthias Advanced Game Engine
mage::rendering Namespace Reference

Namespaces

 anonymous_namespace{display_configurator.cpp}
 
 anonymous_namespace{shader_factory_deferred.cpp}
 
 anonymous_namespace{shader_factory_forward.cpp}
 
 anonymous_namespace{sprite_batch.cpp}
 
 anonymous_namespace{sprite_font.cpp}
 
 anonymous_namespace{texture_factory.cpp}
 
 anonymous_namespace{vertex.cpp}
 
 loader
 

Classes

class  AAPass
 
class  AmbientLight
 
class  BackBufferPass
 
class  BlobCompiledShader
 
class  BoundingVolumePass
 
class  BufferCompiledShader
 
class  BufferLock
 
class  Camera
 
struct  CameraBuffer
 
class  CameraLens
 
class  CameraSettings
 
class  ColorString
 
class  CompiledShader
 
class  ConstantBuffer
 
class  DeferredPass
 
class  DepthPass
 
class  DirectionalLight
 
struct  DirectionalLightBuffer
 
class  DisplayConfiguration
 
class  DisplayConfigurator
 
class  Fog
 
class  ForwardPass
 
struct  Glyph
 
struct  is_shader
 
struct  is_shader< ComputeShader >
 
struct  is_shader< DomainShader >
 
struct  is_shader< GeometryShader >
 
struct  is_shader< HullShader >
 
struct  is_shader< PixelShader >
 
struct  is_shader< VertexShader >
 
class  LBufferPass
 
struct  LightBuffer
 
class  Manager
 
class  Material
 
class  Mesh
 
class  MeshDescriptor
 
class  Model
 
struct  ModelBuffer
 
class  ModelDescriptor
 
struct  ModelOutput
 
struct  ModelPart
 
class  OmniLight
 
struct  OmniLightBuffer
 
class  OrthographicCamera
 
class  OutputManager
 
class  PerspectiveCamera
 
struct  Pipeline
 
struct  PointLightBuffer
 
class  PostProcessPass
 
class  PrimitiveBatchMesh
 
class  Renderer
 
class  ResourceManager
 
struct  SecondaryCameraBuffer
 
class  Shader
 
class  ShadowCubeMapBuffer
 
class  ShadowMapBuffer
 
struct  ShadowMappedOmniLightBuffer
 
struct  ShadowMappedSpotLightBuffer
 
class  Sky
 
class  SkyPass
 
class  SpotLight
 
struct  SpotLightBuffer
 
class  SpriteBatch
 
class  SpriteBatchMesh
 
class  SpriteFont
 
class  SpriteFontDescriptor
 
struct  SpriteFontOutput
 
class  SpriteImage
 
class  SpritePass
 
class  SpriteText
 
class  StateManager
 
class  StaticMesh
 
class  StructuredBuffer
 
class  SwapChain
 
class  Texture
 
struct  VertexPosition
 
struct  VertexPositionColor
 
struct  VertexPositionColorTexture
 
struct  VertexPositionNormal
 
struct  VertexPositionNormalColor
 
struct  VertexPositionNormalColorTexture
 
struct  VertexPositionNormalTexture
 
struct  VertexPositionTexture
 
class  VertexShader
 
class  Viewport
 
class  VoxelGrid
 
class  VoxelGridPass
 
class  VoxelizationPass
 
class  VoxelizationSettings
 
class  World
 
struct  WorldBuffer
 

Typedefs

using DXGIAdapter = IDXGIAdapter
 
using DXGIOutput = IDXGIOutput
 
using DXGISwapChain = IDXGISwapChain
 
using D3D11Device = ID3D11Device
 
using D3D11DeviceContext = ID3D11DeviceContext
 
using SpriteFontPtr = SharedPtr< const SpriteFont >
 
using ModelDescriptorPtr = SharedPtr< const ModelDescriptor >
 
using HullShader = Shader< ID3D11HullShader, Pipeline::HS >
 
using DomainShader = Shader< ID3D11DomainShader, Pipeline::DS >
 
using GeometryShader = Shader< ID3D11GeometryShader, Pipeline::GS >
 
using PixelShader = Shader< ID3D11PixelShader, Pipeline::PS >
 
using ComputeShader = Shader< ID3D11ComputeShader, Pipeline::CS >
 
using VertexShaderPtr = SharedPtr< const VertexShader >
 
using HullShaderPtr = SharedPtr< const HullShader >
 
using DomainShaderPtr = SharedPtr< const DomainShader >
 
using GeometryShaderPtr = SharedPtr< const GeometryShader >
 
using PixelShaderPtr = SharedPtr< const PixelShader >
 
using ComputeShaderPtr = SharedPtr< const ComputeShader >
 
using TexturePtr = SharedPtr< const Texture >
 

Enumerations

enum  DepthFormat : U8 { DepthFormat::D16, DepthFormat::D32 }
 
enum  AntiAliasing : U8 {
  AntiAliasing::None = 0, AntiAliasing::FXAA, AntiAliasing::MSAA_2x, AntiAliasing::MSAA_4x,
  AntiAliasing::MSAA_8x, AntiAliasing::SSAA_2x, AntiAliasing::SSAA_3x, AntiAliasing::SSAA_4x
}
 
enum  RenderMode : U8 {
  RenderMode::None = 0, RenderMode::Forward, RenderMode::Deferred, RenderMode::Solid,
  RenderMode::VoxelGrid, RenderMode::FalseColor_BaseColor, RenderMode::FalseColor_BaseColorCoefficient, RenderMode::FalseColor_BaseColorTexture,
  RenderMode::FalseColor_Material, RenderMode::FalseColor_MaterialCoefficient, RenderMode::FalseColor_MaterialTexture, RenderMode::FalseColor_Roughness,
  RenderMode::FalseColor_RoughnessCoefficient, RenderMode::FalseColor_RoughnessTexture, RenderMode::FalseColor_Metalness, RenderMode::FalseColor_MetalnessCoefficient,
  RenderMode::FalseColor_MetalnessTexture, RenderMode::FalseColor_ShadingNormal, RenderMode::FalseColor_TSNMShadingNormal, RenderMode::FalseColor_Depth,
  RenderMode::FalseColor_Distance, RenderMode::FalseColor_UV
}
 
enum  RenderLayer : U32 { RenderLayer::None = 0, RenderLayer::Wireframe = 1, RenderLayer::AABB = 2 }
 
enum  BRDF : U8 { BRDF::Lambertian = 0, BRDF::BlinnPhong, BRDF::CookTorrance, BRDF::Frostbite }
 
enum  FalseColor : U8 {
  FalseColor::ConstantColor = 0, FalseColor::ConstantColorTexture, FalseColor::BaseColor, FalseColor::BaseColorCoefficient,
  FalseColor::BaseColorTexture, FalseColor::Material, FalseColor::MaterialCoefficient, FalseColor::MaterialTexture,
  FalseColor::Roughness, FalseColor::RoughnessCoefficient, FalseColor::RoughnessTexture, FalseColor::Metalness,
  FalseColor::MetalnessCoefficient, FalseColor::MetalnessTexture, FalseColor::ShadingNormal, FalseColor::TSNMShadingNormal,
  FalseColor::Depth, FalseColor::Distance, FalseColor::UV
}
 
enum  ToneMapping : U8 {
  ToneMapping::None = 0, ToneMapping::ACESFilmic, ToneMapping::Max3, ToneMapping::Reinhard,
  ToneMapping::Uncharted
}
 
enum  SpriteEffect : U8 { SpriteEffect::None = 0, SpriteEffect::MirrorX = 1, SpriteEffect::MirrorY = 2, SpriteEffect::MirrorXY = MirrorX | MirrorY }
 
enum  SpriteSortMode : U8 {
  SpriteSortMode::Deferred, SpriteSortMode::Immediate, SpriteSortMode::Texture, SpriteSortMode::BackToFront,
  SpriteSortMode::FrontToBack
}
 
enum  BlendStateID : U8 {
  BlendStateID::Opaque = 0, BlendStateID::Alpha, BlendStateID::Additive, BlendStateID::Multiplicative,
  BlendStateID::BiMultiplicative, BlendStateID::Transparency, BlendStateID::AlphaToCoverage, BlendStateID::Count
}
 
enum  DepthStencilStateID : U8 {
  DepthStencilStateID::DepthNone = 0, DepthStencilStateID::GreaterEqualDepthReadWrite, DepthStencilStateID::GreaterEqualDepthRead, DepthStencilStateID::GreaterDepthReadWrite,
  DepthStencilStateID::GreaterDepthRead, DepthStencilStateID::LessEqualDepthReadWrite, DepthStencilStateID::LessEqualDepthRead, DepthStencilStateID::LessDepthReadWrite,
  DepthStencilStateID::LessDepthRead, DepthStencilStateID::Count
}
 
enum  RasterizerStateID : U8 {
  RasterizerStateID::NoCulling = 0, RasterizerStateID::ClockwiseCulling, RasterizerStateID::CounterClockwiseCulling, RasterizerStateID::Wireframe,
  RasterizerStateID::Count
}
 
enum  SamplerStateID : U8 {
  SamplerStateID::PointWrap, SamplerStateID::PointClamp, SamplerStateID::PointMirror, SamplerStateID::LinearWrap,
  SamplerStateID::LinearClamp, SamplerStateID::LinearMirror, SamplerStateID::AnisotropicWrap, SamplerStateID::AnisotropicClamp,
  SamplerStateID::AnisotropicMirror, SamplerStateID::PCF, SamplerStateID::Count
}
 

Functions

constexpr AntiAliasing RetrieveAntiAliasing (std::size_t desc) noexcept
 
constexpr U32 GetSampleMultiplier (AntiAliasing desc) noexcept
 
constexpr U32 GetResolutionMultiplier (AntiAliasing desc) noexcept
 
HRESULT CreateOpaqueBlendState (ID3D11Device &device, NotNull< ID3D11BlendState ** > state) noexcept
 
HRESULT CreateAlphaBlendState (ID3D11Device &device, NotNull< ID3D11BlendState ** > state) noexcept
 
HRESULT CreateAdditiveBlendState (ID3D11Device &device, NotNull< ID3D11BlendState ** > state) noexcept
 
HRESULT CreateMultiplicativeBlendState (ID3D11Device &device, NotNull< ID3D11BlendState ** > state) noexcept
 
HRESULT CreateBiMultiplicativeBlendState (ID3D11Device &device, NotNull< ID3D11BlendState ** > state) noexcept
 
HRESULT CreateTransparencyBlendState (ID3D11Device &device, NotNull< ID3D11BlendState ** > state) noexcept
 
HRESULT CreateAlphaToCoverageBlendState (ID3D11Device &device, NotNull< ID3D11BlendState ** > state) noexcept
 
HRESULT CreateDepthNoneDepthStencilState (ID3D11Device &device, NotNull< ID3D11DepthStencilState ** > state) noexcept
 
HRESULT CreateDepthReadWriteDepthStencilState (ID3D11Device &device, NotNull< ID3D11DepthStencilState ** > state, D3D11_COMPARISON_FUNC func) noexcept
 
HRESULT CreateDepthReadDepthStencilState (ID3D11Device &device, NotNull< ID3D11DepthStencilState ** > state, D3D11_COMPARISON_FUNC func) noexcept
 
HRESULT CreateRasterizerState (ID3D11Device &device, NotNull< ID3D11RasterizerState ** > state, D3D11_CULL_MODE cull_mode, D3D11_FILL_MODE fill_mode, S32 depth_bias, F32 slope_scaled_depth_bias, F32 depth_bias_clamp) noexcept
 
HRESULT CreateCullNoneRasterizerState (ID3D11Device &device, NotNull< ID3D11RasterizerState ** > state, S32 depth_bias, F32 slope_scaled_depth_bias, F32 depth_bias_clamp) noexcept
 
HRESULT CreateCullClockwiseRasterizerState (ID3D11Device &device, NotNull< ID3D11RasterizerState ** > state, S32 depth_bias, F32 slope_scaled_depth_bias, F32 depth_bias_clamp) noexcept
 
HRESULT CreateCullCounterClockwiseRasterizerState (ID3D11Device &device, NotNull< ID3D11RasterizerState ** > state, S32 depth_bias, F32 slope_scaled_depth_bias, F32 depth_bias_clamp) noexcept
 
HRESULT CreateWireframeRasterizerState (ID3D11Device &device, NotNull< ID3D11RasterizerState ** > state, S32 depth_bias, F32 slope_scaled_depth_bias, F32 depth_bias_clamp) noexcept
 
HRESULT CreateSamplerState (ID3D11Device &device, NotNull< ID3D11SamplerState ** > state, D3D11_FILTER filter, D3D11_TEXTURE_ADDRESS_MODE address_mode) noexcept
 
HRESULT CreatePointWrapSamplerState (ID3D11Device &device, NotNull< ID3D11SamplerState ** > state) noexcept
 
HRESULT CreatePointClampSamplerState (ID3D11Device &device, NotNull< ID3D11SamplerState ** > state) noexcept
 
HRESULT CreatePointMirrorSamplerState (ID3D11Device &device, NotNull< ID3D11SamplerState ** > state) noexcept
 
HRESULT CreateLinearWrapSamplerState (ID3D11Device &device, NotNull< ID3D11SamplerState ** > state) noexcept
 
HRESULT CreateLinearClampSamplerState (ID3D11Device &device, NotNull< ID3D11SamplerState ** > state) noexcept
 
HRESULT CreateLinearMirrorSamplerState (ID3D11Device &device, NotNull< ID3D11SamplerState ** > state) noexcept
 
HRESULT CreateAnisotropicWrapSamplerState (ID3D11Device &device, NotNull< ID3D11SamplerState ** > state) noexcept
 
HRESULT CreateAnisotropicClampSamplerState (ID3D11Device &device, NotNull< ID3D11SamplerState ** > state) noexcept
 
HRESULT CreateAnisotropicMirrorSamplerState (ID3D11Device &device, NotNull< ID3D11SamplerState ** > state) noexcept
 
HRESULT CreatePCFSamplerState (ID3D11Device &device, NotNull< ID3D11SamplerState ** > state) noexcept
 
template<typename VertexT >
HRESULT CreateStaticVertexBuffer (ID3D11Device &device, NotNull< ID3D11Buffer ** > buffer, gsl::span< const VertexT > vertices) noexcept
 
template<typename VertexT >
HRESULT CreateDynamicVertexBuffer (ID3D11Device &device, NotNull< ID3D11Buffer ** > buffer, gsl::span< const VertexT > vertices) noexcept
 
template<typename VertexT >
HRESULT CreateDynamicVertexBuffer (ID3D11Device &device, NotNull< ID3D11Buffer ** > buffer, std::size_t nb_vertices) noexcept
 
template<typename IndexT >
HRESULT CreateStaticIndexBuffer (ID3D11Device &device, NotNull< ID3D11Buffer ** > buffer, gsl::span< const IndexT > indices) noexcept
 
template<typename T >
HRESULT CreateStaticConstantBuffer (ID3D11Device &device, NotNull< ID3D11Buffer ** > buffer, gsl::span< const T > data) noexcept
 
template<typename T >
HRESULT CreateDynamicConstantBuffer (ID3D11Device &device, NotNull< ID3D11Buffer ** > buffer, gsl::span< const T > data) noexcept
 
template<typename T >
HRESULT CreateDynamicConstantBuffer (ID3D11Device &device, NotNull< ID3D11Buffer ** > buffer, std::size_t nb_data_elements=1u) noexcept
 
template<typename T >
HRESULT CreateStaticStructuredBuffer (ID3D11Device &device, NotNull< ID3D11Buffer ** > buffer, gsl::span< const T > data) noexcept
 
template<typename T >
HRESULT CreateDynamicStructuredBuffer (ID3D11Device &device, NotNull< ID3D11Buffer ** > buffer, gsl::span< const T > data) noexcept
 
template<typename T >
HRESULT CreateDynamicStructuredBuffer (ID3D11Device &device, NotNull< ID3D11Buffer ** > buffer, std::size_t nb_data_elements) noexcept
 
U32 GetNumberOfGroups (F32 nb_threads, U32 nb_group_threads) noexcept
 
U32 GetNumberOfGroups (U32 nb_threads, U32 nb_group_threads) noexcept
 
SpriteFontPtr CreateConsolasFont (ResourceManager &resource_manager)
 
template<typename IndexT >
constexpr DXGI_FORMAT GetIndexFormat () noexcept
 
const Material CreateDefaultMaterial (ResourceManager &resource_manager)
 
HRESULT CompileShaderFromFile (std::wstring_view fname, std::string_view entry_point, std::string_view shader_target, NotNull< ID3DBlob ** > output_blob)
 
PixelShaderPtr CreateBackBufferPS (ResourceManager &resource_manager)
 
PixelShaderPtr CreateGBufferPS (ResourceManager &resource_manager, bool tsnm)
 
VertexShaderPtr CreateSkyVS (ResourceManager &resource_manager)
 
PixelShaderPtr CreateSkyPS (ResourceManager &resource_manager)
 
VertexShaderPtr CreateSpriteVS (ResourceManager &resource_manager)
 
PixelShaderPtr CreateSpritePS (ResourceManager &resource_manager)
 
VertexShaderPtr CreateTransformVS (ResourceManager &resource_manager)
 
template<typename... ConstructorArgsT>
VertexShaderPtr CreateVS (ResourceManager &resource_manager, ConstructorArgsT &&... args)
 
template<typename... ConstructorArgsT>
HullShaderPtr CreateHS (ResourceManager &resource_manager, ConstructorArgsT &&... args)
 
template<typename... ConstructorArgsT>
DomainShaderPtr CreateDS (ResourceManager &resource_manager, ConstructorArgsT &&... args)
 
template<typename... ConstructorArgsT>
GeometryShaderPtr CreateGS (ResourceManager &resource_manager, ConstructorArgsT &&... args)
 
template<typename... ConstructorArgsT>
PixelShaderPtr CreatePS (ResourceManager &resource_manager, ConstructorArgsT &&... args)
 
template<typename... ConstructorArgsT>
ComputeShaderPtr CreateCS (ResourceManager &resource_manager, ConstructorArgsT &&... args)
 
ComputeShaderPtr CreateAAPreprocessCS (ResourceManager &resource_manager)
 
ComputeShaderPtr CreateFXAACS (ResourceManager &resource_manager)
 
ComputeShaderPtr CreateMSAAResolveCS (ResourceManager &resource_manager)
 
ComputeShaderPtr CreateSSAAResolveCS (ResourceManager &resource_manager)
 
ComputeShaderPtr CreateDeferredEmissiveCS (ResourceManager &resource_manager)
 
ComputeShaderPtr CreateDeferredCS (ResourceManager &resource_manager, BRDF brdf, bool vct)
 
PixelShaderPtr CreateDeferredMSAAEmissivePS (ResourceManager &resource_manager)
 
PixelShaderPtr CreateDeferredMSAAPS (ResourceManager &resource_manager, BRDF brdf, bool vct)
 
VertexShaderPtr CreateDepthVS (ResourceManager &resource_manager)
 
VertexShaderPtr CreateDepthTransparentVS (ResourceManager &resource_manager)
 
PixelShaderPtr CreateDepthTransparentPS (ResourceManager &resource_manager)
 
PixelShaderPtr CreateFalseColorPS (ResourceManager &resource_manager, FalseColor false_color)
 
PixelShaderPtr CreateForwardEmissivePS (ResourceManager &resource_manager, bool transparency)
 
PixelShaderPtr CreateForwardPS (ResourceManager &resource_manager, BRDF brdf, bool transparency, bool vct, bool tsnm)
 
PixelShaderPtr CreateForwardSolidPS (ResourceManager &resource_manager)
 
ComputeShaderPtr CreateDepthOfFieldCS (ResourceManager &resource_manager)
 
ComputeShaderPtr CreateLowDynamicRangeCS (ResourceManager &resource_manager, ToneMapping tone_mapping)
 
VertexShaderPtr CreateLineCubeVS (ResourceManager &resource_manager)
 
PixelShaderPtr CreateLineCubePS (ResourceManager &resource_manager)
 
VertexShaderPtr CreateFarFullscreenTriangleVS (ResourceManager &resource_manager)
 
VertexShaderPtr CreateNearFullscreenTriangleVS (ResourceManager &resource_manager)
 
VertexShaderPtr CreateVoxelizationVS (ResourceManager &resource_manager)
 
GeometryShaderPtr CreateVoxelizationGS (ResourceManager &resource_manager)
 
PixelShaderPtr CreateVoxelizationEmissivePS (ResourceManager &resource_manager)
 
PixelShaderPtr CreateVoxelizationPS (ResourceManager &resource_manager, bool tsnm)
 
ComputeShaderPtr CreateVoxelizationCS (ResourceManager &resource_manager)
 
VertexShaderPtr CreateVoxelGridVS (ResourceManager &resource_manager)
 
GeometryShaderPtr CreateVoxelGridGS (ResourceManager &resource_manager)
 
PixelShaderPtr CreateVoxelGridPS (ResourceManager &resource_manager)
 
const U32x2 GetTexture2DSize (ID3D11ShaderResourceView &srv)
 
const U32x2 GetTexture2DSize (ID3D11Texture2D &texture) noexcept
 
TexturePtr CreateBlackTexture (ResourceManager &resource_manager)
 
TexturePtr CreateWhiteTexture (ResourceManager &resource_manager)
 
TexturePtr CreateRedTexture (ResourceManager &resource_manager)
 
TexturePtr CreateGreenTexture (ResourceManager &resource_manager)
 
TexturePtr CreateBlueTexture (ResourceManager &resource_manager)
 
TexturePtr CreateMAGETexture (ResourceManager &resource_manager)
 
TexturePtr CreateReferenceTexture (ResourceManager &resource_manager)
 
F32 FOVXFromFOVY (F32 aspect_ratio, F32 fov_y) noexcept
 
F32 FOVYFromFOVX (F32 aspect_ratio, F32 fov_x) noexcept
 
constexpr F32 AspectRatioFromWidthAndHeight (F32 width, F32 height) noexcept
 
F32 AspectRatioFromFOVs (F32 fov_x, F32 fov_y) noexcept
 
const XMMATRIX XM_CALLCONV GetViewportTransform (const U32x2 &resolution) noexcept
 

Variables

template<typename T >
constexpr bool is_shader_v = is_shader< T >::value
 

Typedef Documentation

◆ ComputeShader

using mage::rendering::ComputeShader = typedef Shader< ID3D11ComputeShader, Pipeline::CS >

A class of compute shaders.

◆ ComputeShaderPtr

A pointer to a compute shader resource.

◆ D3D11Device

using mage::rendering::D3D11Device = typedef ID3D11Device

The type of D3D11 device.

◆ D3D11DeviceContext

using mage::rendering::D3D11DeviceContext = typedef ID3D11DeviceContext

The type of D3D11 device context.

◆ DomainShader

using mage::rendering::DomainShader = typedef Shader< ID3D11DomainShader, Pipeline::DS >

A class of domain shaders.

◆ DomainShaderPtr

A pointer to a domain shader resource.

◆ DXGIAdapter

using mage::rendering::DXGIAdapter = typedef IDXGIAdapter

The type of DXGI adapter.

◆ DXGIOutput

using mage::rendering::DXGIOutput = typedef IDXGIOutput

The type of DXGI output.

◆ DXGISwapChain

using mage::rendering::DXGISwapChain = typedef IDXGISwapChain

The type of DXGI swap chain.

◆ GeometryShader

using mage::rendering::GeometryShader = typedef Shader< ID3D11GeometryShader, Pipeline::GS >

A class of geometry shaders.

◆ GeometryShaderPtr

A pointer to a geometry shader resource.

◆ HullShader

using mage::rendering::HullShader = typedef Shader< ID3D11HullShader, Pipeline::HS >

A class of hull shaders.

◆ HullShaderPtr

A pointer to a hull shader resource.

◆ ModelDescriptorPtr

A pointer to a model descriptor resource.

◆ PixelShader

using mage::rendering::PixelShader = typedef Shader< ID3D11PixelShader, Pipeline::PS >

A class of pixel shaders.

◆ PixelShaderPtr

A pointer to a pixel shader resource.

◆ SpriteFontPtr

A pointer to a sprite font resource.

◆ TexturePtr

using mage::rendering::TexturePtr = typedef SharedPtr< const Texture >

A pointer to a texture resource.

◆ VertexShaderPtr

A pointer to a vertex shader resource.

Enumeration Type Documentation

◆ AntiAliasing

Enumerator
None 
FXAA 
MSAA_2x 
MSAA_4x 
MSAA_8x 
SSAA_2x 
SSAA_3x 
SSAA_4x 

◆ BlendStateID

An enumeration of the different blend state identifiers.

This contains: Opaque, Alpha, Additive, Multiplicative, BiMultiplicative, Transparency and AlphaToCoverage.

Enumerator
Opaque 
Alpha 
Additive 
Multiplicative 
BiMultiplicative 
Transparency 
AlphaToCoverage 
Count 

◆ BRDF

enum mage::rendering::BRDF : U8
strong

An enumeration of the different Bidirectional Reflection Distribution Functions (BRDFs).

This contains: Lambertian, BlinnPhong, CookTorrance, and Frostbite.

Enumerator
Lambertian 
BlinnPhong 
CookTorrance 
Frostbite 

◆ DepthFormat

Enumerator
D16 
D32 

◆ DepthStencilStateID

An enumeration of the different depth stencil state identifiers.

This contains: DepthNone, GreaterEqualDepthReadWrite, GreaterEqualDepthRead, GreaterDepthReadWrite, GreaterDepthRead, LessEqualDepthReadWrite, LessEqualDepthRead, LessDepthReadWrite and LessDepthRead.

Enumerator
DepthNone 
GreaterEqualDepthReadWrite 
GreaterEqualDepthRead 
GreaterDepthReadWrite 
GreaterDepthRead 
LessEqualDepthReadWrite 
LessEqualDepthRead 
LessDepthReadWrite 
LessDepthRead 
Count 

◆ FalseColor

An enumeration of the different false colors.

This contains:

ConstantColor, ConstantColorTexture, BaseColor, BaseColorCoefficient, BaseColorTexture, Material, MaterialCoefficient, MaterialTexture, Roughness, RoughnessCoefficient, RoughnessTexture, Metalness, MetalnessCoefficient, MetalnessTexture, ShadingNormal, TSNMShadingNormal, Depth, Distance, and UV.

Enumerator
ConstantColor 
ConstantColorTexture 
BaseColor 
BaseColorCoefficient 
BaseColorTexture 
Material 
MaterialCoefficient 
MaterialTexture 
Roughness 
RoughnessCoefficient 
RoughnessTexture 
Metalness 
MetalnessCoefficient 
MetalnessTexture 
ShadingNormal 
TSNMShadingNormal 
Depth 
Distance 
UV 

◆ RasterizerStateID

An enumeration of the different rasterizer state identifiers.

This contains: NoCulling, ClockwiseCulling, CounterClockwiseCulling and Wireframe.

Enumerator
NoCulling 
ClockwiseCulling 
CounterClockwiseCulling 
Wireframe 
Count 

◆ RenderLayer

An enumeration of the different render layers.

This contains: None, Wireframe, and AABB.

Enumerator
None 
Wireframe 
AABB 

◆ RenderMode

An enumeration of the different render modes.

This contains: None, Forward, Deferred, Solid, VoxelGrid, FalseColor_BaseColor, FalseColor_BaseColorCoefficient, FalseColor_BaseColorTexture, FalseColor_Material, FalseColor_MaterialCoefficient, FalseColor_MaterialTexture, FalseColor_Roughness, FalseColor_RoughnessCoefficient, FalseColor_RoughnessTexture, FalseColor_Metalness, FalseColor_MetalnessCoefficient, FalseColor_MetalnessTexture, FalseColor_ShadingNormal, FalseColor_TSNMShadingNormal, FalseColor_Depth, FalseColor_Distance, and FalseColor_UV.

Enumerator
None 
Forward 
Deferred 
Solid 
VoxelGrid 
FalseColor_BaseColor 
FalseColor_BaseColorCoefficient 
FalseColor_BaseColorTexture 
FalseColor_Material 
FalseColor_MaterialCoefficient 
FalseColor_MaterialTexture 
FalseColor_Roughness 
FalseColor_RoughnessCoefficient 
FalseColor_RoughnessTexture 
FalseColor_Metalness 
FalseColor_MetalnessCoefficient 
FalseColor_MetalnessTexture 
FalseColor_ShadingNormal 
FalseColor_TSNMShadingNormal 
FalseColor_Depth 
FalseColor_Distance 
FalseColor_UV 

◆ SamplerStateID

An enumeration of the different sampler state identifiers.

This contains: PointWrap, PointClamp, PointMirror, LinearWrap, LinearClamp, LinearMirror, AnisotropicWrap, AnisotropicClamp, AnisotropicMirror and. PCF.

Enumerator
PointWrap 
PointClamp 
PointMirror 
LinearWrap 
LinearClamp 
LinearMirror 
AnisotropicWrap 
AnisotropicClamp 
AnisotropicMirror 
PCF 
Count 

◆ SpriteEffect

An enumeration of the different sprite effects.

This contains: None, MirrorX, MirrorY and MirrorXY.

Enumerator
None 
MirrorX 
MirrorY 
MirrorXY 

◆ SpriteSortMode

An enumeration of the different sprite sorting modes.

This contains: Deferred, Immediate, Texture, BackToFront and FrontToBack.

Enumerator
Deferred 
Immediate 
Texture 
BackToFront 
FrontToBack 

◆ ToneMapping

An enumeration of the different Tone Mapping functions.

This contains: None, ACESFilmic, Max3 Reinhard, and Uncharted.

Enumerator
None 
ACESFilmic 
Max3 
Reinhard 
Uncharted 

Function Documentation

◆ AspectRatioFromFOVs()

F32 mage::rendering::AspectRatioFromFOVs ( F32  fov_x,
F32  fov_y 
)
noexcept

Returns the aspect ratio corresponding to the given horizontal and vertical field-of-views.

Parameters
[in]fov_xThe horizontal field-of-view.
[in]fov_yThe vertical field-of-view.
Returns
The aspect ratio corresponding to the given horizontal and vertical field-of-views.

◆ AspectRatioFromWidthAndHeight()

constexpr F32 mage::rendering::AspectRatioFromWidthAndHeight ( F32  width,
F32  height 
)
noexcept

Returns the aspect ratio corresponding to the given width and height.

Parameters
[in]widthThe width.
[in]heightThe height.
Returns
The aspect ratio corresponding to the given width and height.

◆ CompileShaderFromFile()

HRESULT mage::rendering::CompileShaderFromFile ( std::wstring_view  fname,
std::string_view  entry_point,
std::string_view  shader_target,
NotNull< ID3DBlob **>  output_blob 
)

Compiles Microsoft High Level Shader Language (HLSL) code into bytecode for a given shader target.

Parameters
[in]fnameThe name of the file that contains the shader code.
[in]entry_pointThe name of the shader entry point function where shader execution begins.
[in]shader_targetThe shader target or set of shader features to compile against.
[out]output_blobA pointer to a variable that receives a pointer to the ID3DBlob interface that you can use to access the compiled code.

◆ CreateAAPreprocessCS()

ComputeShaderPtr mage::rendering::CreateAAPreprocessCS ( ResourceManager resource_manager)

Creates a AA preprocess compute shader.

Parameters
[in,out]resource_managerA reference to the resource manager.
Returns
A pointer to the AA preprocess compute shader.
Exceptions
ExceptionFailed to create the compute shader.

◆ CreateAdditiveBlendState()

HRESULT mage::rendering::CreateAdditiveBlendState ( ID3D11Device &  device,
NotNull< ID3D11BlendState **>  state 
)
noexcept

Creates an additive blend state.

The blend formula is defined as: (source.rgba × 1) + (destination.rgba × 1).

Parameters
[in,out]deviceA reference to the device.
[out]stateA pointer to a pointer to the blend state.
Returns
A success/error value.

◆ CreateAlphaBlendState()

HRESULT mage::rendering::CreateAlphaBlendState ( ID3D11Device &  device,
NotNull< ID3D11BlendState **>  state 
)
noexcept

Creates an alpha blend state.

The blend formula is defined as: (source.rgba × source.a) + (destination.rgba × (1-source.a)).

Parameters
[in,out]deviceA reference to the device.
[out]stateA pointer to a pointer to the blend state.
Returns
A success/error value.

◆ CreateAlphaToCoverageBlendState()

HRESULT mage::rendering::CreateAlphaToCoverageBlendState ( ID3D11Device &  device,
NotNull< ID3D11BlendState **>  state 
)
noexcept

Creates a alpha-to-coverage blend state.

Parameters
[in,out]deviceA reference to the device.
[out]stateA pointer to a pointer to the blend state.
Returns
A success/error value.

◆ CreateAnisotropicClampSamplerState()

HRESULT mage::rendering::CreateAnisotropicClampSamplerState ( ID3D11Device &  device,
NotNull< ID3D11SamplerState **>  state 
)
noexcept

Creates an anisotropic sampling state with clamping.

Parameters
[in,out]deviceA reference to the device.
[out]stateA pointer to a pointer to the sampler state.
Returns
A success/error value.

◆ CreateAnisotropicMirrorSamplerState()

HRESULT mage::rendering::CreateAnisotropicMirrorSamplerState ( ID3D11Device &  device,
NotNull< ID3D11SamplerState **>  state 
)
noexcept

Creates an anisotropic sampling state with mirroring.

Parameters
[in,out]deviceA reference to the device.
[out]stateA pointer to a pointer to the sampler state.
Returns
A success/error value.

◆ CreateAnisotropicWrapSamplerState()

HRESULT mage::rendering::CreateAnisotropicWrapSamplerState ( ID3D11Device &  device,
NotNull< ID3D11SamplerState **>  state 
)
noexcept

Creates an anisotropic sampling state with wrapping.

Parameters
[in,out]deviceA reference to the device.
[out]stateA pointer to a pointer to the sampler state.
Returns
A success/error value.

◆ CreateBackBufferPS()

PixelShaderPtr mage::rendering::CreateBackBufferPS ( ResourceManager resource_manager)

Creates a back buffer pixel shader.

Parameters
[in,out]resource_managerA reference to the resource manager.
Returns
A pointer to the back buffer pixel shader.
Exceptions
ExceptionFailed to create the pixel shader.

◆ CreateBiMultiplicativeBlendState()

HRESULT mage::rendering::CreateBiMultiplicativeBlendState ( ID3D11Device &  device,
NotNull< ID3D11BlendState **>  state 
)
noexcept

Creates a bi-multiplicative blend state.

The blend formula is defined as: (source.rgba × destination.rgba ) + (destination.rgba × source.rgba).

Parameters
[in,out]deviceA reference to the device.
[out]stateA pointer to a pointer to the blend state.
Returns
A success/error value.

◆ CreateBlackTexture()

TexturePtr mage::rendering::CreateBlackTexture ( ResourceManager resource_manager)

Creates a black texture.

Parameters
[in,out]resource_managerA reference to the resource manager.
Returns
A pointer to the texture.
Exceptions
ExceptionFailed to create the texture.

◆ CreateBlueTexture()

TexturePtr mage::rendering::CreateBlueTexture ( ResourceManager resource_manager)

Creates a blue texture.

Parameters
[in,out]resource_managerA reference to the resource manager.
Returns
A pointer to the texture.
Exceptions
ExceptionFailed to create the texture.

◆ CreateConsolasFont()

SpriteFontPtr mage::rendering::CreateConsolasFont ( ResourceManager resource_manager)

Creates a consolas sprite font.

Parameters
[in,out]resource_managerA reference to the resource manager.
Returns
A pointer to the sprite font.
Exceptions
ExceptionFailed to create the sprite font.

◆ CreateCS()

template<typename... ConstructorArgsT>
ComputeShaderPtr mage::rendering::CreateCS ( ResourceManager resource_manager,
ConstructorArgsT &&...  args 
)

Creates a compute shader.

Template Parameters
ConstructorArgsTThe constructor argument types of the compute shader.
Parameters
[in,out]resource_managerA reference to the resource manager.
[in]argsA reference to the constructor arguments for the compute shader.
Returns
A pointer to the compute shader.
Exceptions
ExceptionFailed to create the compute shader.

◆ CreateCullClockwiseRasterizerState()

HRESULT mage::rendering::CreateCullClockwiseRasterizerState ( ID3D11Device &  device,
NotNull< ID3D11RasterizerState **>  state,
S32  depth_bias = 0,
F32  slope_scaled_depth_bias = 0.0f,
F32  depth_bias_clamp = 0.0f 
)
noexcept

Creates a clockwise-culling (solid) rasterizer state.

Parameters
[in,out]deviceA reference to the device.
[out]stateA pointer to a pointer to the rasterizer state.
[in]depth_biasThe depth value added to a given pixel.
[in]slope_scaled_depth_biasThe scalar on a given pixel's slope.
[in]depth_bias_clampThe maximum depth bias of a pixel.
Returns
A success/error value.

◆ CreateCullCounterClockwiseRasterizerState()

HRESULT mage::rendering::CreateCullCounterClockwiseRasterizerState ( ID3D11Device &  device,
NotNull< ID3D11RasterizerState **>  state,
S32  depth_bias = 0,
F32  slope_scaled_depth_bias = 0.0f,
F32  depth_bias_clamp = 0.0f 
)
noexcept

Creates a counter-clockwise-culling (solid) rasterizer state.

Parameters
[in,out]deviceA reference to the device.
[out]stateA pointer to a pointer to the rasterizer state.
[in]depth_biasThe depth value added to a given pixel.
[in]slope_scaled_depth_biasThe scalar on a given pixel's slope.
[in]depth_bias_clampThe maximum depth bias of a pixel.
Returns
A success/error value.

◆ CreateCullNoneRasterizerState()

HRESULT mage::rendering::CreateCullNoneRasterizerState ( ID3D11Device &  device,
NotNull< ID3D11RasterizerState **>  state,
S32  depth_bias = 0,
F32  slope_scaled_depth_bias = 0.0f,
F32  depth_bias_clamp = 0.0f 
)
noexcept

Creates a no-culling (solid) rasterizer state.

Parameters
[in,out]deviceA reference to the device.
[out]stateA pointer to a pointer to the rasterizer state.
[in]depth_biasThe depth value added to a given pixel.
[in]slope_scaled_depth_biasThe scalar on a given pixel's slope.
[in]depth_bias_clampThe maximum depth bias of a pixel.
Returns
A success/error value.

◆ CreateDefaultMaterial()

const Material mage::rendering::CreateDefaultMaterial ( ResourceManager resource_manager)

Creates a default material.

Parameters
[in,out]resource_managerA reference to the resource manager.
Returns
The material.
Exceptions
ExceptionFailed to create the material.

◆ CreateDeferredCS()

ComputeShaderPtr mage::rendering::CreateDeferredCS ( ResourceManager resource_manager,
BRDF  brdf,
bool  vct 
)

Creates a deferred compute shader matching the given BRDF.

Parameters
[in,out]resource_managerA reference to the resource manager.
[in]brdfThe BRDF function.
[in]vcttrue if voxel cone tracing should be enabled. false otherwise.
Returns
A pointer to the deferred compute shader matching the given BRDF.
Exceptions
ExceptionFailed to create the compute shader.

◆ CreateDeferredEmissiveCS()

ComputeShaderPtr mage::rendering::CreateDeferredEmissiveCS ( ResourceManager resource_manager)

Creates a deferred emissive compute shader.

Parameters
[in,out]resource_managerA reference to the resource manager.
Returns
A pointer to the deferred emissive compute shader.
Exceptions
ExceptionFailed to create the compute shader.

◆ CreateDeferredMSAAEmissivePS()

PixelShaderPtr mage::rendering::CreateDeferredMSAAEmissivePS ( ResourceManager resource_manager)

Creates a deferred MSAA emissive pixel shader.

Parameters
[in,out]resource_managerA reference to the resource manager.
Returns
A pointer to the deferred MSAA emissive pixel shader.
Exceptions
ExceptionFailed to create the pixel shader.

◆ CreateDeferredMSAAPS()

PixelShaderPtr mage::rendering::CreateDeferredMSAAPS ( ResourceManager resource_manager,
BRDF  brdf,
bool  vct 
)

Creates a deferred MSAA pixel shader matching the given BRDF.

Parameters
[in,out]resource_managerA reference to the resource manager.
[in]brdfThe BRDF function.
[in]vcttrue if voxel cone tracing should be enabled. false otherwise.
Returns
A pointer to the deferred MSAA pixel shader matching the given BRDF.
Exceptions
ExceptionFailed to create the pixel shader.

◆ CreateDepthNoneDepthStencilState()

HRESULT mage::rendering::CreateDepthNoneDepthStencilState ( ID3D11Device &  device,
NotNull< ID3D11DepthStencilState **>  state 
)
noexcept

Creates a no-read-no-write depth stencil state.

Parameters
[in,out]deviceA reference to the device.
[out]stateA pointer to a pointer to the depth stencil state.
Returns
A success/error value.

◆ CreateDepthOfFieldCS()

ComputeShaderPtr mage::rendering::CreateDepthOfFieldCS ( ResourceManager resource_manager)

Creates a depth-of-field compute shader.

Parameters
[in,out]resource_managerA reference to the resource manager.
Returns
A pointer to the depth-of-field compute shader.
Exceptions
ExceptionFailed to create the compute shader.

◆ CreateDepthReadDepthStencilState()

HRESULT mage::rendering::CreateDepthReadDepthStencilState ( ID3D11Device &  device,
NotNull< ID3D11DepthStencilState **>  state,
D3D11_COMPARISON_FUNC  func 
)
noexcept

Creates a read-only depth stencil state.

Parameters
[in,out]deviceA reference to the device.
[out]stateA pointer to a pointer to the depth stencil state.
[in]funcThe depth comparison function.
Returns
A success/error value.

◆ CreateDepthReadWriteDepthStencilState()

HRESULT mage::rendering::CreateDepthReadWriteDepthStencilState ( ID3D11Device &  device,
NotNull< ID3D11DepthStencilState **>  state,
D3D11_COMPARISON_FUNC  func 
)
noexcept

Creates a read-write depth stencil state.

Parameters
[in,out]deviceA reference to the device.
[out]stateA pointer to a pointer to the depth stencil state.
[in]funcThe depth comparison function.
Returns
A success/error value.

◆ CreateDepthTransparentPS()

PixelShaderPtr mage::rendering::CreateDepthTransparentPS ( ResourceManager resource_manager)

Creates a depth transparent pixel shader.

Parameters
[in,out]resource_managerA reference to the resource manager.
Returns
A pointer to the depth transparent pixel shader.
Exceptions
ExceptionFailed to create the pixel shader.

◆ CreateDepthTransparentVS()

VertexShaderPtr mage::rendering::CreateDepthTransparentVS ( ResourceManager resource_manager)

Creates a depth transparent vertex shader.

Parameters
[in,out]resource_managerA reference to the resource manager.
Returns
A pointer to the depth transparent vertex shader.
Exceptions
ExceptionFailed to create the vertex shader.

◆ CreateDepthVS()

VertexShaderPtr mage::rendering::CreateDepthVS ( ResourceManager resource_manager)

Creates a depth vertex shader.

Parameters
[in,out]resource_managerA reference to the resource manager.
Returns
A pointer to the depth vertex shader.
Exceptions
ExceptionFailed to create the vertex shader.

◆ CreateDS()

template<typename... ConstructorArgsT>
DomainShaderPtr mage::rendering::CreateDS ( ResourceManager resource_manager,
ConstructorArgsT &&...  args 
)

Creates a domain shader.

Template Parameters
ConstructorArgsTThe constructor argument types of the domain shader.
Parameters
[in,out]resource_managerA reference to the resource manager.
[in]argsA reference to the constructor arguments for the domain shader.
Returns
A pointer to the domain shader.
Exceptions
ExceptionFailed to create the domain shader.

◆ CreateDynamicConstantBuffer() [1/2]

template<typename T >
HRESULT mage::rendering::CreateDynamicConstantBuffer ( ID3D11Device &  device,
NotNull< ID3D11Buffer ** >  buffer,
gsl::span< const T >  data 
)
noexcept

Creates a dynamic constant buffer.

Template Parameters
TThe data type.
Parameters
[in,out]deviceA reference to the device.
[out]bufferA pointer to a pointer to the buffer.
[in]dataThe data.
Returns
A success/error value.

◆ CreateDynamicConstantBuffer() [2/2]

template<typename T >
HRESULT mage::rendering::CreateDynamicConstantBuffer ( ID3D11Device &  device,
NotNull< ID3D11Buffer ** >  buffer,
std::size_t  nb_data_elements = 1u 
)
noexcept

Creates a dynamic constant buffer.

Template Parameters
TThe data type.
Parameters
[in,out]deviceA reference to the device.
[out]bufferA pointer to a pointer to the buffer.
[in]nb_data_elementsThe number of data elements.
Returns
A success/error value.

◆ CreateDynamicStructuredBuffer() [1/2]

template<typename T >
HRESULT mage::rendering::CreateDynamicStructuredBuffer ( ID3D11Device &  device,
NotNull< ID3D11Buffer ** >  buffer,
gsl::span< const T >  data 
)
noexcept

Creates a dynamic structured buffer.

Template Parameters
TThe data type.
Parameters
[in,out]deviceA reference to the device.
[out]bufferA pointer to a pointer to the buffer.
[in]dataThe data.
Returns
A success/error value.

◆ CreateDynamicStructuredBuffer() [2/2]

template<typename T >
HRESULT mage::rendering::CreateDynamicStructuredBuffer ( ID3D11Device &  device,
NotNull< ID3D11Buffer ** >  buffer,
std::size_t  nb_data_elements 
)
noexcept

Creates a dynamic structured buffer.

Template Parameters
TThe data type.
Parameters
[in,out]deviceA reference to the device.
[out]bufferA pointer to a pointer to the buffer.
[in]nb_data_elementsThe number of data elements.
Returns
A success/error value.

◆ CreateDynamicVertexBuffer() [1/2]

template<typename VertexT >
HRESULT mage::rendering::CreateDynamicVertexBuffer ( ID3D11Device &  device,
NotNull< ID3D11Buffer ** >  buffer,
gsl::span< const VertexT >  vertices 
)
noexcept

Creates a dynamic vertex buffer.

Template Parameters
VertexTThe vertex type.
Parameters
[in,out]deviceA reference to the device.
[out]bufferA pointer to a pointer to the buffer.
[in]verticesThe vertices.
Returns
A success/error value.

◆ CreateDynamicVertexBuffer() [2/2]

template<typename VertexT >
HRESULT mage::rendering::CreateDynamicVertexBuffer ( ID3D11Device &  device,
NotNull< ID3D11Buffer ** >  buffer,
std::size_t  nb_vertices 
)
noexcept

Creates a dynamic vertex buffer.

Template Parameters
VertexTThe vertex type.
Parameters
[in,out]deviceA reference to the device.
[out]bufferA pointer to a pointer to the buffer.
[in]nb_verticesThe number of vertices.
Returns
A success/error value.

◆ CreateFalseColorPS()

PixelShaderPtr mage::rendering::CreateFalseColorPS ( ResourceManager resource_manager,
FalseColor  false_color 
)

Creates a false color pixel shader.

Parameters
[in,out]resource_managerA reference to the resource manager.
[in]false_colorThe false color.
Returns
A pointer to the distance pixel shader.
Exceptions
ExceptionFailed to create the pixel shader.

◆ CreateFarFullscreenTriangleVS()

VertexShaderPtr mage::rendering::CreateFarFullscreenTriangleVS ( ResourceManager resource_manager)

Creates a far fullscreen triangle vertex shader.

Parameters
[in,out]resource_managerA reference to the resource manager.
Returns
A pointer to the far fullscreen triangle vertex shader.
Exceptions
ExceptionFailed to create the vertex shader.

◆ CreateForwardEmissivePS()

PixelShaderPtr mage::rendering::CreateForwardEmissivePS ( ResourceManager resource_manager,
bool  transparency 
)

Creates an forward emissive pixel shader.

Parameters
[in,out]resource_managerA reference to the resource manager.
[in]transparencytrue if transparency should be enabled. false otherwise.
Returns
A pointer to the forward emissive pixel shader.
Exceptions
ExceptionFailed to create the pixel shader.

◆ CreateForwardPS()

PixelShaderPtr mage::rendering::CreateForwardPS ( ResourceManager resource_manager,
BRDF  brdf,
bool  transparency,
bool  vct,
bool  tsnm 
)

Creates a forward pixel shader matching the given BRDF.

Parameters
[in,out]resource_managerA reference to the resource manager.
[in]brdfThe BRDF function.
[in]transparencytrue if transparency should be enabled. false otherwise.
[in]vcttrue if voxel cone tracing should be enabled. false otherwise.
[in]tsnmtrue if tangent space normal mapping should be enabled. false otherwise.
Returns
A pointer to the forward pixel shader matching the given BRDF.
Exceptions
ExceptionFailed to create the pixel shader.

◆ CreateForwardSolidPS()

PixelShaderPtr mage::rendering::CreateForwardSolidPS ( ResourceManager resource_manager)

Creates a forward solid pixel shader.

Parameters
[in,out]resource_managerA reference to the resource manager.
Returns
A pointer to the forward Lambertian pixel shader.
Exceptions
ExceptionFailed to create the pixel shader.

◆ CreateFXAACS()

ComputeShaderPtr mage::rendering::CreateFXAACS ( ResourceManager resource_manager)

Creates a FXAA compute shader.

Parameters
[in,out]resource_managerA reference to the resource manager.
Returns
A pointer to the FXAA compute shader.
Exceptions
ExceptionFailed to create the compute shader.

◆ CreateGBufferPS()

PixelShaderPtr mage::rendering::CreateGBufferPS ( ResourceManager resource_manager,
bool  tsnm 
)

Creates a GBuffer pixel shader.

Parameters
[in,out]resource_managerA reference to the resource manager.
[in]tsnmtrue if tangent space normal mapping should be enabled. false otherwise.
Returns
A pointer to the GBuffer pixel shader.
Exceptions
ExceptionFailed to create the pixel shader.

◆ CreateGreenTexture()

TexturePtr mage::rendering::CreateGreenTexture ( ResourceManager resource_manager)

Creates a green texture.

Parameters
[in,out]resource_managerA reference to the resource manager.
Returns
A pointer to the texture.
Exceptions
ExceptionFailed to create the texture.

◆ CreateGS()

template<typename... ConstructorArgsT>
GeometryShaderPtr mage::rendering::CreateGS ( ResourceManager resource_manager,
ConstructorArgsT &&...  args 
)

Creates a geometry shader.

Template Parameters
ConstructorArgsTThe constructor argument types of the geometry shader.
Parameters
[in,out]resource_managerA reference to the resource manager.
[in]argsA reference to the constructor arguments for the geometry shader.
Returns
A pointer to the geometry shader.
Exceptions
ExceptionFailed to create the geometry shader.

◆ CreateHS()

template<typename... ConstructorArgsT>
HullShaderPtr mage::rendering::CreateHS ( ResourceManager resource_manager,
ConstructorArgsT &&...  args 
)

Creates a hull shader.

Template Parameters
ConstructorArgsTThe constructor argument types of the hull shader.
Parameters
[in,out]resource_managerA reference to the resource manager.
[in]argsA reference to the constructor arguments for the hull shader.
Returns
A pointer to the hull shader.
Exceptions
ExceptionFailed to create the hull shader.

◆ CreateLinearClampSamplerState()

HRESULT mage::rendering::CreateLinearClampSamplerState ( ID3D11Device &  device,
NotNull< ID3D11SamplerState **>  state 
)
noexcept

Creates a linear sampling state with clamping.

Parameters
[in,out]deviceA reference to the device.
[out]stateA pointer to a pointer to the sampler state.
Returns
A success/error value.

◆ CreateLinearMirrorSamplerState()

HRESULT mage::rendering::CreateLinearMirrorSamplerState ( ID3D11Device &  device,
NotNull< ID3D11SamplerState **>  state 
)
noexcept

Creates a linear sampling state with mirroring.

Parameters
[in,out]deviceA reference to the device.
[out]stateA pointer to a pointer to the sampler state.
Returns
A success/error value.

◆ CreateLinearWrapSamplerState()

HRESULT mage::rendering::CreateLinearWrapSamplerState ( ID3D11Device &  device,
NotNull< ID3D11SamplerState **>  state 
)
noexcept

Creates a linear sampling state with wrapping.

Parameters
[in,out]deviceA reference to the device.
[out]stateA pointer to a pointer to the sampler state.
Returns
A success/error value.

◆ CreateLineCubePS()

PixelShaderPtr mage::rendering::CreateLineCubePS ( ResourceManager resource_manager)

Creates a line cube pixel shader.

Parameters
[in,out]resource_managerA reference to the resource manager.
Returns
A pointer to the line cube pixel shader.
Exceptions
ExceptionFailed to create the pixel shader.

◆ CreateLineCubeVS()

VertexShaderPtr mage::rendering::CreateLineCubeVS ( ResourceManager resource_manager)

Creates a line cube vertex shader.

Parameters
[in,out]resource_managerA reference to the resource manager.
Returns
A pointer to the line cube vertex shader.
Exceptions
ExceptionFailed to create the vertex shader.

◆ CreateLowDynamicRangeCS()

ComputeShaderPtr mage::rendering::CreateLowDynamicRangeCS ( ResourceManager resource_manager,
ToneMapping  tone_mapping 
)

Creates a low-dynamic-range compute shader.

Parameters
[in,out]resource_managerA reference to the resource manager.
[in]tone_mappingThe tone mapping function.
Returns
A pointer to the low-dynamic-range compute shader.
Exceptions
ExceptionFailed to create the compute shader.

◆ CreateMAGETexture()

TexturePtr mage::rendering::CreateMAGETexture ( ResourceManager resource_manager)

Creates a MAGE texture.

Parameters
[in,out]resource_managerA reference to the resource manager.
Returns
A pointer to the texture.
Exceptions
ExceptionFailed to create the texture.

◆ CreateMSAAResolveCS()

ComputeShaderPtr mage::rendering::CreateMSAAResolveCS ( ResourceManager resource_manager)

Creates a MSAA resolve compute shader.

Parameters
[in,out]resource_managerA reference to the resource manager.
Returns
A pointer to the MSAA resolve compute shader.
Exceptions
ExceptionFailed to create the compute shader.

◆ CreateMultiplicativeBlendState()

HRESULT mage::rendering::CreateMultiplicativeBlendState ( ID3D11Device &  device,
NotNull< ID3D11BlendState **>  state 
)
noexcept

Creates a multiplicative blend state.

The blend formula is defined as: (source.rgba × 0) + (destination.rgba × source.rgba).

Parameters
[in,out]deviceA reference to the device.
[out]stateA pointer to a pointer to the blend state.
Returns
A success/error value.

◆ CreateNearFullscreenTriangleVS()

VertexShaderPtr mage::rendering::CreateNearFullscreenTriangleVS ( ResourceManager resource_manager)

Creates a near fullscreen triangle vertex shader.

Parameters
[in,out]resource_managerA reference to the resource manager.
Returns
A pointer to the near fullscreen triangle vertex shader.
Exceptions
ExceptionFailed to create the vertex shader.

◆ CreateOpaqueBlendState()

HRESULT mage::rendering::CreateOpaqueBlendState ( ID3D11Device &  device,
NotNull< ID3D11BlendState **>  state 
)
noexcept

Creates an opaque blend state (i.e. no blending).

The blend formula (i.e. no blending) is defined as: (source.rgba × 1) + (destination.rgba × 0) = source.rgba.

Parameters
[in,out]deviceA reference to the device.
[out]stateA pointer to a pointer to the blend state.
Returns
A success/error value.

◆ CreatePCFSamplerState()

HRESULT mage::rendering::CreatePCFSamplerState ( ID3D11Device &  device,
NotNull< ID3D11SamplerState **>  state 
)
noexcept

Creates a PCF sampling state.

Parameters
[in,out]deviceA reference to the device.
[out]stateA pointer to a pointer to the sampler state.
Returns
A success/error value.

◆ CreatePointClampSamplerState()

HRESULT mage::rendering::CreatePointClampSamplerState ( ID3D11Device &  device,
NotNull< ID3D11SamplerState **>  state 
)
noexcept

Creates a point sampling state with clamping.

Parameters
[in,out]deviceA reference to the device.
[out]stateA pointer to a pointer to the sampler state.
Returns
A success/error value.

◆ CreatePointMirrorSamplerState()

HRESULT mage::rendering::CreatePointMirrorSamplerState ( ID3D11Device &  device,
NotNull< ID3D11SamplerState **>  state 
)
noexcept

Creates a point sampling state with mirroring.

Parameters
[in,out]deviceA reference to the device.
[out]stateA pointer to a pointer to the sampler state.
Returns
A success/error value.

◆ CreatePointWrapSamplerState()

HRESULT mage::rendering::CreatePointWrapSamplerState ( ID3D11Device &  device,
NotNull< ID3D11SamplerState **>  state 
)
noexcept

Creates a point sampling state with wrapping.

Parameters
[in,out]deviceA reference to the device.
[out]stateA pointer to a pointer to the sampler state.
Returns
A success/error value.

◆ CreatePS()

template<typename... ConstructorArgsT>
PixelShaderPtr mage::rendering::CreatePS ( ResourceManager resource_manager,
ConstructorArgsT &&...  args 
)

Creates a pixel shader.

Template Parameters
ConstructorArgsTThe constructor argument types of the pixel shader.
Parameters
[in,out]resource_managerA reference to the resource manager.
[in]argsA reference to the constructor arguments for the pixel shader.
Returns
A pointer to the pixel shader.
Exceptions
ExceptionFailed to create the pixel shader.

◆ CreateRasterizerState()

HRESULT mage::rendering::CreateRasterizerState ( ID3D11Device &  device,
NotNull< ID3D11RasterizerState **>  state,
D3D11_CULL_MODE  cull_mode,
D3D11_FILL_MODE  fill_mode,
S32  depth_bias = 0,
F32  slope_scaled_depth_bias = 0.0f,
F32  depth_bias_clamp = 0.0f 
)
noexcept

Creates a rasterizer state.

Parameters
[in,out]deviceA reference to the device.
[out]stateA pointer to a pointer to the rasterizer state.
[in]cull_modeThe cull mode of the rasterization.
[in]fill_modeThe fill mode of the rasterization.
[in]depth_biasThe depth value added to a given pixel.
[in]slope_scaled_depth_biasThe scalar on a given pixel's slope.
[in]depth_bias_clampThe maximum depth bias of a pixel.
Returns
A success/error value.

◆ CreateRedTexture()

TexturePtr mage::rendering::CreateRedTexture ( ResourceManager resource_manager)

Creates a red texture.

Parameters
[in,out]resource_managerA reference to the resource manager.
Returns
A pointer to the texture.
Exceptions
ExceptionFailed to create the texture.

◆ CreateReferenceTexture()

TexturePtr mage::rendering::CreateReferenceTexture ( ResourceManager resource_manager)

Creates a reference texture.

Parameters
[in,out]resource_managerA reference to the resource manager.
Returns
A pointer to the texture.
Exceptions
ExceptionFailed to create the texture.

◆ CreateSamplerState()

HRESULT mage::rendering::CreateSamplerState ( ID3D11Device &  device,
NotNull< ID3D11SamplerState **>  state,
D3D11_FILTER  filter,
D3D11_TEXTURE_ADDRESS_MODE  address_mode 
)
noexcept

Creates a sampling state.

Parameters
[in,out]deviceA reference to the device.
[out]stateA pointer to a pointer to the sampler state.
[in]filterThe filtering options during texture sampling.
[in]address_modeThe resolving of texture coordinates that are outside of the boundaries of a texture.
Returns
A success/error value.

◆ CreateSkyPS()

PixelShaderPtr mage::rendering::CreateSkyPS ( ResourceManager resource_manager)

Creates a sky pixel shader.

Parameters
[in,out]resource_managerA reference to the resource manager.
Returns
A pointer to the sky pixel shader.
Exceptions
ExceptionFailed to create the pixel shader.

◆ CreateSkyVS()

VertexShaderPtr mage::rendering::CreateSkyVS ( ResourceManager resource_manager)

Creates a sky vertex shader.

Parameters
[in,out]resource_managerA reference to the resource manager.
Returns
A pointer to the sky vertex shader.
Exceptions
ExceptionFailed to create the vertex shader.

◆ CreateSpritePS()

PixelShaderPtr mage::rendering::CreateSpritePS ( ResourceManager resource_manager)

Creates a sprite pixel shader.

Parameters
[in,out]resource_managerA reference to the resource manager.
Returns
A pointer to the sprite pixel shader.
Exceptions
ExceptionFailed to create the pixel shader.

◆ CreateSpriteVS()

VertexShaderPtr mage::rendering::CreateSpriteVS ( ResourceManager resource_manager)

Creates a sprite vertex shader.

Parameters
[in,out]resource_managerA reference to the resource manager.
Returns
A pointer to the sprite vertex shader.
Exceptions
ExceptionFailed to create the vertex shader.

◆ CreateSSAAResolveCS()

ComputeShaderPtr mage::rendering::CreateSSAAResolveCS ( ResourceManager resource_manager)

Creates a SSAA resolve compute shader.

Parameters
[in,out]resource_managerA reference to the resource manager.
Returns
A pointer to the SSAA resolve compute shader.
Exceptions
ExceptionFailed to create the compute shader.

◆ CreateStaticConstantBuffer()

template<typename T >
HRESULT mage::rendering::CreateStaticConstantBuffer ( ID3D11Device &  device,
NotNull< ID3D11Buffer ** >  buffer,
gsl::span< const T >  data 
)
noexcept

Creates a static constant buffer.

Template Parameters
TThe data type.
Parameters
[in,out]deviceA reference to the device.
[out]bufferA pointer to a pointer to the buffer.
[in]dataThe data.
Returns
A success/error value.

◆ CreateStaticIndexBuffer()

template<typename IndexT >
HRESULT mage::rendering::CreateStaticIndexBuffer ( ID3D11Device &  device,
NotNull< ID3D11Buffer ** >  buffer,
gsl::span< const IndexT >  indices 
)
noexcept

Creates a static index buffer.

Template Parameters
IndexTThe index type.
Parameters
[in,out]deviceA reference to the device.
[out]bufferA pointer to a pointer to the buffer.
[in]indicesThe indices.
Returns
A success/error value.

◆ CreateStaticStructuredBuffer()

template<typename T >
HRESULT mage::rendering::CreateStaticStructuredBuffer ( ID3D11Device &  device,
NotNull< ID3D11Buffer ** >  buffer,
gsl::span< const T >  data 
)
noexcept

Creates a static structured buffer.

Template Parameters
TThe data type.
Parameters
[in,out]deviceA reference to the device.
[out]bufferA pointer to a pointer to the buffer.
[in]dataThe data.
Returns
A success/error value.

◆ CreateStaticVertexBuffer()

template<typename VertexT >
HRESULT mage::rendering::CreateStaticVertexBuffer ( ID3D11Device &  device,
NotNull< ID3D11Buffer ** >  buffer,
gsl::span< const VertexT >  vertices 
)
noexcept

Creates a static vertex buffer.

Template Parameters
VertexTThe vertex type.
Parameters
[in,out]deviceA reference to the device.
[out]bufferA pointer to a pointer to the buffer.
[in]verticesThe vertices.
Returns
A success/error value.

◆ CreateTransformVS()

VertexShaderPtr mage::rendering::CreateTransformVS ( ResourceManager resource_manager)

Creates a transform vertex shader.

Parameters
[in,out]resource_managerA reference to the resource manager.
Returns
A pointer to the transform vertex shader.
Exceptions
ExceptionFailed to create the vertex shader.

◆ CreateTransparencyBlendState()

HRESULT mage::rendering::CreateTransparencyBlendState ( ID3D11Device &  device,
NotNull< ID3D11BlendState **>  state 
)
noexcept

Creates an transparency blend state.

The blend formula for the first RTV is defined as: (source.rgba × source.a) + (destination.rgba × (1-source.a)). The blend formula (i.e. no blending) for the remaining RTVs is defined as: (source.rgba × 1 ) + (destination.rgba × 0 ) = source.rgba.

Parameters
[in,out]deviceA reference to the device.
[out]stateA pointer to a pointer to the blend state.
Returns
A success/error value.

◆ CreateVoxelGridGS()

GeometryShaderPtr mage::rendering::CreateVoxelGridGS ( ResourceManager resource_manager)

Creates a voxel grid geometry shader.

Parameters
[in,out]resource_managerA reference to the resource manager.
Returns
A pointer to the voxelization geometry shader.
Exceptions
ExceptionFailed to create the geometry shader.

◆ CreateVoxelGridPS()

PixelShaderPtr mage::rendering::CreateVoxelGridPS ( ResourceManager resource_manager)

Creates a voxel grid pixel shader.

Parameters
[in,out]resource_managerA reference to the resource manager.
Returns
A pointer to the voxelization geometry shader.
Exceptions
ExceptionFailed to create the pixel shader.

◆ CreateVoxelGridVS()

VertexShaderPtr mage::rendering::CreateVoxelGridVS ( ResourceManager resource_manager)

Creates a voxel grid vertex shader.

Parameters
[in,out]resource_managerA reference to the resource manager.
Returns
A pointer to the voxelization geometry shader.
Exceptions
ExceptionFailed to create the vertex shader.

◆ CreateVoxelizationCS()

ComputeShaderPtr mage::rendering::CreateVoxelizationCS ( ResourceManager resource_manager)

Creates a voxelization compute shader.

Parameters
[in,out]resource_managerA reference to the resource manager.
Returns
A pointer to the voxelization geometry shader.
Exceptions
ExceptionFailed to create the compute shader.

◆ CreateVoxelizationEmissivePS()

PixelShaderPtr mage::rendering::CreateVoxelizationEmissivePS ( ResourceManager resource_manager)

Creates a voxelization emissive pixel shader.

Parameters
[in,out]resource_managerA reference to the resource manager.
Returns
A pointer to the voxelization emissive pixel shader.
Exceptions
ExceptionFailed to create the pixel shader.

◆ CreateVoxelizationGS()

GeometryShaderPtr mage::rendering::CreateVoxelizationGS ( ResourceManager resource_manager)

Creates a voxelization geometry shader.

Parameters
[in,out]resource_managerA reference to the resource manager.
Returns
A pointer to the voxelization geometry shader.
Exceptions
ExceptionFailed to create the geometry shader.

◆ CreateVoxelizationPS()

PixelShaderPtr mage::rendering::CreateVoxelizationPS ( ResourceManager resource_manager,
bool  tsnm 
)

Creates a voxelization pixel shader.

Parameters
[in,out]resource_managerA reference to the resource manager.
[in]tsnmtrue if tangent space normal mapping should be enabled. false otherwise.
Returns
A pointer to the voxelization pixel shader.
Exceptions
ExceptionFailed to create the pixel shader.

◆ CreateVoxelizationVS()

VertexShaderPtr mage::rendering::CreateVoxelizationVS ( ResourceManager resource_manager)

Creates a voxelization vertex shader.

Parameters
[in,out]resource_managerA reference to the resource manager.
Returns
A pointer to the voxelization geometry shader.
Exceptions
ExceptionFailed to create the vertex shader.

◆ CreateVS()

template<typename... ConstructorArgsT>
VertexShaderPtr mage::rendering::CreateVS ( ResourceManager resource_manager,
ConstructorArgsT &&...  args 
)

Creates a vertex shader.

Template Parameters
ConstructorArgsTThe constructor argument types of the vertex shader.
Parameters
[in,out]resource_managerA reference to the resource manager.
[in]argsA reference to the constructor arguments for the vertex shader.
Returns
A pointer to the vertex shader.
Exceptions
ExceptionFailed to create the vertex shader.

◆ CreateWhiteTexture()

TexturePtr mage::rendering::CreateWhiteTexture ( ResourceManager resource_manager)

Creates a white texture.

Parameters
[in,out]resource_managerA reference to the resource manager.
Returns
A pointer to the texture.
Exceptions
ExceptionFailed to create the texture.

◆ CreateWireframeRasterizerState()

HRESULT mage::rendering::CreateWireframeRasterizerState ( ID3D11Device &  device,
NotNull< ID3D11RasterizerState **>  state,
S32  depth_bias = 0,
F32  slope_scaled_depth_bias = 0.0f,
F32  depth_bias_clamp = 0.0f 
)
noexcept

Creates a wireframe rasterizer state.

Parameters
[in,out]deviceA reference to the device.
[out]stateA pointer to a pointer to the rasterizer state.
[in]depth_biasThe depth value added to a given pixel.
[in]slope_scaled_depth_biasThe scalar on a given pixel's slope.
[in]depth_bias_clampThe maximum depth bias of a pixel.
Returns
A success/error value.

◆ FOVXFromFOVY()

F32 mage::rendering::FOVXFromFOVY ( F32  aspect_ratio,
F32  fov_y 
)
noexcept

Returns the horizontal field-of-view corresponding to the given aspect ratio and vertical field-of-view.

Parameters
[in]aspect_ratioThe aspect ratio.
[in]fov_yThe vertical field-of-view.
Returns
The horizontal field-of-view corresponding to the given aspect ratio and vertical field-of-view.

◆ FOVYFromFOVX()

F32 mage::rendering::FOVYFromFOVX ( F32  aspect_ratio,
F32  fov_x 
)
noexcept

Returns the vertical field-of-view corresponding to the given aspect ratio and horizontal field-of-view.

Parameters
[in]aspect_ratioThe aspect ratio.
[in]fov_xThe horizontal field-of-view.
Returns
The vertical field-of-view corresponding to the given aspect ratio and horizontal field-of-view.

◆ GetIndexFormat()

template<typename IndexT >
constexpr DXGI_FORMAT mage::rendering::GetIndexFormat ( )
noexcept

Returns the format of the given index type.

Template Parameters
IndexTThe index type.
Returns
The format of the given index type.

◆ GetNumberOfGroups() [1/2]

U32 mage::rendering::GetNumberOfGroups ( F32  nb_threads,
U32  nb_group_threads 
)
noexcept

Returns the number of required groups given the number of threads and the number of threads per group.

Parameters
[in]nb_threadsThe total minimal number of threads.
[in]nb_group_threadsThe number of threads per group.
Returns
The number of required groups given the number of threads and the number of threads per group.

◆ GetNumberOfGroups() [2/2]

U32 mage::rendering::GetNumberOfGroups ( U32  nb_threads,
U32  nb_group_threads 
)
noexcept

Returns the number of required groups given the number of threads and the number of threads per group.

Parameters
[in]nb_threadsThe total minimal number of threads.
[in]nb_group_threadsThe number of threads per group.
Returns
The number of required groups given the number of threads and the number of threads per group.

◆ GetResolutionMultiplier()

constexpr U32 mage::rendering::GetResolutionMultiplier ( AntiAliasing  desc)
noexcept

◆ GetSampleMultiplier()

constexpr U32 mage::rendering::GetSampleMultiplier ( AntiAliasing  desc)
noexcept

◆ GetTexture2DSize() [1/2]

const U32x2 mage::rendering::GetTexture2DSize ( ID3D11ShaderResourceView &  texture_srv)

Returns the size of the given 2D texture.

Parameters
[in]texture_srvA reference to the (texture) shader resource view.
Returns
The size [width, height] of the given 2D texture.
Exceptions
ExceptionThe resource of the given shader resource view must be convertible to a ID3D11Texture2D.

◆ GetTexture2DSize() [2/2]

const U32x2 mage::rendering::GetTexture2DSize ( ID3D11Texture2D &  texture)
noexcept

Returns the size of the given 2D texture.

Parameters
[in]textureA reference to the 2D texture.
Returns
The size [width, height] of the given 2D texture.

◆ GetViewportTransform()

const XMMATRIX XM_CALLCONV mage::rendering::GetViewportTransform ( const U32x2 resolution)
noexcept

Returns the viewport transform for the given viewport.

Parameters
[in]resolutionThe resolution of the viewport.
Returns
The viewport transform for the given viewport.

◆ RetrieveAntiAliasing()

constexpr AntiAliasing mage::rendering::RetrieveAntiAliasing ( std::size_t  desc)
noexcept

Variable Documentation

◆ is_shader_v

template<typename T >
constexpr bool mage::rendering::is_shader_v = is_shader< T >::value