Api Sandbox Rendering ViewSetup
struct

ViewSetup

public sealed struct ViewSetup

When manually rendering a camera this will let you override specific elements of that render. This means you can use most of the camera's properties, but override some without disturbing the camera itself.

Fields

Name Type Description
Transform Transform? Overrides the camera's position and rotation
FieldOfView Single? Overrides the camera's field of view
ZNear Single? Overrides the camera's znear
ZFar Single? Overrides the camera's zfar
ClearColor Color? Overrides the camera's clear color
ProjectionMatrix Matrix? Overrides the camera's projection matrix
GradientFog GradientFogSetup? Allows overriding gradient fog for this view
AmbientLightTint Color? If set then the regular scene's ambient light will be multiplied by this
AmbientLightAdd Color? If set then this will be added to the ambient light color
ClipSpaceBounds Vector4? Clipspace is usually used for rendering posters, or center-offsetting the view. You're basically zooming into a subrect of the clipspace. So imagine you draw a smaller rect inside the first rect of the frustum.. that's what you're gonna render - that rect.
FlipX Boolean? When rendering to a texture, this allows you to flip the view horizontally.
FlipY Boolean? When rendering to a texture, this allows you to flip the view vertically.
EnablePostprocessing Boolean? Whether post processing should be enabled for this view. If null it will use the camera's setting.
ViewHash Int32 If you're rendering a subview this will allow the renderer to find the same view again next frame
Assembly: Sandbox.Engine Namespace: Sandbox.Rendering Full Name: Sandbox.Rendering.ViewSetup