3#include "Components/Core/RenderComponent.h"
4#include "Components/Core/LightComponent.h"
6#include "Resources/Resources.h"
102 float keepThreshold = 1.0f;
170template<>
inline Cogs::StringView getName<Cogs::Core::ProjectionMode>() {
return "ProjectionMode"; }
171template<>
inline Cogs::StringView getName<Cogs::Core::CameraFlags>() {
return "CameraFlags"; }
172template<>
inline Cogs::StringView getName<Cogs::Core::CameraComponent>() {
return "CameraComponent"; }
Base class for Component instances.
CameraFlags flags
Camera behavior flags.
float fieldOfView
Vertical field of view, given in radians.
uint32_t clientFlags
Application defined, camera specific flags passed to shaders.
float farPlaneLimit
Largest value allowed to adjust far plane to.
LightingLayers lightingMask
Lighting mask used to determine which lights are active for the current viewport.
glm::vec4 clearColor
Use the following colour to clear the render target before rendering.
bool enableClippingPlaneAdjustment
If automatic adjustment of the clipping planes should be performed to fit as much of the scene as pos...
glm::vec2 subsetMin
Subset of the frustum to view (for only rendering a subset of the view covered by the viewport),...
glm::vec2 viewportSize
Size of the viewport covered by this instance, given in pixels.
std::string renderPipeline
Render pipeline to apply when rendering to texture. Defaults to the built-in forward rendering pipeli...
TextureHandle resolveTarget
The texture to which the rendered output will be resolved. (Needs an offscreen renderTexture for this...
ProjectionMode projectionMode
The projection mode to use for the camera.
float focalDistance
Focal distance of the camera, given in scene units.
RenderLayers layerMask
Layer mask used to determine which RenderComponent instances should be visible in this cameras viewpo...
float nearPlaneLimit
Smallest value allowed to adjust near plane to.
TextureHandle renderTexture
The render texture to output the rendered scene from the camera to.
CameraComponent()=default
Constructs a camera with defaults set.
glm::vec2 subsetMax
Subset of the frustum to view (for only rendering a subset of the view covered by the viewport),...
std::vector< std::string > renderPipelineOptions
Extra options passed when creating the render pipeline,.
glm::vec2 viewportOrigin
Origin of the viewport covered by this instance, given in screen units from the lower left.
EntityPtr environment
Environment to use for rendering.
float exposure
Exposure factor for HDR rendering.
float orthoHeight
Height of the viewport in scene units when using orthographic projection.
int32_t stackOrder
Specifies the ordering of cameras when rendering to the same render target, lower numbers render befo...
static void registerType()
Register the type in the type system.
bool supportsPicking() const
Check if the camera supports use for ray picking.
float discardThreshold
Discard objects occupying less pixels than threshold.
Provides a weakly referenced view over the contents of a string.
std::shared_ptr< ComponentModel::Entity > EntityPtr
Smart pointer for Entity access.
@ EnableRender
Renderable.
@ OverrideClearColor
Provide a clear colour for this camera to use.
@ EnablePicking
Supports picking.
ProjectionMode
Defines projection modes for the camera.
@ Orthographic
Orthographic projection.
@ Perspective
Perspective projection.
RenderLayers
Contains common render layers.
Contains all Cogs related functionality.
static const ResourceHandle_t NoHandle
Handle representing a default (or none if default not present) resource.