|
C3D_API | LightingModel (sdw::ShaderWriter &writer, Materials const &materials, Utils &utils, BRDFHelpers &brdf, ShadowOptions shadowOptions, SssProfiles const *sssProfiles, bool enableVolumetric, std::string prefix) |
|
virtual C3D_API | ~LightingModel ()=default |
|
virtual C3D_API sdw::Float | getFinalTransmission (BlendComponents const &components, sdw::Vec3 const &incident)=0 |
|
C3D_API sdw::Vec3 | combine (BlendComponents const &components, sdw::Vec3 const &incident, sdw::Vec3 const &directDiffuse, sdw::Vec3 const &indirectDiffuse, sdw::Vec3 const &directSpecular, sdw::Vec3 const &directScattering, sdw::Vec3 const &directCoatingSpecular, sdw::Vec2 const &directSheen, sdw::Vec3 const &indirectSpecular, sdw::Vec3 const &directAmbient, sdw::Vec3 const &indirectAmbient, sdw::Float const &ambientOcclusion, sdw::Vec3 const &emissive, sdw::Vec3 reflectedDiffuse, sdw::Vec3 reflectedSpecular, sdw::Vec3 refracted, sdw::Vec3 coatReflected, sdw::Vec3 sheenReflected) |
|
virtual C3D_API sdw::Vec3 | adjustDirectAmbient (BlendComponents const &components, sdw::Vec3 const &directAmbient) const =0 |
|
virtual C3D_API sdw::Vec3 | adjustDirectSpecular (BlendComponents const &components, sdw::Vec3 const &directSpecular) const =0 |
|
C3D_API sdw::Vec3 | combine (BlendComponents const &components, sdw::Vec3 const &incident, sdw::Vec3 const &directDiffuse, sdw::Vec3 const &indirectDiffuse, sdw::Vec3 const &directSpecular, sdw::Vec3 const &directScattering, sdw::Vec3 const &directCoatingSpecular, sdw::Vec2 const &directSheen, sdw::Vec3 const &indirectSpecular, sdw::Vec3 const &directAmbient, sdw::Vec3 const &indirectAmbient, sdw::Vec3 reflectedDiffuse, sdw::Vec3 reflectedSpecular, sdw::Vec3 refracted, sdw::Vec3 coatReflected, sdw::Vec3 sheenReflected) |
|
virtual C3D_API ReflectionModelPtr | getReflectionModel (uint32_t &envMapBinding, uint32_t envMapSet) const =0 |
|
|
|
C3D_API void | declareDirectionalModel (bool lightUbo, uint32_t lightBinding, uint32_t lightSet, uint32_t &shadowMapBinding, uint32_t shadowMapSet) |
|
C3D_API void | declarePointModel (bool lightUbo, uint32_t lightBinding, uint32_t lightSet, uint32_t &shadowMapBinding, uint32_t shadowMapSet) |
|
C3D_API void | declareSpotModel (bool lightUbo, uint32_t lightBinding, uint32_t lightSet, uint32_t &shadowMapBinding, uint32_t shadowMapSet) |
|
|
|
virtual C3D_API void | compute (DirectionalLight const &light, BlendComponents const &components, Surface const &surface, BackgroundModel &background, sdw::Vec3 const &worldEye, sdw::UInt const &receivesShadows, OutputComponents &output)=0 |
|
virtual C3D_API void | compute (PointLight const &light, BlendComponents const &components, Surface const &surface, sdw::Vec3 const &worldEye, sdw::UInt const &receivesShadows, OutputComponents &output)=0 |
|
virtual C3D_API void | compute (SpotLight const &light, BlendComponents const &components, Surface const &surface, sdw::Vec3 const &worldEye, sdw::UInt const &receivesShadows, OutputComponents &output)=0 |
|
|
|
virtual C3D_API sdw::Vec3 | computeDiffuse (DirectionalLight const &light, BlendComponents const &components, Surface const &surface, sdw::Vec3 const &worldEye, sdw::UInt const &receivesShadows)=0 |
|
virtual C3D_API sdw::Vec3 | computeDiffuse (PointLight const &light, BlendComponents const &components, Surface const &surface, sdw::Vec3 const &worldEye, sdw::UInt const &receivesShadows)=0 |
|
virtual C3D_API sdw::Vec3 | computeDiffuse (SpotLight const &light, BlendComponents const &components, Surface const &surface, sdw::Vec3 const &worldEye, sdw::UInt const &receivesShadows)=0 |
|
Light accessors
|
sdw::ShaderWriter & | m_writer |
|
Materials const & | m_materials |
|
Utils & | m_utils |
|
std::unique_ptr< sdw::Struct > | m_type |
|
std::unique_ptr< sdw::StorageBuffer > | m_ssbo |
|
std::unique_ptr< sdw::RImageBufferRgba32 > | m_tbo |
|
bool | m_enableVolumetric |
|
std::string | m_prefix |
|
std::shared_ptr< Shadow > | m_shadowModel |
|
std::shared_ptr< SssTransmittance > | m_sssTransmittance |
|
sdw::Function< sdw::Vec3, sdw::InVec3, sdw::InVec4, sdw::InUInt > | m_getCascadeFactors |
|
sdw::Function< sdw::Vec3, sdw::InVec3, sdw::InVec4Array, sdw::InUInt > | m_getTileFactors |
|
sdw::Function< shader::Light, sdw::InOutUInt > | m_getBaseLight |
|
sdw::Function< shader::DirectionalLight, sdw::InUInt > | m_getDirectionalLight |
|
sdw::Function< shader::PointLight, sdw::InUInt > | m_getPointLight |
|
sdw::Function< shader::SpotLight, sdw::InUInt > | m_getSpotLight |
|
C3D_API DirectionalLight | getDirectionalLight (sdw::UInt const &index) const |
|
C3D_API PointLight | getPointLight (sdw::UInt const &index) const |
|
C3D_API SpotLight | getSpotLight (sdw::UInt const &index) const |
|
Shadow & | getShadowModel () const |
|
C3D_API Light | getBaseLight (sdw::UInt &offset) const |
|
C3D_API void | doDeclareLightsBuffer (uint32_t binding, uint32_t set) |
|
C3D_API void | doDeclareDirectionalLightUbo (uint32_t binding, uint32_t set) |
|
C3D_API void | doDeclarePointLightUbo (uint32_t binding, uint32_t set) |
|
C3D_API void | doDeclareSpotLightUbo (uint32_t binding, uint32_t set) |
|
C3D_API void | doDeclareGetBaseLight () |
|
C3D_API void | doDeclareGetDirectionalLight () |
|
C3D_API void | doDeclareGetPointLight () |
|
C3D_API void | doDeclareGetSpotLight () |
|
C3D_API void | doDeclareGetCascadeFactors () |
|
Diffuse + Specular
|
C3D_API void | declareModel (uint32_t lightsBufBinding, uint32_t lightsBufSet, uint32_t &shadowMapBinding, uint32_t shadowMapSet) |
|
C3D_API void | computeCombined (BlendComponents const &components, SceneData const &sceneData, BackgroundModel &background, Surface const &surface, sdw::Vec3 const &worldEye, sdw::UInt const &receivesShadows, OutputComponents &output) |
|
static C3D_API LightingModelPtr | createModel (Engine const &engine, Materials const &materials, Utils &utils, BRDFHelpers &brdf, castor::String const &name, uint32_t lightsBufBinding, uint32_t lightsBufSet, ShadowOptions const &shadows, SssProfiles const *sssProfiles, uint32_t &shadowMapBinding, uint32_t shadowMapSet, bool enableVolumetric) |
|
template<typename LightsBufBindingT > |
static LightingModelPtr | createModelT (Engine const &engine, Materials const &materials, Utils &utils, BRDFHelpers &brdf, castor::String const &name, LightsBufBindingT lightsBufBinding, uint32_t lightsBufSet, ShadowOptions const &shadows, SssProfiles const *sssProfiles, uint32_t &shadowMapBinding, uint32_t shadowMapSet, bool enableVolumetric) |
|
template<typename LightBindingT > |
static LightingModelPtr | createModel (Engine const &engine, Materials const &materials, Utils &utils, BRDFHelpers &brdf, castor::String const &name, LightType light, LightBindingT lightBinding, uint32_t lightSet, bool lightUbo, ShadowOptions const &shadows, SssProfiles const *sssProfiles, uint32_t &shadowMapBinding, uint32_t shadowMapSet) |
|
Diffuse only
|
C3D_API void | declareDiffuseModel (uint32_t lightsBufBinding, uint32_t lightsBufSet, uint32_t &shadowMapBinding, uint32_t shadowMapSet) |
|
C3D_API sdw::Vec3 | computeCombinedDiffuse (BlendComponents const &components, SceneData const &sceneData, Surface const &surface, sdw::Vec3 const &worldEye, sdw::UInt const &receivesShadows) |
|
static C3D_API LightingModelPtr | createDiffuseModel (Engine const &engine, Materials const &materials, Utils &utils, BRDFHelpers &brdf, castor::String const &name, uint32_t lightsBufBinding, uint32_t lightsBufSet, ShadowOptions const &shadows, uint32_t &shadowMapBinding, uint32_t shadowMapSet, bool enableVolumetric) |
|
template<typename LightsBufBindingT > |
static LightingModelPtr | createDiffuseModelT (Engine const &engine, Materials const &materials, Utils &utils, BRDFHelpers &brdf, castor::String const &name, LightsBufBindingT lightsBufBinding, uint32_t lightsBufSet, ShadowOptions const &shadows, uint32_t &shadowMapBinding, uint32_t shadowMapSet, bool enableVolumetric) |
|