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

#include <GlslBlendComponents.hpp>

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

Public Member Functions

 BlendComponents (sdw::ShaderWriter &writer, sdw::expr::ExprPtr expr, bool enabled)
 
 BlendComponents (Materials const &materials, Material const &material, SurfaceBase const &surface)
 
 BlendComponents (Materials const &materials, Material const &material, DerivSurfaceBase const &surface)
 
 BlendComponents (Materials const &materials, Material const &material, SurfaceBase const &surface, sdw::Vec4 const &clrCot)
 
 BlendComponents (Materials const &materials, Material const &material, DerivSurfaceBase const &surface, sdw::Vec4 const &clrCot)
 
 BlendComponents (Materials const &materials, bool zeroInit=false)
 
 SDW_DeclStructInstance (, BlendComponents)
 
void finish (PassShaders const &passShaders, DerivSurfaceBase const &surface, Utils &utils, sdw::Vec3 const worldEye)
 
void setNormal (sdw::Vec3 const v)
 
void normalizeNormal ()
 
sdw::Vec3 getRawNormal () const
 
sdw::Vec4 getRawTangent () const
 
sdw::Vec3 getRawBitangent () const
 
shader::DerivVec3 getDerivNormal () const
 
shader::DerivVec4 getDerivTangent () const
 
shader::DerivVec3 getDerivBitangent () const
 
bool usesDerivativeValues () const noexcept
 

Static Public Member Functions

static ast::type::BaseStructPtr makeType (ast::type::TypesCache &cache, Materials const &materials, bool zeroInit, sdw::expr::ExprList &inits)
 
static ast::type::BaseStructPtr makeType (ast::type::TypesCache &cache, Materials const &materials, Material const &material, sdw::StructInstance const &surface, sdw::Vec4 const *clrCot, sdw::expr::ExprList &inits)
 
static ast::type::BaseStructPtr makeType (ast::type::TypesCache &cache, BlendComponents const &rhs)
 
static ast::type::BaseStructPtr makeType (ast::type::TypesCache &cache, Materials const &materials, bool zeroInit=false)
 
static ast::type::BaseStructPtr makeType (ast::type::TypesCache &cache, Materials const &materials, Material const &material, sdw::StructInstance const &surface, sdw::Vec4 const *clrCot)
 
static sdw::Float computeRoughnessFromGlossiness (sdw::Float const &glossiness)
 
static sdw::Float computeGlossinessFromRoughness (sdw::Float const &roughness)
 
static sdw::Float computeGlossinessFromShininess (sdw::Float const &shininess)
 
static sdw::Float computeShininessFromGlossiness (sdw::Float const &glossiness)
 
static sdw::Float computeRoughnessFromShininess (sdw::Float const &shininess)
 
static sdw::Float computeShininessFromRoughness (sdw::Float const &roughness)
 

Public Attributes

sdw::DefaultedT< sdw::Vec3 > f0
 
sdw::DefaultedT< sdw::Vec3 > f90
 
sdw::DefaultedT< sdw::Vec3 > colour
 
sdw::DefaultedT< sdw::Vec3 > emissiveColour
 
sdw::DefaultedT< sdw::Float > emissiveFactor
 
sdw::DefaultedT< sdw::Vec3 > ambientColour
 
sdw::DefaultedT< sdw::Float > ambientFactor
 
sdw::DefaultedT< sdw::Float > transmission
 
sdw::DefaultedT< sdw::UInt > hasTransmission
 
sdw::DefaultedT< sdw::Float > opacity
 
sdw::DefaultedT< sdw::UInt > bwAccumulationOperator
 
sdw::DefaultedT< sdw::Float > alphaRef
 
sdw::DefaultedT< sdw::Float > occlusion
 
sdw::DefaultedT< sdw::Float > transmittance
 
sdw::DefaultedT< sdw::Float > refractionRatio
 
sdw::DefaultedT< sdw::UInt > hasRefraction
 
sdw::DefaultedT< sdw::UInt > hasReflection
 
sdw::DefaultedT< sdw::Float > metalness
 
sdw::DefaultedT< sdw::Float > roughness
 
sdw::DefaultedT< sdw::Float > thicknessFactor
 
sdw::DefaultedT< sdw::Float > attenuationDistance
 
sdw::DefaultedT< sdw::Vec3 > attenuationColour
 
sdw::DefaultedT< sdw::Float > clearcoatFactor
 
sdw::DefaultedT< sdw::Vec3 > clearcoatNormal
 
sdw::DefaultedT< sdw::Float > clearcoatRoughness
 
sdw::DefaultedT< sdw::Vec3 > sheenFactor
 
sdw::DefaultedT< sdw::Float > sheenRoughness
 
sdw::DefaultedT< sdw::Float > iridescenceFactor
 
sdw::DefaultedT< sdw::Float > iridescenceThickness
 
sdw::DefaultedT< sdw::Float > iridescenceIor
 
sdw::DefaultedT< sdw::Vec3 > iridescenceFresnel
 
sdw::DefaultedT< sdw::Vec3 > iridescenceF0
 
sdw::Float const shininess
 
sdw::DefaultedT< sdw::Vec3 > specular
 

Static Protected Member Functions

static void fillType (ast::type::BaseStruct &type, Materials const &materials, sdw::expr::ExprList &inits)
 
static void fillType (ast::type::BaseStruct &type, Materials const &materials, Material const &material, sdw::StructInstance const &surface, sdw::Vec4 const *clrCot, sdw::expr::ExprList &inits)
 
static void fillInit (sdw::type::BaseStruct const &components, Materials const &materials, sdw::expr::ExprList &inits)
 
static void fillInit (sdw::type::BaseStruct const &components, Materials const &materials, Material const &material, sdw::StructInstance const &surface, sdw::Vec4 const *clrCot, sdw::expr::ExprList &inits)
 
static sdw::expr::ExprPtr makeInit (Materials const &materials, bool zeroInit)
 
static sdw::expr::ExprPtr makeInit (Materials const &materials, Material const &material, sdw::StructInstance const &surface, sdw::Vec4 const *clrCot)
 

Constructor & Destructor Documentation

◆ BlendComponents() [1/6]

castor3d::shader::BlendComponents::BlendComponents ( sdw::ShaderWriter & writer,
sdw::expr::ExprPtr expr,
bool enabled )

◆ BlendComponents() [2/6]

castor3d::shader::BlendComponents::BlendComponents ( Materials const & materials,
Material const & material,
SurfaceBase const & surface )

◆ BlendComponents() [3/6]

castor3d::shader::BlendComponents::BlendComponents ( Materials const & materials,
Material const & material,
DerivSurfaceBase const & surface )

◆ BlendComponents() [4/6]

castor3d::shader::BlendComponents::BlendComponents ( Materials const & materials,
Material const & material,
SurfaceBase const & surface,
sdw::Vec4 const & clrCot )

◆ BlendComponents() [5/6]

castor3d::shader::BlendComponents::BlendComponents ( Materials const & materials,
Material const & material,
DerivSurfaceBase const & surface,
sdw::Vec4 const & clrCot )

◆ BlendComponents() [6/6]

castor3d::shader::BlendComponents::BlendComponents ( Materials const & materials,
bool zeroInit = false )

Member Function Documentation

◆ computeGlossinessFromRoughness()

static sdw::Float castor3d::shader::BlendComponents::computeGlossinessFromRoughness ( sdw::Float const & roughness)
static

◆ computeGlossinessFromShininess()

static sdw::Float castor3d::shader::BlendComponents::computeGlossinessFromShininess ( sdw::Float const & shininess)
static

◆ computeRoughnessFromGlossiness()

static sdw::Float castor3d::shader::BlendComponents::computeRoughnessFromGlossiness ( sdw::Float const & glossiness)
static

◆ computeRoughnessFromShininess()

static sdw::Float castor3d::shader::BlendComponents::computeRoughnessFromShininess ( sdw::Float const & shininess)
inlinestatic

◆ computeShininessFromGlossiness()

static sdw::Float castor3d::shader::BlendComponents::computeShininessFromGlossiness ( sdw::Float const & glossiness)
static

◆ computeShininessFromRoughness()

static sdw::Float castor3d::shader::BlendComponents::computeShininessFromRoughness ( sdw::Float const & roughness)
inlinestatic

◆ fillInit() [1/2]

static void castor3d::shader::BlendComponents::fillInit ( sdw::type::BaseStruct const & components,
Materials const & materials,
Material const & material,
sdw::StructInstance const & surface,
sdw::Vec4 const * clrCot,
sdw::expr::ExprList & inits )
staticprotected

◆ fillInit() [2/2]

static void castor3d::shader::BlendComponents::fillInit ( sdw::type::BaseStruct const & components,
Materials const & materials,
sdw::expr::ExprList & inits )
staticprotected

◆ fillType() [1/2]

static void castor3d::shader::BlendComponents::fillType ( ast::type::BaseStruct & type,
Materials const & materials,
Material const & material,
sdw::StructInstance const & surface,
sdw::Vec4 const * clrCot,
sdw::expr::ExprList & inits )
staticprotected

◆ fillType() [2/2]

static void castor3d::shader::BlendComponents::fillType ( ast::type::BaseStruct & type,
Materials const & materials,
sdw::expr::ExprList & inits )
staticprotected

◆ finish()

void castor3d::shader::BlendComponents::finish ( PassShaders const & passShaders,
DerivSurfaceBase const & surface,
Utils & utils,
sdw::Vec3 const worldEye )

◆ getDerivBitangent()

shader::DerivVec3 castor3d::shader::BlendComponents::getDerivBitangent ( ) const

◆ getDerivNormal()

shader::DerivVec3 castor3d::shader::BlendComponents::getDerivNormal ( ) const

◆ getDerivTangent()

shader::DerivVec4 castor3d::shader::BlendComponents::getDerivTangent ( ) const

◆ getRawBitangent()

sdw::Vec3 castor3d::shader::BlendComponents::getRawBitangent ( ) const

◆ getRawNormal()

sdw::Vec3 castor3d::shader::BlendComponents::getRawNormal ( ) const

◆ getRawTangent()

sdw::Vec4 castor3d::shader::BlendComponents::getRawTangent ( ) const

◆ makeInit() [1/2]

static sdw::expr::ExprPtr castor3d::shader::BlendComponents::makeInit ( Materials const & materials,
bool zeroInit )
staticprotected

◆ makeInit() [2/2]

static sdw::expr::ExprPtr castor3d::shader::BlendComponents::makeInit ( Materials const & materials,
Material const & material,
sdw::StructInstance const & surface,
sdw::Vec4 const * clrCot )
staticprotected

◆ makeType() [1/5]

static ast::type::BaseStructPtr castor3d::shader::BlendComponents::makeType ( ast::type::TypesCache & cache,
BlendComponents const & rhs )
static

◆ makeType() [2/5]

static ast::type::BaseStructPtr castor3d::shader::BlendComponents::makeType ( ast::type::TypesCache & cache,
Materials const & materials,
bool zeroInit,
sdw::expr::ExprList & inits )
static

◆ makeType() [3/5]

static ast::type::BaseStructPtr castor3d::shader::BlendComponents::makeType ( ast::type::TypesCache & cache,
Materials const & materials,
bool zeroInit = false )
inlinestatic

◆ makeType() [4/5]

static ast::type::BaseStructPtr castor3d::shader::BlendComponents::makeType ( ast::type::TypesCache & cache,
Materials const & materials,
Material const & material,
sdw::StructInstance const & surface,
sdw::Vec4 const * clrCot )
inlinestatic

◆ makeType() [5/5]

static ast::type::BaseStructPtr castor3d::shader::BlendComponents::makeType ( ast::type::TypesCache & cache,
Materials const & materials,
Material const & material,
sdw::StructInstance const & surface,
sdw::Vec4 const * clrCot,
sdw::expr::ExprList & inits )
static

◆ normalizeNormal()

void castor3d::shader::BlendComponents::normalizeNormal ( )

◆ SDW_DeclStructInstance()

castor3d::shader::BlendComponents::SDW_DeclStructInstance ( BlendComponents )

◆ setNormal()

void castor3d::shader::BlendComponents::setNormal ( sdw::Vec3 const v)

◆ usesDerivativeValues()

bool castor3d::shader::BlendComponents::usesDerivativeValues ( ) const
inlinenoexcept

Member Data Documentation

◆ alphaRef

sdw::DefaultedT< sdw::Float > castor3d::shader::BlendComponents::alphaRef

◆ ambientColour

sdw::DefaultedT< sdw::Vec3 > castor3d::shader::BlendComponents::ambientColour

◆ ambientFactor

sdw::DefaultedT< sdw::Float > castor3d::shader::BlendComponents::ambientFactor

◆ attenuationColour

sdw::DefaultedT< sdw::Vec3 > castor3d::shader::BlendComponents::attenuationColour

◆ attenuationDistance

sdw::DefaultedT< sdw::Float > castor3d::shader::BlendComponents::attenuationDistance

◆ bwAccumulationOperator

sdw::DefaultedT< sdw::UInt > castor3d::shader::BlendComponents::bwAccumulationOperator

◆ clearcoatFactor

sdw::DefaultedT< sdw::Float > castor3d::shader::BlendComponents::clearcoatFactor

◆ clearcoatNormal

sdw::DefaultedT< sdw::Vec3 > castor3d::shader::BlendComponents::clearcoatNormal

◆ clearcoatRoughness

sdw::DefaultedT< sdw::Float > castor3d::shader::BlendComponents::clearcoatRoughness

◆ colour

sdw::DefaultedT< sdw::Vec3 > castor3d::shader::BlendComponents::colour

◆ emissiveColour

sdw::DefaultedT< sdw::Vec3 > castor3d::shader::BlendComponents::emissiveColour

◆ emissiveFactor

sdw::DefaultedT< sdw::Float > castor3d::shader::BlendComponents::emissiveFactor

◆ f0

sdw::DefaultedT< sdw::Vec3 > castor3d::shader::BlendComponents::f0

◆ f90

sdw::DefaultedT< sdw::Vec3 > castor3d::shader::BlendComponents::f90

◆ hasReflection

sdw::DefaultedT< sdw::UInt > castor3d::shader::BlendComponents::hasReflection

◆ hasRefraction

sdw::DefaultedT< sdw::UInt > castor3d::shader::BlendComponents::hasRefraction

◆ hasTransmission

sdw::DefaultedT< sdw::UInt > castor3d::shader::BlendComponents::hasTransmission

◆ iridescenceF0

sdw::DefaultedT< sdw::Vec3 > castor3d::shader::BlendComponents::iridescenceF0

◆ iridescenceFactor

sdw::DefaultedT< sdw::Float > castor3d::shader::BlendComponents::iridescenceFactor

◆ iridescenceFresnel

sdw::DefaultedT< sdw::Vec3 > castor3d::shader::BlendComponents::iridescenceFresnel

◆ iridescenceIor

sdw::DefaultedT< sdw::Float > castor3d::shader::BlendComponents::iridescenceIor

◆ iridescenceThickness

sdw::DefaultedT< sdw::Float > castor3d::shader::BlendComponents::iridescenceThickness

◆ metalness

sdw::DefaultedT< sdw::Float > castor3d::shader::BlendComponents::metalness

◆ occlusion

sdw::DefaultedT< sdw::Float > castor3d::shader::BlendComponents::occlusion

◆ opacity

sdw::DefaultedT< sdw::Float > castor3d::shader::BlendComponents::opacity

◆ refractionRatio

sdw::DefaultedT< sdw::Float > castor3d::shader::BlendComponents::refractionRatio

◆ roughness

sdw::DefaultedT< sdw::Float > castor3d::shader::BlendComponents::roughness

◆ sheenFactor

sdw::DefaultedT< sdw::Vec3 > castor3d::shader::BlendComponents::sheenFactor

◆ sheenRoughness

sdw::DefaultedT< sdw::Float > castor3d::shader::BlendComponents::sheenRoughness

◆ shininess

sdw::Float const castor3d::shader::BlendComponents::shininess

◆ specular

sdw::DefaultedT< sdw::Vec3 > castor3d::shader::BlendComponents::specular

◆ thicknessFactor

sdw::DefaultedT< sdw::Float > castor3d::shader::BlendComponents::thicknessFactor

◆ transmission

sdw::DefaultedT< sdw::Float > castor3d::shader::BlendComponents::transmission

◆ transmittance

sdw::DefaultedT< sdw::Float > castor3d::shader::BlendComponents::transmittance

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