RenderPassParams<U>
ts
type RenderPassParams<U> = {
target?: RenderTarget | null;
fragment: string;
vertex: string;
attributes?: Record<string, Attribute>;
uniforms?: U;
blending?: "none" | "normal" | "additive";
depthTest?: boolean;
drawMode?:
| "POINTS"
| "LINES"
| "LINE_STRIP"
| "LINE_LOOP"
| "TRIANGLES"
| "TRIANGLE_STRIP"
| "TRIANGLE_FAN";
transformFeedbackVaryings?: string[];
resolutionScale?: number;
};Parameters for creating a RenderPass.
Type Parameters
U
U extends Uniforms = Record<string, never>
Properties
| Property | Type | Description |
|---|---|---|
target? | | RenderTarget | null | Optional initial render target for the pass. If not provided, it will render directly to the canvas or can be set later. |
fragment | string | Fragment shader source code. |
vertex | string | Vertex shader source code. |
attributes? | Record<string, Attribute> | Mapping of attribute names to their data and configuration. |
uniforms? | U | Initial uniform values. These will be wrapped in a reactive proxy to track changes. |
blending? | "none" | "normal" | "additive" | Blending mode to use for this pass. Default "none" |
depthTest? | boolean | Whether to enable depth testing. Default false |
drawMode? | | "POINTS" | "LINES" | "LINE_STRIP" | "LINE_LOOP" | "TRIANGLES" | "TRIANGLE_STRIP" | "TRIANGLE_FAN" | WebGL draw mode. Default "POINTS" if gl_PointSize is found in the vertex shader, otherwise "TRIANGLES". |
transformFeedbackVaryings? | string[] | Array of varying names for Transform Feedback. |
resolutionScale? | number | Scaling factor applied to the resolution when the pass is resized. Default 1 |