Creates a new RenderPass instance. Automatically assigns a unique render pass UID.
Optional
Internal
__renderColor attachment targets for rendering
If this value is greater than 1, buffer-less rendering is performed with the specified number of vertices. In this case, registered entities are ignored and not rendered.
A dummy primitive used for buffer-less rendering
Internal
_isWhether the sort render result has changed
Internal
_lastLast index of blend with Z-write primitives in the render queue
Internal
_lastLast index of blend without Z-write primitives in the render queue
Internal
_lastLast camera controller components update count for change detection
Internal
_lastLast index of opaque primitives in the render queue
Internal
_lastArray of last primitive UIDs for optimization
Internal
_lastLast scene graph components update count for change detection
Internal
_lastLast transform components update count for change detection
Internal
_lastLast index of translucent primitives in the render queue
The primitive mode used for buffer-less rendering
Internal
_renderedWhether something was rendered in the previous frame
Collection of tags associated with this object
Whether to render blend with Z-write primitives contained in this render pass
Whether to render blend without Z-write primitives contained in this render pass
Whether to render opaque primitives contained in this render pass
Whether to render translucent primitives contained in this render pass
Optional
cameraThe camera component used for rendering this pass
The color value used to clear the color buffer (RGBA format)
The depth value used to clear the depth buffer (typically 1.0 for far plane)
The stencil value used to clear the stencil buffer
Depth write mask for primitives drawing. When false, depth values are not written to the depth buffer, but depth clear is still performed.
Whether to enable depth testing during rendering
Whether this render pass outputs for VR display
Whether VR rendering is enabled for this render pass
Whether to clear the color buffer before rendering
Whether to clear the depth buffer before rendering
Whether to clear the stencil buffer before rendering
Whether to render Effekseer effects in this render pass
Static
Readonly
InvalidInvalid object UID constant
Static
Internal
__mesh_Static counter for generating unique mesh UIDs
Static
currentCurrent maximum object count for UID generation
Internal
Gets the optimized mesh components collection for rendering. This collection is filtered based on the rendering flags for different primitive types.
An array of mesh components that should be rendered
Gets the list of all entities in this render pass.
An array of scene graph entities
Gets all mesh components from entities in this render pass. This includes all mesh components regardless of rendering flags.
An array of all mesh components
Gets the unique object identifier
The object's UID
Gets the unique identifier for this render pass.
The render pass UID
Gets all top-level scene graph components in this render pass. These are the root components of the scene graph hierarchies.
An array of top-level scene graph components
Gets the unique name of this object
The unique name string
Internal
Copies tag data from another RnObject instance to this object
The source RnObject to copy tags from
Adds entities to be rendered in this render pass. The entities and their hierarchies are flattened and collected for rendering. Duplicate entities are automatically eliminated.
An array of scene graph entities to add
Creates a deep clone of this render pass. All properties and collections are copied, creating an independent instance.
A new RenderPass instance that is a copy of this one
Determines the appropriate material to use for rendering a primitive. The priority order is:
The primitive to get the material for
The material that should be used for rendering the primitive
Gets the current framebuffer assigned to this render pass.
The framebuffer, or undefined if rendering to the default framebuffer
Gets the current render target color attachments.
Array of render buffer target enums, or undefined if using defaults
Gets the current resolve framebuffer.
The resolve framebuffer, or undefined if not set
Gets the current secondary resolve framebuffer.
The secondary resolve framebuffer, or undefined if not set
Gets the current viewport settings.
A Vector4 containing (x, y, width, height) of the viewport, or undefined if not set
Checks if this object has all the specified tags with exactly matching values
Object containing tag names as keys and expected values
True if all specified tags exist with matching values, false otherwise
Checks if the object's combined tag string contains all the provided search strings. This allows for flexible searching within tag names and values.
Array of strings that must all be present in the combined tag string
True if all strings are found in the combined tag string, false otherwise
Configures this render pass for full-screen buffer-less rendering. This is a convenience method that sets up triangle-based full-screen rendering with 3 vertices, commonly used for post-processing effects.
The material to use for full-screen rendering
Configures this render pass for buffer-less rendering mode. In buffer-less rendering, vertices are generated procedurally without vertex buffers. This is useful for full-screen effects or procedural geometry. When enabled, registered entities are ignored and not rendered.
The primitive mode to use for rendering
Number of vertices to generate and render
The material to use for rendering
Sets the target framebuffer for this render pass. If multiple render passes share a framebuffer, they will render to the same target. Setting a framebuffer automatically configures the viewport to match the framebuffer size.
Optional
framebuffer: FrameBufferThe framebuffer to render to, or undefined to render to the default framebuffer
Sets a default material for all primitives in this render pass. This material will be used for any primitive that doesn't have a specific material override set via setMaterialForPrimitive().
The default material to use for all primitives
Sets the color attachment targets for rendering. This specifies which color attachments of the framebuffer should be rendered to.
Optional
indeces: RenderBufferTargetEnum[]Array of render buffer target enums, or undefined to use default targets
Sets the resolve framebuffer for multisampling. The resolve framebuffer is used as the destination when resolving multisampled content.
Optional
framebuffer: FrameBufferThe resolve framebuffer, or undefined to disable resolving
Sets the secondary resolve framebuffer. This can be used for additional resolve operations or multi-target resolving.
Optional
framebuffer: FrameBufferThe secondary resolve framebuffer, or undefined to disable
Sets the viewport for this render pass. The viewport defines the rectangular area of the framebuffer that will be rendered to.
A Vector4 containing (x, y, width, height) of the viewport
Attempts to set a tag on this object. If the tag already exists, it will be replaced.
The tag object containing the name and value to set
True if the tag was successfully set, false if the tag name contains invalid characters
Attempts to set a unique name for this object
The desired unique name
If true, appends UID to make name unique when conflicts occur; if false, fails on conflict
True if the name was successfully set, false if there was a conflict and toAddNameIfConflict was false
Static
_resetStatic
getStatic
getStatic
searchSearches for the first object that has a specific tag with the given value
The tag name to search for
The tag value to match
WeakRef to the first matching object, or undefined if not found
A render pass represents a collection of rendering resources and settings used in the rendering pipeline. It manages entities, materials, framebuffers, and various rendering states to control how objects are rendered.
Example