33 Scene(
const std::shared_ptr<GraphicsDevice>& graphicsDevice);
40 const std::shared_ptr<LayerComposition>&
layers()
const {
return _layers; }
65 Sky*
sky()
const {
return _sky.get(); }
107 std::shared_ptr<GraphicsDevice> _device;
112 bool _clusteredLightingEnabled =
false;
124 bool _updateShaders =
true;
126 std::shared_ptr<LayerComposition> _layers;
128 std::unique_ptr<Sky> _sky;
132 float _skyboxIntensity = 1.0f;
133 float _exposure = 1.0f;
137 Texture* _skyboxCubeMap =
nullptr;
139 bool _debugNormalMapsEnabled =
false;
140 bool _atmosphereEnabled =
false;
143 struct alignas(16) AtmosphereUniformsStorage {
145 } _atmosphereUniforms;
147 std::vector<Texture*> _prefilteredCubemaps;
148 Texture* _internalEnvAtlas =
nullptr;
size_t atmosphereUniformSize() const
void setDebugNormalMapsEnabled(const bool enabled)
Texture * envAtlas() const
const void * atmosphereUniformData() const
Access raw atmosphere uniform data for the device.
const Color & ambientLight() const
bool atmosphereEnabled() const
bool clusteredLightingEnabled() const
void setLayers(const std::shared_ptr< LayerComposition > &layers)
void setPrefilteredCubemaps(const std::vector< Texture * > &cubemaps)
void setSkyboxIntensity(float value)
Immediate * immediate() const
const LightingParams & lighting() const
void setAmbientLight(float r, float g, float b)
void setClusteredLightingEnabled(bool value)
void setAtmosphereUniforms(const void *data, size_t size)
bool debugNormalMapsEnabled() const
float skyboxIntensity() const
void setSkybox(Texture *value)
Scene(const std::shared_ptr< GraphicsDevice > &graphicsDevice)
void setSkyType(int value)
void setEnvAtlas(Texture *value)
void setFogDensity(const float density)
void setFogLinear(const float start, const float end)
void setFogEnabled(const bool enabled)
const FogParams & fog() const
const std::shared_ptr< LayerComposition > & layers() const
static constexpr const char * EVENT_SETLAYERS
void setAtmosphereEnabled(bool value)
void setSkyboxMip(int value)
void setExposure(float value)
void setFogColor(const Color &color)
void setToneMapping(int value)
GPU texture resource supporting 2D, cubemap, volume, and array formats with mipmap management.
RGBA color with floating-point components in [0, 1].