View
A View encompasses all the state needed for rendering a Scene.
Renderer.render() operates on View objects. These View objects specify important parameters such as the Scene, Camera, Viewport, and various rendering parameters.
View instances are heavy objects that internally cache a lot of data needed for rendering. It is not advised for an application to use many View objects. For example, in a game, a View could be used for the main scene and another one for the game's user interface. More View instances could be used for creating special effects (a View is akin to a rendering pass).
See also
, Camera, RenderTarget
Properties
Screen-space ambient occlusion (SSAO) configuration. The getter returns a snapshot — mutate it and assign back to apply.
Post-process anti-aliasing operator (AntiAliasing.FXAA by default).
Bloom post-processing configuration (requires post-processing enabled). The getter returns a snapshot — mutate it and assign back to apply.
Color grading to apply, or null for the default. The View does not own it.
Depth-of-field post-processing configuration (needs a focused camera). The getter returns a snapshot — mutate it and assign back to apply.
Dithering applied to the final render to hide banding. Default: Dithering.TEMPORAL.
Dynamic-resolution (render scaling) configuration for this View. The getter returns a snapshot — mutate it and assign back to apply.
The effective grid size used for world-origin snapping: gridSize when positive, otherwise the automatically calculated size.
Large-scale atmospheric fog configuration. The getter returns a snapshot — mutate it and assign back to apply.
Guard-band configuration, letting some effects sample outside the viewport. The getter returns a snapshot — mutate it and assign back to apply.
Inverts the winding order considered front-facing (counter-clockwise by default). Useful for mirror-like reflections rendered with a flipped camera.
Culls renderables outside the camera frustum. Default: true (disable only for debugging).
Enables or disables the post-processing stage (tone mapping, bloom, color grading, FXAA, dynamic scaling, …). Disabling it also disables features that depend on it. Default: enabled.
Enables screen-space refraction for refractive materials. Default: true.
Master switch for shadow mapping in this View. Default: true.
Allocates a stencil buffer for this View (required for stencil-based effects). Default: false.
Includes transparent renderables in pick results. Default: true.
Returns the [x, y] scale factors dynamic resolution used on the last frame.
Hardware MSAA configuration (independent of antiAliasing/TAA). The getter returns a snapshot — mutate it and assign back to apply.
The native object, for interop with code calling the Fila* C API directly. Read-only: this wrapper owns it.
Global quality/performance trade-offs (e.g. color-buffer precision) for this View. The getter returns a snapshot — mutate it and assign back to apply.
Off-screen RenderTarget to render into, or null to render into the SwapChain. The render target is not owned by the View.
Screen-space reflections configuration. The getter returns a snapshot — mutate it and assign back to apply.
Shadow mapping technique for the whole View (ShadowType.PCF, VSM, DPCF, PCSS).
Soft shadow options; only applies when shadowType is DPCF or PCSS. The getter returns a snapshot — mutate it and assign back to apply.
Stereoscopic (VR) rendering configuration; must be set before the first frame. The getter returns a snapshot — mutate it and assign back to apply.
Temporal anti-aliasing (TAA) configuration; effective when antiAliasing permits it. The getter returns a snapshot — mutate it and assign back to apply.
Vignette post-processing configuration. The getter returns a snapshot — mutate it and assign back to apply.
Returns the current visible-layer bitmask.
Returns the most recent number of visible renderables for the current Scene, as calculated the last time Renderer.render() was called with this View and Scene.
Variance shadow mapping options; only applies when shadowType is ShadowType.VSM. The getter returns a snapshot — mutate it and assign back to apply.
Functions
Discards accumulated frame history (TAA, SSR). Call after a camera cut to avoid ghosting.
Returns the float4 material-global value at index (0–3).
Whether the depth buffer is cleared before light channel renders.
Enables or disables clearing the depth buffer before each light channel (0–7) renders. Default: disabled.
Sets the near/far planes (in world units, > 0) used to compute the froxel grid for dynamic lighting. Only lights within this range are lit. Defaults: 5 / 100.
Enables or disables a single visibility layer (0–7).
Sets the float4 material-global value at index (0–3), readable from all materials.