Summary

Represents a camera and holds render hooks. This camera can be used to draw tool windows and scene panels.

Properties

AmbientLightColor The color of the ambient light. Set it to black for no ambient light, alpha is used for lerping between IBL and constant color.
Angles The rotation of the scene's camera.
AntiAliasing Enable or disable anti-aliasing for this render.
Attributes
BackgroundColor Color the scene camera clears the render target to.
Bloom Access tonemapping properties of camera
ClearFlags What kind of clearing should we do before we begin?
CubemapFog Control fog based on an image.
CustomProjectionMatrix Allows specifying a custom projection matrix for this camera
DebugMode Render this camera using a different render mode
EnableDirectLighting Enable or disable direct lighting
EnableIndirectLighting Enable or disable indirect lighting
EnablePostProcessing Toggle all post processing effects for this camera. The default is on.
ExcludeTags Scene objects with any of these tags won't be rendered by this camera.
FieldOfView The horizontal field of view of the Camera in degrees.
Name The name of this camera.. for debugging purposes.
OnRenderOpaque Called when rendering the transparent pass
OnRenderOverlay Called when rendering the camera's overlay
OnRenderPostProcess Called when rendering the post process pass
OnRenderTransparent Called when rendering the transparent pass
OnRenderUI
Ortho Whether to use orthographic projection.
OrthoHeight Height of the ortho when Sandbox.SceneCamera.Ortho is enabled.
OrthoWidth No longer used
Position The position of the scene's camera.
Rect The rect of the screen to render to. This is normalized, between 0 and 1.
RenderTags Only scene objects with one of these tags will be rendered by this camera.
Rotation The rotation of the scene's camera.
Size The size of the screen. Allows us to work out aspect ratio. For now will get updated automatically on render.
TargetEye The HMD eye that this camera is targeting. Use Sandbox.StereoTargetEye.None for the user's monitor (i.e. the companion window).
Tonemap Access tonemapping properties of camera
VolumetricFog Control volumetric fog parameters, expect this to take 1-2ms of your GPU frame time.
WantsStereoSubmit Set this to false if you don't want the stereo renderer to submit this camera's texture to the compositor. This option isn't considered if Sandbox.SceneCamera.TargetEye is Sandbox.StereoTargetEye.None.
WireframeMode Render this camera using a wireframe view.
World The world we're going to render.
Worlds Your camera can render multiple worlds.
ZFar The camera's zFar distance. This is the furthest distance this camera will be able to render. This value totally depends on the game you're making. Shorter the better, sensible ranges would be between about 1000 and 30000, but if you want it to be further out you can balance that out by making znear larger.
ZNear The camera's zNear distance. This is the closest distance this camera will be able to render. A good value for this is about 5. Below 5 and particularly below 1 you're going to start to see a lot of artifacts like z-fighting.

Methods

Dispose
GetFrustum
GetRay
SetViewModelCamera
ToScreen
ToScreenNormal
ToWorld
people
Log in to reply
You can't reply if you're not logged in. That would be crazy.