Castor3D 0.14.0
Multiplatform 3D engine
Fonctions membres publiques | Fonctions membres protégées | Attributs protégés | Liste de tous les membres
Référence de la classe castor3d::shader::ReflectionModelabstract

#include <GlslReflection.hpp>

Graphe d'héritage de castor3d::shader::ReflectionModel:
Inheritance graph
[légende]
Graphe de collaboration de castor3d::shader::ReflectionModel:
Collaboration graph
[légende]

Fonctions membres publiques

C3D_API ReflectionModel (sdw::ShaderWriter &writer, Utils &utils, bool hasIblSupport)
 
virtual C3D_API ~ReflectionModel ()=default
 
C3D_API sdw::RetVec3 computeIncident (sdw::Vec3 const &wsPosition, sdw::Vec3 const &wsCamera) const
 
C3D_API void computeCombined (BlendComponents &components, sdw::Vec3 const &incident, sdw::Vec3 const &position, BackgroundModel &background, sdw::CombinedImage2DRgba32 const &mippedScene, MatrixData const &matrices, sdw::Vec2 const &sceneUv, sdw::UInt const &envMapIndex, sdw::UInt const &hasReflection, sdw::Float const &refractionRatio, sdw::Vec3 &ambient, sdw::Vec3 &reflectedDiffuse, sdw::Vec3 &reflectedSpecular, sdw::Vec3 &refracted, sdw::Vec3 &coatReflected, sdw::Vec3 &sheenReflected)
 
C3D_API void computeCombined (BlendComponents &components, sdw::Vec3 const &incident, BackgroundModel &background, sdw::UInt const &envMapIndex, sdw::UInt const &hasReflection, sdw::Float const &refractionRatio, sdw::Vec3 &ambient, sdw::Vec3 &reflectedDiffuse, sdw::Vec3 &reflectedSpecular, sdw::Vec3 &refracted, sdw::Vec3 &coatReflected, sdw::Vec3 &sheenReflected)
 
C3D_API void computeReflections (BlendComponents &components, Surface const &surface, SceneData const &sceneData, BackgroundModel &background, sdw::UInt envMapIndex, sdw::UInt const &reflection, sdw::Vec3 &reflectedDiffuse, sdw::Vec3 &reflectedSpecular)
 
C3D_API sdw::Vec3 computeRefractions (BlendComponents &components, Surface const &surface, SceneData const &sceneData, BackgroundModel &background, sdw::UInt envMapIndex, sdw::UInt const &refraction, sdw::Float const &refractionRatio, sdw::Float const &transmission)
 
C3D_API sdw::RetVec4 computeScreenSpace (MatrixData const &matrixData, sdw::Vec3 const &viewPosition, sdw::Vec3 const &worldNormal, sdw::Vec2 const &texcoord, sdw::Vec4 const &ssrSettings, sdw::CombinedImage2DR32 const &depthMap, sdw::CombinedImage2DRgba32 const &normalMap, sdw::CombinedImage2DRgba32 const &colourMap)
 
sdw::RetBoolean traceScreenSpace (sdw::Vec3 csOrigin, sdw::Vec3 csDirection, sdw::Mat4 projectToPixelMatrix, sdw::CombinedImage2DR32 csZBuffer, sdw::Vec2 csZBufferSize, sdw::Float csZThickness, sdw::Boolean csZBufferIsHyperbolic, sdw::Vec3 clipInfo, sdw::Float nearPlaneZ, sdw::Float stride, sdw::Float jitterFraction, sdw::Float maxSteps, sdw::Float maxRayTraceDistance, sdw::Vec2 &hitPixel, sdw::Vec3 &csHitPoint)
 

Fonctions membres protégées

C3D_API sdw::RetVec3 doComputeRefrEnvMaps (sdw::Vec3 const &wsIncident, sdw::Vec3 const &wsNormal, sdw::CombinedImageCubeArrayRgba32 const &envMap, sdw::UInt const &envMapIndex, sdw::Float const &refractionRatio, sdw::Vec3 &albedo, sdw::Float const &roughness)
 

Attributs protégés

sdw::ShaderWriter & m_writer
 
Utilsm_utils
 
bool m_hasIblSupport
 
sdw::Function< sdw::Void, InOutBlendComponents, sdw::InVec3, sdw::InVec3, sdw::InCombinedImage2DRgba32, sdw::InVec2, sdw::InUInt, sdw::InUInt, sdw::InFloat, sdw::OutVec3, sdw::OutVec3, sdw::OutVec3, sdw::OutVec3, sdw::OutVec3, sdw::OutVec3 > m_computeForward
 
sdw::Function< sdw::Void, InOutBlendComponents, sdw::InVec3, sdw::InUInt, sdw::InUInt, sdw::InFloat, sdw::OutVec3, sdw::OutVec3, sdw::OutVec3, sdw::OutVec3, sdw::OutVec3, sdw::OutVec3 > m_computeDeferred
 
sdw::Function< sdw::Boolean, sdw::InVec3, sdw::InVec3, sdw::InMat4, sdw::InCombinedImage2DR32, sdw::InVec2, sdw::InFloat, sdw::InBoolean, sdw::InVec3, sdw::InFloat, sdw::InFloat, sdw::InFloat, sdw::InFloat, sdw::InFloat, sdw::OutVec2, sdw::OutVec3 > m_traceScreenSpace
 
sdw::Function< sdw::Vec4, sdw::InVec3, sdw::InVec3, sdw::InVec2, sdw::InVec4, sdw::InCombinedImage2DR32, sdw::InCombinedImage2DRgba32, sdw::InCombinedImage2DRgba32 > m_computeScreenSpace
 
sdw::Function< sdw::Void, sdw::InVec3, sdw::InVec3, sdw::InCombinedImageCubeArrayRgba32, sdw::InUInt, sdw::InVec3, sdw::InFloat, sdw::OutVec3, sdw::OutVec3 > m_computeReflEnvMaps
 
sdw::Function< sdw::Vec3, sdw::InVec3, sdw::InVec3, sdw::InCombinedImageCubeArrayRgba32, sdw::InUInt, sdw::InVec3, sdw::InFloat > m_computeSpecularReflEnvMaps
 
sdw::Function< sdw::Vec3, sdw::InVec3, sdw::InVec3, sdw::InCombinedImageCubeArrayRgba32, sdw::InUInt, sdw::InFloat > m_computeSheenReflEnvMaps
 
sdw::Function< sdw::Vec3, sdw::InVec3, sdw::InVec3, sdw::InCombinedImageCubeArrayRgba32, sdw::InUInt, sdw::InFloat, sdw::InVec3, sdw::InFloat > m_computeRefrEnvMaps
 
sdw::Function< sdw::Vec3, sdw::InVec3, sdw::InVec3, sdw::InVec3, sdw::InCombinedImage2DRgba32, sdw::InVec2, sdw::InFloat, sdw::InVec3, sdw::InVec3, sdw::InFloat, sdw::InFloat, sdw::InVec3, sdw::InFloat > m_computeRefrSceneMap
 

Documentation des constructeurs et destructeur

◆ ReflectionModel()

C3D_API castor3d::shader::ReflectionModel::ReflectionModel ( sdw::ShaderWriter &  writer,
Utils utils,
bool  hasIblSupport 
)

◆ ~ReflectionModel()

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

Documentation des fonctions membres

◆ computeCombined() [1/2]

C3D_API void castor3d::shader::ReflectionModel::computeCombined ( BlendComponents components,
sdw::Vec3 const &  incident,
BackgroundModel background,
sdw::UInt const &  envMapIndex,
sdw::UInt const &  hasReflection,
sdw::Float const &  refractionRatio,
sdw::Vec3 &  ambient,
sdw::Vec3 &  reflectedDiffuse,
sdw::Vec3 &  reflectedSpecular,
sdw::Vec3 &  refracted,
sdw::Vec3 &  coatReflected,
sdw::Vec3 &  sheenReflected 
)

◆ computeCombined() [2/2]

C3D_API void castor3d::shader::ReflectionModel::computeCombined ( BlendComponents components,
sdw::Vec3 const &  incident,
sdw::Vec3 const &  position,
BackgroundModel background,
sdw::CombinedImage2DRgba32 const &  mippedScene,
MatrixData const &  matrices,
sdw::Vec2 const &  sceneUv,
sdw::UInt const &  envMapIndex,
sdw::UInt const &  hasReflection,
sdw::Float const &  refractionRatio,
sdw::Vec3 &  ambient,
sdw::Vec3 &  reflectedDiffuse,
sdw::Vec3 &  reflectedSpecular,
sdw::Vec3 &  refracted,
sdw::Vec3 &  coatReflected,
sdw::Vec3 &  sheenReflected 
)

◆ computeIncident()

C3D_API sdw::RetVec3 castor3d::shader::ReflectionModel::computeIncident ( sdw::Vec3 const &  wsPosition,
sdw::Vec3 const &  wsCamera 
) const

◆ computeReflections()

C3D_API void castor3d::shader::ReflectionModel::computeReflections ( BlendComponents components,
Surface const &  surface,
SceneData const &  sceneData,
BackgroundModel background,
sdw::UInt  envMapIndex,
sdw::UInt const &  reflection,
sdw::Vec3 &  reflectedDiffuse,
sdw::Vec3 &  reflectedSpecular 
)

◆ computeRefractions()

C3D_API sdw::Vec3 castor3d::shader::ReflectionModel::computeRefractions ( BlendComponents components,
Surface const &  surface,
SceneData const &  sceneData,
BackgroundModel background,
sdw::UInt  envMapIndex,
sdw::UInt const &  refraction,
sdw::Float const &  refractionRatio,
sdw::Float const &  transmission 
)

◆ computeScreenSpace()

C3D_API sdw::RetVec4 castor3d::shader::ReflectionModel::computeScreenSpace ( MatrixData const &  matrixData,
sdw::Vec3 const &  viewPosition,
sdw::Vec3 const &  worldNormal,
sdw::Vec2 const &  texcoord,
sdw::Vec4 const &  ssrSettings,
sdw::CombinedImage2DR32 const &  depthMap,
sdw::CombinedImage2DRgba32 const &  normalMap,
sdw::CombinedImage2DRgba32 const &  colourMap 
)

◆ doComputeRefrEnvMaps()

C3D_API sdw::RetVec3 castor3d::shader::ReflectionModel::doComputeRefrEnvMaps ( sdw::Vec3 const &  wsIncident,
sdw::Vec3 const &  wsNormal,
sdw::CombinedImageCubeArrayRgba32 const &  envMap,
sdw::UInt const &  envMapIndex,
sdw::Float const &  refractionRatio,
sdw::Vec3 &  albedo,
sdw::Float const &  roughness 
)
protected

◆ traceScreenSpace()

sdw::RetBoolean castor3d::shader::ReflectionModel::traceScreenSpace ( sdw::Vec3  csOrigin,
sdw::Vec3  csDirection,
sdw::Mat4  projectToPixelMatrix,
sdw::CombinedImage2DR32  csZBuffer,
sdw::Vec2  csZBufferSize,
sdw::Float  csZThickness,
sdw::Boolean  csZBufferIsHyperbolic,
sdw::Vec3  clipInfo,
sdw::Float  nearPlaneZ,
sdw::Float  stride,
sdw::Float  jitterFraction,
sdw::Float  maxSteps,
sdw::Float  maxRayTraceDistance,
sdw::Vec2 &  hitPixel,
sdw::Vec3 &  csHitPoint 
)
Paramètres
csOriginCamera-space ray origin, which must be within the view volume and must have z < -0.01 and project within the valid screen rectangle.
csDirectionUnit length camera-space ray direction.
projectToPixelMatrixA projection matrix that maps to pixel coordinates (not [-1, +1] normalized device coordinates).
csZBufferThe depth or camera-space Z buffer, depending on the value of csZBufferIsHyperbolic.
csZBufferSizeDimensions of csZBuffer.
csZThicknessCamera space thickness to ascribe to each pixel in the depth buffer.
csZBufferIsHyperbolicTrue if csZBuffer is an OpenGL depth buffer, false (faster) if csZBuffer contains (negative) "linear" camera space z values. Const so that the compiler can evaluate the branch based on it at compile time.
clipInfoSee G3D::Camera documentation.
nearPlaneZNegative number.
strideStep in horizontal or vertical pixels between samples. This is a float because integer math is slow on GPUs, but should be set to an integer >= 1.
jitterFractionNumber between 0 and 1 for how far to bump the ray in stride units to conceal banding artifacts.
maxStepsMaximum number of iterations. Higher gives better images but may be slow.
maxRayTraceDistanceMaximum camera-space distance to trace before returning a miss.
hitPixelPixel coordinates of the first intersection with the scene.
csHitPointCamera space location of the ray hit.

Documentation des données membres

◆ m_computeDeferred

sdw::Function< sdw::Void , InOutBlendComponents , sdw::InVec3 , sdw::InUInt , sdw::InUInt , sdw::InFloat , sdw::OutVec3 , sdw::OutVec3 , sdw::OutVec3 , sdw::OutVec3 , sdw::OutVec3 , sdw::OutVec3 > castor3d::shader::ReflectionModel::m_computeDeferred
protected

◆ m_computeForward

sdw::Function< sdw::Void , InOutBlendComponents , sdw::InVec3 , sdw::InVec3 , sdw::InCombinedImage2DRgba32 , sdw::InVec2 , sdw::InUInt , sdw::InUInt , sdw::InFloat , sdw::OutVec3 , sdw::OutVec3 , sdw::OutVec3 , sdw::OutVec3 , sdw::OutVec3 , sdw::OutVec3 > castor3d::shader::ReflectionModel::m_computeForward
protected

◆ m_computeReflEnvMaps

sdw::Function< sdw::Void , sdw::InVec3 , sdw::InVec3 , sdw::InCombinedImageCubeArrayRgba32 , sdw::InUInt , sdw::InVec3 , sdw::InFloat , sdw::OutVec3 , sdw::OutVec3 > castor3d::shader::ReflectionModel::m_computeReflEnvMaps
protected

◆ m_computeRefrEnvMaps

sdw::Function< sdw::Vec3 , sdw::InVec3 , sdw::InVec3 , sdw::InCombinedImageCubeArrayRgba32 , sdw::InUInt , sdw::InFloat , sdw::InVec3 , sdw::InFloat > castor3d::shader::ReflectionModel::m_computeRefrEnvMaps
protected

◆ m_computeRefrSceneMap

sdw::Function< sdw::Vec3 , sdw::InVec3 , sdw::InVec3 , sdw::InVec3 , sdw::InCombinedImage2DRgba32 , sdw::InVec2 , sdw::InFloat , sdw::InVec3 , sdw::InVec3 , sdw::InFloat , sdw::InFloat , sdw::InVec3 , sdw::InFloat > castor3d::shader::ReflectionModel::m_computeRefrSceneMap
protected

◆ m_computeScreenSpace

sdw::Function< sdw::Vec4 , sdw::InVec3 , sdw::InVec3 , sdw::InVec2 , sdw::InVec4 , sdw::InCombinedImage2DR32 , sdw::InCombinedImage2DRgba32 , sdw::InCombinedImage2DRgba32 > castor3d::shader::ReflectionModel::m_computeScreenSpace
protected

◆ m_computeSheenReflEnvMaps

sdw::Function< sdw::Vec3 , sdw::InVec3 , sdw::InVec3 , sdw::InCombinedImageCubeArrayRgba32 , sdw::InUInt , sdw::InFloat > castor3d::shader::ReflectionModel::m_computeSheenReflEnvMaps
protected

◆ m_computeSpecularReflEnvMaps

sdw::Function< sdw::Vec3 , sdw::InVec3 , sdw::InVec3 , sdw::InCombinedImageCubeArrayRgba32 , sdw::InUInt , sdw::InVec3 , sdw::InFloat > castor3d::shader::ReflectionModel::m_computeSpecularReflEnvMaps
protected

◆ m_hasIblSupport

bool castor3d::shader::ReflectionModel::m_hasIblSupport
protected

◆ m_traceScreenSpace

sdw::Function< sdw::Boolean , sdw::InVec3 , sdw::InVec3 , sdw::InMat4 , sdw::InCombinedImage2DR32 , sdw::InVec2 , sdw::InFloat , sdw::InBoolean , sdw::InVec3 , sdw::InFloat , sdw::InFloat , sdw::InFloat , sdw::InFloat , sdw::InFloat , sdw::OutVec2 , sdw::OutVec3 > castor3d::shader::ReflectionModel::m_traceScreenSpace
protected

◆ m_utils

Utils& castor3d::shader::ReflectionModel::m_utils
protected

◆ m_writer

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

La documentation de cette classe a été générée à partir du fichier suivant :