API Documentation
AtmosphereEffect.h
1 // AtmosphereEffect.h
3 //
5 
6 namespace nkAstraeus
7 {
25  class AtmosphereEffect final : public Effect
26  {
27  public :
28 
29  // Constructor, destructor
34  AtmosphereEffect (System* system) noexcept ;
39  virtual ~AtmosphereEffect () ;
40 
41  // Getters
109  float getMieG () const ;
117  float getMieHeightDensityFactor () const ;
125  float getDistanceFactor () const ;
129  float getSunIlluminanceFactor () const ;
133  float getSunAngularRadius () const ;
137  unsigned int getSunLutSampleCount () const ;
149  unsigned int getRaymarchSampleCount () const ;
156  unsigned int getSunTransmittanceLutWidth () const ;
163  unsigned int getSunTransmittanceLutHeight () const ;
170  unsigned int getMultiScatteringLutWidth () const ;
177  unsigned int getMultiScatteringLutHeight () const ;
185  float getShadowDepthBias () const ;
189  bool getShadowDebug () const ;
196  bool getUseHalfFloatForLuts () const ;
200  bool getOnlyScatterOnObjects () const ;
201 
202  // Setters
358  void setMieG (float value) ;
370  void setRayleighHeightDensityFactor (float value) ;
382  void setMieHeightDensityFactor (float value) ;
394  void setOzoneHeightDensityFactor (float value) ;
403  void setDistanceFactor (float value) ;
411  void setSunIlluminanceFactor (float value) ;
419  void setSunAngularRadius (float value) ;
429  void setSunTransmittanceLutSampleCount (unsigned int value) ;
440  void setMultiScatteringLutSphereSampleCount (unsigned int value) ;
450  void setMultiScatteringLutMarchSampleCount (unsigned int value) ;
460  void setRaymarchSampleCount (unsigned int value) ;
472  void setShadowSource (nkGraphics::Texture* shadowMap, nkGraphics::Camera* lightCamera) ;
491  void setShadowDepthBias (float value) ;
500  void setShadowDebug (bool value) ;
509  void setSunTransmittanceLutWidth (unsigned int value) ;
518  void setSunTransmittanceLutHeight (unsigned int value) ;
527  void setMultiScatteringLutWidth (unsigned int value) ;
536  void setMultiScatteringLutHeight (unsigned int value) ;
546  void setUseHalfFloatForLuts (bool value) ;
554  void setOnlyScatterOnObjects (bool value) ;
555 
556  // Updates
564  bool refreshLuts () ;
565 
566  // Load
567  virtual bool load () override ;
568  virtual void unload () override ;
569 
570  public :
571 
572  // Statics
584  } ;
585 }
nkAstraeus::AtmosphereEffect::getMultiScatteringLut
nkGraphics::Texture * getMultiScatteringLut() const
nkAstraeus::AtmosphereEffect::setSourceColorTexture
void setSourceColorTexture(nkGraphics::Texture *value)
nkAstraeus::AtmosphereEffect::getShadowDepthBias
float getShadowDepthBias() const
nkAstraeus::AtmosphereEffect::setShadowSamplingMethod
void setShadowSamplingMethod(SHADOW_MAP_PCF value)
nkAstraeus::AtmosphereEffect::setRayleighAbsorb
void setRayleighAbsorb(nkMaths::Vector value)
nkAstraeus::AtmosphereEffect
An atmosphere effect.
Definition: AtmosphereEffect.h:26
nkAstraeus::AtmosphereEffect::setRayleighExtinction
void setRayleighExtinction(nkMaths::Vector value)
nkAstraeus::AtmosphereEffect::load
virtual bool load() override
nkAstraeus::AtmosphereEffect::setMultiScatteringLutHeight
void setMultiScatteringLutHeight(unsigned int value)
nkAstraeus::AtmosphereEffect::setRayleighScattering
void setRayleighScattering(nkMaths::Vector value)
nkAstraeus::AtmosphereEffect::getOzoneScattering
nkMaths::Vector getOzoneScattering() const
nkAstraeus::AtmosphereEffect::~AtmosphereEffect
virtual ~AtmosphereEffect()
nkGraphics::Camera
Offers all controls to model a camera.
Definition: Camera.h:14
nkAstraeus::AtmosphereEffect::setMieAbsorb
void setMieAbsorb(nkMaths::Vector value)
nkAstraeus::AtmosphereEffect::getShadowDebug
bool getShadowDebug() const
nkAstraeus::AtmosphereEffect::getSourceColorTexture
nkGraphics::Texture * getSourceColorTexture() const
nkAstraeus::AtmosphereEffect::getMieExtinction
nkMaths::Vector getMieExtinction() const
nkGraphics::Texture
A texture used for rendering, hosted on GPU.
Definition: Texture.h:35
nkAstraeus::AtmosphereEffect::getRayleighExtinction
nkMaths::Vector getRayleighExtinction() const
nkAstraeus::AtmosphereEffect::setMieG
void setMieG(float value)
nkAstraeus::AtmosphereEffect::getMultiScatteringLutHeight
unsigned int getMultiScatteringLutHeight() const
nkAstraeus::AtmosphereEffect::getRayleighHeightDensityFactor
float getRayleighHeightDensityFactor() const
nkAstraeus::AtmosphereEffect::getLutShader
nkGraphics::Shader * getLutShader() const
nkAstraeus::AtmosphereEffect::getSunLutSampleCount
unsigned int getSunLutSampleCount() const
nkAstraeus::AtmosphereEffect::setOzoneScattering
void setOzoneScattering(nkMaths::Vector value)
nkAstraeus::AtmosphereEffect::getMieG
float getMieG() const
nkAstraeus::AtmosphereEffect::setRayleighHeightDensityFactor
void setRayleighHeightDensityFactor(float value)
nkAstraeus::AtmosphereEffect::setMultiScatteringLutWidth
void setMultiScatteringLutWidth(unsigned int value)
nkAstraeus::AtmosphereEffect::getRayleighScattering
nkMaths::Vector getRayleighScattering() const
nkAstraeus::AtmosphereEffect::getDistanceFactor
float getDistanceFactor() const
nkAstraeus::System
The main entry point for nkAstraeus engine.
Definition: System.h:15
nkAstraeus::AtmosphereEffect::refreshLuts
bool refreshLuts()
nkAstraeus::AtmosphereEffect::getOnlyScatterOnObjects
bool getOnlyScatterOnObjects() const
nkAstraeus::AtmosphereEffect::setOzoneHeightDensityFactor
void setOzoneHeightDensityFactor(float value)
nkAstraeus::AtmosphereEffect::getSunAngularRadius
float getSunAngularRadius() const
nkAstraeus::AtmosphereEffect::setOzoneExtinction
void setOzoneExtinction(nkMaths::Vector value)
nkGraphics::Shader
A shader class, feeding data to a Program.
Definition: Shader.h:16
nkAstraeus::AtmosphereEffect::getUseHalfFloatForLuts
bool getUseHalfFloatForLuts() const
nkAstraeus::AtmosphereEffect::getSunTransmittanceLutWidth
unsigned int getSunTransmittanceLutWidth() const
nkAstraeus::AtmosphereEffect::getShadowSamplingMethod
SHADOW_MAP_PCF getShadowSamplingMethod() const
nkAstraeus::AtmosphereEffect::setDistanceFactor
void setDistanceFactor(float value)
nkAstraeus::AtmosphereEffect::getMultiScatteringLutWidth
unsigned int getMultiScatteringLutWidth() const
nkAstraeus::AtmosphereEffect::setOnlyScatterOnObjects
void setOnlyScatterOnObjects(bool value)
nkAstraeus::AtmosphereEffect::setPlanetAlbedo
void setPlanetAlbedo(nkMaths::Vector value)
nkAstraeus::AtmosphereEffect::getMultiScatteringLutSphereSampleCount
unsigned int getMultiScatteringLutSphereSampleCount() const
nkAstraeus::AtmosphereEffect::setSunAngularRadius
void setSunAngularRadius(float value)
nkAstraeus::AtmosphereEffect::setSunTransmittanceLutHeight
void setSunTransmittanceLutHeight(unsigned int value)
nkAstraeus::AtmosphereEffect::setUseHalfFloatForLuts
void setUseHalfFloatForLuts(bool value)
nkAstraeus::AtmosphereEffect::getMieAbsorb
nkMaths::Vector getMieAbsorb() const
nkAstraeus::SHADOW_MAP_PCF
SHADOW_MAP_PCF
Percentage Closer Filtering settings available for materials and effects supporting the shadow mappin...
Definition: ShadowMapPcf.h:12
nkAstraeus::AtmosphereEffect::getMultiScatteringLutMarchSampleCount
unsigned int getMultiScatteringLutMarchSampleCount() const
nkAstraeus::AtmosphereEffect::getSourceDepthTexture
nkGraphics::Texture * getSourceDepthTexture() const
nkAstraeus::AtmosphereEffect::getOzoneAbsorb
nkMaths::Vector getOzoneAbsorb() const
nkAstraeus::AtmosphereEffect::setShadowDebug
void setShadowDebug(bool value)
nkAstraeus
Encompasses all API of component NilkinsAstraeus.
Definition: BlurComplexEffect.h:7
nkAstraeus::AtmosphereEffect::getRayleighAbsorb
nkMaths::Vector getRayleighAbsorb() const
nkMemory::UniquePtr
Smart pointer owning the object instance it encapsulates.
Definition: UniquePtr.h:17
nkAstraeus::AtmosphereEffect::setMultiScatteringLutSphereSampleCount
void setMultiScatteringLutSphereSampleCount(unsigned int value)
nkAstraeus::AtmosphereEffect::setSunTransmittanceLutWidth
void setSunTransmittanceLutWidth(unsigned int value)
nkAstraeus::Effect
Base class for all effects in the component.
Definition: Effect.h:16
nkAstraeus::AtmosphereEffect::setShadowSource
void setShadowSource(nkGraphics::Texture *shadowMap, nkGraphics::Camera *lightCamera)
nkAstraeus::AtmosphereEffect::setSunPosition
void setSunPosition(nkMaths::Vector value)
nkAstraeus::AtmosphereEffect::getSunTransmittanceLut
nkGraphics::Texture * getSunTransmittanceLut() const
nkAstraeus::AtmosphereEffect::setMieScattering
void setMieScattering(nkMaths::Vector value)
nkAstraeus::AtmosphereEffect::getSunIlluminanceFactor
float getSunIlluminanceFactor() const
nkAstraeus::AtmosphereEffect::getSunPosition
nkMaths::Vector getSunPosition() const
nkAstraeus::AtmosphereEffect::setRaymarchSampleCount
void setRaymarchSampleCount(unsigned int value)
nkAstraeus::AtmosphereEffect::unload
virtual void unload() override
nkAstraeus::AtmosphereEffect::setMieHeightDensityFactor
void setMieHeightDensityFactor(float value)
nkAstraeus::AtmosphereEffect::setSourceDepthTexture
void setSourceDepthTexture(nkGraphics::Texture *value)
nkAstraeus::AtmosphereEffect::setShadowDepthBias
void setShadowDepthBias(float value)
nkAstraeus::AtmosphereEffect::setOzoneAbsorb
void setOzoneAbsorb(nkMaths::Vector value)
nkAstraeus::AtmosphereEffect::setMieExtinction
void setMieExtinction(nkMaths::Vector value)
nkAstraeus::AtmosphereEffect::setSunTransmittanceLutSampleCount
void setSunTransmittanceLutSampleCount(unsigned int value)
nkAstraeus::AtmosphereEffect::AtmosphereEffect
AtmosphereEffect(System *system) noexcept
nkAstraeus::AtmosphereEffect::getMieHeightDensityFactor
float getMieHeightDensityFactor() const
nkAstraeus::AtmosphereEffect::getRaymarchSampleCount
unsigned int getRaymarchSampleCount() const
nkAstraeus::AtmosphereEffect::setMultiScatteringLutMarchSampleCount
void setMultiScatteringLutMarchSampleCount(unsigned int value)
nkAstraeus::AtmosphereEffect::getOzoneExtinction
nkMaths::Vector getOzoneExtinction() const
nkAstraeus::AtmosphereEffect::getOzoneHeightDensityFactor
float getOzoneHeightDensityFactor() const
nkAstraeus::AtmosphereEffect::setSunIlluminanceFactor
void setSunIlluminanceFactor(float value)
nkMaths::Vector
A 4-component vector class, with floats.
Definition: Vector.h:12
nkAstraeus::AtmosphereEffect::getPlanetAlbedo
nkMaths::Vector getPlanetAlbedo() const
nkAstraeus::AtmosphereEffect::getSunTransmittanceLutHeight
unsigned int getSunTransmittanceLutHeight() const
nkAstraeus::AtmosphereEffect::getMieScattering
nkMaths::Vector getMieScattering() const
nkAstraeus::AtmosphereEffect::create
static nkMemory::UniquePtr< AtmosphereEffect > create(System *system=nullptr)