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

#include <GlslMaterial.hpp>

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

Public Member Functions

C3D_API Material (sdw::ShaderWriter &writer, ast::expr::ExprPtr expr, bool enabled)
 
 SDW_DeclStructInstance (C3D_API, Material)
 
C3D_API void getPassMultipliers (PipelineFlags const &flags, sdw::UVec4 const &passMasks, sdw::Array< sdw::Vec4 > const &passMultipliers) const
 
C3D_API sdw::UInt getTexture (uint32_t index) const
 
C3D_API sdw::UInt getTexture (sdw::UInt const &index) const
 

Static Public Member Functions

static C3D_API ast::type::BaseStructPtr makeType (ast::type::TypesCache &cache, PassShaders const &passShaders, sdw::expr::ExprList &inits)
 
static ast::type::BaseStructPtr makeType (ast::type::TypesCache &cache, PassShaders const &passShaders)
 
static C3D_API void applyAlphaFunc (sdw::ShaderWriter &writer, VkCompareOp alphaFunc, sdw::Float &opacity, sdw::Float const &alphaRef, bool opaque=true)
 Writes the alpha function in GLSL.
 

Public Attributes

sdw::UInt passId
 
sdw::UInt index
 
sdw::UInt passCount
 
sdw::UInt lighting
 
sdw::UInt lightingModel
 
sdw::Vec3 colour
 
sdw::Vec3 specular
 
sdw::Float transmission
 
sdw::UInt hasTransmission
 
sdw::Float opacity
 
sdw::Float alphaRef
 
sdw::UInt hasReflection
 
sdw::Float refractionRatio
 
sdw::Vec3 attenuationColour
 
sdw::Float attenuationDistance
 
sdw::Float thicknessFactor
 

Friends

class Materials
 

Constructor & Destructor Documentation

◆ Material()

C3D_API castor3d::shader::Material::Material ( sdw::ShaderWriter & writer,
ast::expr::ExprPtr expr,
bool enabled )

Member Function Documentation

◆ applyAlphaFunc()

static C3D_API void castor3d::shader::Material::applyAlphaFunc ( sdw::ShaderWriter & writer,
VkCompareOp alphaFunc,
sdw::Float & opacity,
sdw::Float const & alphaRef,
bool opaque = true )
static

Writes the alpha function in GLSL.

Parameters
writerThe writer.
alphaFuncThe alpha function.
[in]opacityThe opacity value.
[in]alphaRefThe alpha comparison reference value.
[in]opaquetrue for opaque nodes, false for transparent ones.

◆ getPassMultipliers()

C3D_API void castor3d::shader::Material::getPassMultipliers ( PipelineFlags const & flags,
sdw::UVec4 const & passMasks,
sdw::Array< sdw::Vec4 > const & passMultipliers ) const

◆ getTexture() [1/2]

C3D_API sdw::UInt castor3d::shader::Material::getTexture ( sdw::UInt const & index) const

◆ getTexture() [2/2]

C3D_API sdw::UInt castor3d::shader::Material::getTexture ( uint32_t index) const

◆ makeType() [1/2]

static ast::type::BaseStructPtr castor3d::shader::Material::makeType ( ast::type::TypesCache & cache,
PassShaders const & passShaders )
inlinestatic

References makeType().

Here is the call graph for this function:

◆ makeType() [2/2]

static C3D_API ast::type::BaseStructPtr castor3d::shader::Material::makeType ( ast::type::TypesCache & cache,
PassShaders const & passShaders,
sdw::expr::ExprList & inits )
static

Referenced by makeType().

Here is the caller graph for this function:

◆ SDW_DeclStructInstance()

castor3d::shader::Material::SDW_DeclStructInstance ( C3D_API ,
Material  )

Friends And Related Symbol Documentation

◆ Materials

friend class Materials
friend

Member Data Documentation

◆ alphaRef

sdw::Float castor3d::shader::Material::alphaRef

◆ attenuationColour

sdw::Vec3 castor3d::shader::Material::attenuationColour

◆ attenuationDistance

sdw::Float castor3d::shader::Material::attenuationDistance

◆ colour

sdw::Vec3 castor3d::shader::Material::colour

◆ hasReflection

sdw::UInt castor3d::shader::Material::hasReflection

◆ hasTransmission

sdw::UInt castor3d::shader::Material::hasTransmission

◆ index

sdw::UInt castor3d::shader::Material::index

◆ lighting

sdw::UInt castor3d::shader::Material::lighting

◆ lightingModel

sdw::UInt castor3d::shader::Material::lightingModel

◆ opacity

sdw::Float castor3d::shader::Material::opacity

◆ passCount

sdw::UInt castor3d::shader::Material::passCount

◆ passId

sdw::UInt castor3d::shader::Material::passId

◆ refractionRatio

sdw::Float castor3d::shader::Material::refractionRatio

◆ specular

sdw::Vec3 castor3d::shader::Material::specular

◆ thicknessFactor

sdw::Float castor3d::shader::Material::thicknessFactor

◆ transmission

sdw::Float castor3d::shader::Material::transmission

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