Castor3D 0.16.0
Multiplatform 3D engine
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
castor3d::shader::BackgroundModel Class Reference

#include <GlslBackground.hpp>

Inheritance diagram for castor3d::shader::BackgroundModel:
Inheritance graph
[legend]
Collaboration diagram for castor3d::shader::BackgroundModel:
Collaboration graph
[legend]

Public Member Functions

C3D_API BackgroundModel (sdw::ShaderWriter &writer, Utils &utils, VkExtent2D targetSize)
 
virtual C3D_API ~BackgroundModel ()=default
 
virtual C3D_API void computeReflections (sdw::Vec3 const &wsNormal, sdw::Vec3 const &difF, sdw::Vec3 const &spcF, sdw::Vec3 const &V, sdw::Float const &NdotV, BlendComponents &components, sdw::CombinedImage2DRgba32 const &brdf, sdw::Vec3 &reflectedDiffuse, sdw::Vec3 &reflectedSpecular)
 
virtual C3D_API sdw::RetVec3 computeDiffuseReflections (sdw::Vec3 const &albedo, sdw::Vec3 const &wsNormal, sdw::Vec3 const &fresnel, sdw::Float const &metalness)
 
virtual C3D_API sdw::RetVec3 computeSpecularReflections (sdw::Vec3 const &fresnel, sdw::Vec3 const &wsNormal, sdw::Vec3 const &V, sdw::Float const &NdotV, sdw::Float const &roughness, sdw::CombinedImage2DRgba32 const &brdf)
 
virtual C3D_API sdw::RetVec3 computeSheenReflections (sdw::Vec3 const &wsNormal, sdw::Vec3 const &V, sdw::Float const &NdotV, BlendComponents &components, sdw::CombinedImage2DRgba32 const &brdf)
 
virtual C3D_API sdw::RetVec3 computeRefractions (sdw::Vec3 const &wsNormal, sdw::Vec3 const &V, sdw::Float const &refractionRatio, BlendComponents &components)
 
virtual C3D_API sdw::RetVec3 computeSpecularRefractions (sdw::Vec3 const &fresnel, sdw::Vec3 const &wsNormal, sdw::Vec3 const &V, sdw::Float const &NdotV, sdw::Float const &roughness, sdw::Float const &refractionRatio, BlendComponents &components, sdw::CombinedImage2DRgba32 const &brdf)
 
virtual C3D_API void applyVolume (sdw::Vec2 const fragCoord, sdw::Float const linearDepth, sdw::Vec2 const targetSize, sdw::Vec2 const cameraPlanes, sdw::Vec4 &output)
 
C3D_API sdw::Vec3 getBrdf (sdw::CombinedImage2DRgba32 const &brdfMap, sdw::Float const &NdotV, sdw::Float const &roughness) const
 
VkExtent2D const & getTargetSize () const
 

Static Public Member Functions

static C3D_API BackgroundModelPtr createModel (Scene const &scene, sdw::ShaderWriter &writer, Utils &utils, VkExtent2D targetSize, bool needsForeground, uint32_t &binding, uint32_t set)
 

Protected Attributes

sdw::ShaderWriter & m_writer
 
Utilsm_utils
 
VkExtent2D m_targetSize
 

Constructor & Destructor Documentation

◆ BackgroundModel()

C3D_API castor3d::shader::BackgroundModel::BackgroundModel ( sdw::ShaderWriter & writer,
Utils & utils,
VkExtent2D targetSize )

◆ ~BackgroundModel()

virtual C3D_API castor3d::shader::BackgroundModel::~BackgroundModel ( )
virtualdefault

Member Function Documentation

◆ applyVolume()

virtual C3D_API void castor3d::shader::BackgroundModel::applyVolume ( sdw::Vec2 const fragCoord,
sdw::Float const linearDepth,
sdw::Vec2 const targetSize,
sdw::Vec2 const cameraPlanes,
sdw::Vec4 & output )
virtual

◆ computeDiffuseReflections()

virtual C3D_API sdw::RetVec3 castor3d::shader::BackgroundModel::computeDiffuseReflections ( sdw::Vec3 const & albedo,
sdw::Vec3 const & wsNormal,
sdw::Vec3 const & fresnel,
sdw::Float const & metalness )
virtual

◆ computeReflections()

virtual C3D_API void castor3d::shader::BackgroundModel::computeReflections ( sdw::Vec3 const & wsNormal,
sdw::Vec3 const & difF,
sdw::Vec3 const & spcF,
sdw::Vec3 const & V,
sdw::Float const & NdotV,
BlendComponents & components,
sdw::CombinedImage2DRgba32 const & brdf,
sdw::Vec3 & reflectedDiffuse,
sdw::Vec3 & reflectedSpecular )
virtual

◆ computeRefractions()

virtual C3D_API sdw::RetVec3 castor3d::shader::BackgroundModel::computeRefractions ( sdw::Vec3 const & wsNormal,
sdw::Vec3 const & V,
sdw::Float const & refractionRatio,
BlendComponents & components )
virtual

◆ computeSheenReflections()

virtual C3D_API sdw::RetVec3 castor3d::shader::BackgroundModel::computeSheenReflections ( sdw::Vec3 const & wsNormal,
sdw::Vec3 const & V,
sdw::Float const & NdotV,
BlendComponents & components,
sdw::CombinedImage2DRgba32 const & brdf )
virtual

◆ computeSpecularReflections()

virtual C3D_API sdw::RetVec3 castor3d::shader::BackgroundModel::computeSpecularReflections ( sdw::Vec3 const & fresnel,
sdw::Vec3 const & wsNormal,
sdw::Vec3 const & V,
sdw::Float const & NdotV,
sdw::Float const & roughness,
sdw::CombinedImage2DRgba32 const & brdf )
virtual

◆ computeSpecularRefractions()

virtual C3D_API sdw::RetVec3 castor3d::shader::BackgroundModel::computeSpecularRefractions ( sdw::Vec3 const & fresnel,
sdw::Vec3 const & wsNormal,
sdw::Vec3 const & V,
sdw::Float const & NdotV,
sdw::Float const & roughness,
sdw::Float const & refractionRatio,
BlendComponents & components,
sdw::CombinedImage2DRgba32 const & brdf )
virtual

◆ createModel()

static C3D_API BackgroundModelPtr castor3d::shader::BackgroundModel::createModel ( Scene const & scene,
sdw::ShaderWriter & writer,
Utils & utils,
VkExtent2D targetSize,
bool needsForeground,
uint32_t & binding,
uint32_t set )
static

◆ getBrdf()

C3D_API sdw::Vec3 castor3d::shader::BackgroundModel::getBrdf ( sdw::CombinedImage2DRgba32 const & brdfMap,
sdw::Float const & NdotV,
sdw::Float const & roughness ) const

◆ getTargetSize()

VkExtent2D const & castor3d::shader::BackgroundModel::getTargetSize ( ) const
inline

References m_targetSize.

Member Data Documentation

◆ m_targetSize

VkExtent2D castor3d::shader::BackgroundModel::m_targetSize
protected

Referenced by getTargetSize().

◆ m_utils

Utils& castor3d::shader::BackgroundModel::m_utils
protected

◆ m_writer

sdw::ShaderWriter& castor3d::shader::BackgroundModel::m_writer
protected

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