#define CE_FLAGS_OPERATORS(Enum)
Defines global operators for a Flags<Enum, Storage> implementation.
Definition Flags.hpp:216
#define CE_ASSERT(...)
Definition Macros.hpp:323
#define CE_DECL_RENDERER_OBJECT(T)
Definition RendererObject.hpp:25
A retain-release type of smart pointer.
Definition SmartPtr.hpp:132
Definition GPUBufferObject.hpp:562
A class that represents a environment inside the renderer.
Definition RendererEnvironment.hpp:67
void markAsDirty(const RendererEnvironmentDirtyFlags &flags=RendererEnvironmentDirtyFlag::All) noexcept
GPUImagePtr prefilterRadianceMap(RendererContext &context, const GPUImagePtr &environmentMap)
Generates a specular pre-filtered reflection map using environmentMap as a base.
EnvironmentComponent mComponent
A copy of the latest environment component.
Definition RendererEnvironment.hpp:73
GPUImagePtr equirectangularToCubeMap(RendererContext &context, const GPUImagePtr &environmentMap)
virtual const GPUUniformBuffer & getUniformBuffer() const =0
The uniform buffer storing the environment GPU parameters used by the renderer.
RendererEnvironment(RendererEnvironmentManager &manager, RendererScene &scene)
Creates a new RendererEnvironment.
bool isDirty() const noexcept
Definition RendererEnvironment.hpp:139
virtual ~RendererEnvironment()
Destroys the renderer environment and releases any renderer (and RenderAPI)-related resources.
virtual RendererEnvironmentType getType() const noexcept=0
Determines the type of environment.
GPUImagePtr prefilterIrradianceMap(RendererContext &context, const GPUImagePtr &environmentMap)
Generates a diffuse irradiance map for the given environmentMap.
void synchronize(const EnvironmentComponent &component)
Update the renderer environment with data from a transform and the component.
virtual void prepare(RendererContext &context)
Prepares the environment for the rendering of the current frame.
A manager that controls all environments currently registered with the renderer.
Definition RendererEnvironment.hpp:209
ObjectType & create(Args &&... args)
Creates a new renderer object by calling it's constructor.
Definition RendererEnvironment.hpp:242
Vector< UPtr< RendererSkyboxEnvironment > > mEnvironments
A vector of all registered environments.
Definition RendererEnvironment.hpp:215
void destroy(const ObjectType &object)
Destroys an existing renderer object by calling it's destructor and releasing it's memory.
Definition RendererEnvironment.hpp:260
void markAsDirty(RendererEnvironment *const environment)
Marks the given environment as dirty.
Async prepare(RendererContext &context)
Prepares the environments for the rendering of the current frame.
RendererEnvironmentManager(Renderer &renderer)
Creates a new instance of the RendererEnvironmentManager.
friend class RendererEnvironment
Definition RendererEnvironment.hpp:269
~RendererEnvironmentManager()
Destroys the RendererEnvironmentManager and releases all environments objects managed by it.
The CeresEngine renderer.
Definition Renderer.hpp:35
void notifyChangeID(RendererObject &object, const RendererObjectID newID) noexcept
Method called whenever the RendererObject ID changes.
Definition RendererObject.hpp:126
A class that represents a scene inside the renderer.
Definition RendererScene.hpp:34
A base class for all renderer scene object managers.
Definition RendererSceneObject.hpp:68
The implementation for skybox environment type.
Definition RendererEnvironment.hpp:151
GPUDynamicUniformBuffer< RendererSkyboxEnvironmentParams > mUniformBuffer
The uniform buffer storing the environment GPU parameters used by the renderer.
Definition RendererEnvironment.hpp:170
RendererTexturePtr mRadianceMap
The (specular) radiance map for the skybox texture.
Definition RendererEnvironment.hpp:166
const RendererTexturePtr & getSkyboxTexture() const noexcept
A texture that represents the scene sky.
Definition RendererEnvironment.hpp:198
const RendererTexturePtr & getRadianceMap() const noexcept
The (specular) radiance map for the skybox texture.
Definition RendererEnvironment.hpp:204
const RendererTexturePtr & getIrradianceMap() const noexcept
The (diffuse) irradiance map for the skybox texture.
Definition RendererEnvironment.hpp:201
RendererSkyboxEnvironment(RendererEnvironmentManager &manager, RendererScene &scene)
Creates a new RendererSkyboxEnvironment.
RendererTexturePtr mOriginalSkyboxTexture
Definition RendererEnvironment.hpp:156
RendererTexturePtr mSkyboxTexture
A texture that represents the scene sky.
Definition RendererEnvironment.hpp:160
const GPUUniformBuffer & getUniformBuffer() const final
The uniform buffer storing the environment GPU parameters used by the renderer.
Definition RendererEnvironment.hpp:195
void prepare(RendererContext &context) override
Prepares the environment for the rendering of the current frame.
~RendererSkyboxEnvironment() override
Destroys the renderer environment and releases any renderer (and RenderAPI)-related resources.
RendererEnvironmentType getType() const noexcept final
Determines the type of environment.
Definition RendererEnvironment.hpp:192
RendererTexturePtr mIrradianceMap
The (diffuse) irradiance map for the skybox texture.
Definition RendererEnvironment.hpp:163
Template class to help implement sub-classes of RendererSceneObject.
Definition RendererSceneObject.hpp:47
Definition Application.hpp:19
RendererEnvironmentDirtyFlag
Flags that can be either set by the renderer or by the user to customize the behavior of the mesh.
Definition RendererEnvironment.hpp:43
@ None
Special value that represents a clean (i.e. non-dirty) object.
@ All
Special value that represents a dirty object with all parts dirty.
cti::continuable< Args... > Async
Defines a non-copyable continuation type which uses the function2 backend for type erasure.
Definition Async.hpp:22
std::vector< T, ScopedAllocatorAdaptor< StdAllocator< T, RawAllocator > > > Vector
Vector is a sequence container that encapsulates dynamic size arrays.
Definition Vector.hpp:17
@ UniformBuffer
Uniform buffer (or constant buffer) resource.
RendererEnvironmentType
Enumeration that determines the type of renderer environment.
Definition RendererEnvironment.hpp:29
@ Baked
Indicates that the environment a baked environment map.
@ Skybox
Indicates that the environment is a simple skybox.
@ Probe
Indicates that the environment is captured dynamically on the scene using a probe.
std::uint32_t UInt32
Definition DataTypes.hpp:23
@ All
Specifies all shader stages.
UInt32 RendererObjectID
A type-alias for a type that uniquely identifies a RendererObject.
Definition RendererObject.hpp:35
constexpr size_t hash(const T &v)
Generates a hash for the provided type.
Definition Hash.hpp:25
Components serve as the base for data storage for an entity.
Definition Component.hpp:68
The Environment component.
Definition Environment.hpp:23
Wrapper around an enum that allows simple use of bitwise logic operations.
Definition Flags.hpp:19
A structure that contains context given by the renderer to render it's objects.
Definition Renderer.hpp:252
A structure that mirrors the GPU uniform data for the skybox environment.
Definition RendererEnvironment.hpp:146
UInt32 prefilteredMipLevels
Definition RendererEnvironment.hpp:147