public readonly record struct RenderCameraWhere the frame is seen from, as one description rather than as several copies of it.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
A RenderView is deliberately not a camera — a frame has a dozen views and one camera, and modelling a shadow cascade as something the game can see through would be wrong. But the camera is one of those views, and more than one thing in a frame needs to know how it was built: the view's own matrix, and the cascade fit that slices its frustum.
Two consumers, one description. Before this, a host set the view's matrix from its camera and separately set seven scalars on the shadow renderer, and nothing checked that they agreed. A cascade fitted to a field of view the camera no longer had is a shadow that covers the wrong part of the scene — visible only as shadows fading in at a distance that does not match the setting, which is the kind of wrong nobody attributes correctly.
Perspective only, because that is what a cascade fit assumes: the slices are cones about the view axis, and an orthographic camera's would be boxes. A projection this cannot describe sets ViewProjection directly and fits its shadows some other way.
Fields and properties (12)
public Vector3 PositionWhere the camera is.
public Vector3 ForwardWhich way it looks. Normalised on use rather than on construction.
public Vector3 UpWhich way is up, for the view basis.
public float FieldOfViewThe vertical field of view, in radians.
public float AspectRatioWidth over height.
public float NearPlaneThe near plane's distance.
public float FarPlaneThe far plane's distance.
public Camera LensThe camera component this view was described by, or a zeroed one for a view that is not a scene camera.
public static RenderCamera DefaultLooking down −Z from the origin, which is the engine's forward.
public Matrix4x4 ViewThe view matrix this camera describes.
public Matrix4x4 ProjectionThe projection matrix this camera describes.
public Matrix4x4 ViewProjectionWhat a shader and a frustum are both built from.
Methods (1)
Used by (24)
- AmbientOcclusionRendererVixen.Rendering.PostFx
- BufferTransferDeviceTestsVixen.Graphics.Golden.Tests
- CameraExtractionSystemVixen.Rendering
- CameraExtractionTestsVixen.Rendering.Tests
- ClusterCullingDeviceTestsVixen.Graphics.Golden.Tests
- ClusterGridVixen.Rendering
- ClusteredLightingTestsVixen.Rendering.Tests
- ClusteredShadingDeviceTestsVixen.Graphics.Golden.Tests
- CompositorImageTestsVixen.Graphics.Golden.Tests
- DepthOfFieldRendererVixen.Rendering.PostFx
- IrradianceBounceDeviceTestsVixen.Graphics.Golden.Tests
- IrradianceShadingDeviceTestsVixen.Graphics.Golden.Tests
- LensFlareRendererVixen.Rendering.PostFx
- LocalExposureRendererVixen.Rendering.PostFx
- MotionBlurRendererVixen.Rendering.PostFx
- ParticleRenderFeatureVixen.Rendering
- ParticleSpriteDeviceTestsVixen.Graphics.Golden.Tests
- PostEffectTestsVixen.Rendering.PostFx.Tests
- RenderViewVixen.Rendering
- SceneLightingVixen.Rendering
- ShadowMapRendererVixen.Rendering
- ShadowMapRendererTestsVixen.Rendering.Tests
- TonemapRendererVixen.Rendering.PostFx
- ViewConstantsVixen.Rendering