Hierarchy

  • RenderPassShaderQuad
    • RenderPassUpsample

Properties

_name: string
_options: any

The options specified when the render target was initialized.

afterPasses: RenderPass[] = []

Render passes which need to be executed after this pass.

beforePasses: RenderPass[] = []

Render passes which need to be executed before this pass.

blendState: BlendState = BlendState.NOBLEND

A blend state to use when rendering the quad. Defaults to BlendState.NOBLEND.

colorArrayOps: ColorAttachmentOps[] = []

Array of color attachment operations. The first element corresponds to the color attachment 0, and so on.

cullMode: number = CULLFACE_NONE

The cull mode to use when rendering the quad. Defaults to CULLFACE_NONE.

depthState: DepthState = DepthState.NODEPTH

A depth state to use when rendering the quad. Defaults to DepthState.NODEPTH.

depthStencilOps: DepthStencilAttachmentOps

The graphics device.

executeEnabled: boolean = true

True if the render pass is enabled and execute function will be called. Note that before and after functions are called regardless of this flag.

fullSizeClearRect: boolean = true

True if the render pass uses the full viewport / scissor for rendering into the render target.

renderTarget: RenderTarget

The render target for this render pass:

  • undefined: render pass does not render to any render target
  • null: render pass renders to the backbuffer
  • Otherwise, renders to the provided RT.
requiresCubemaps: boolean = true

If true, this pass might use dynamically rendered cubemaps. Use for a case where rendering to cubemap faces is interleaved with rendering to shadows, to avoid generating cubemap mipmaps. This will likely be retired when render target dependency tracking gets implemented.

samples: number = 0

Number of samples. 0 if no render target, otherwise number of samples from the render target, or the main framebuffer if render target is null.

stencilBack: StencilParameters = null

Stencil parameters for back faces to use when rendering the quad. Defaults to null.

stencilFront: StencilParameters = null

Stencil parameters for front faces to use when rendering the quad. Defaults to null.

quadVertexShader: string = ...

A simple vertex shader used to render a quad, which requires 'vec2 aPosition' in the vertex buffer, and generates uv coordinates uv0 for use in the fragment shader.

Accessors

Methods

  • Creates a quad shader from the supplied fragment shader code.

    Parameters

    • name: string

      A name of the shader.

    • fs: string

      Fragment shader source code.

    • Optional shaderDefinitionOptions: {
          fragmentOutputTypes: string | string[];
          useTransformFeedback: boolean;
      } = {}

      Additional options that will be added to the shader definition.

      • fragmentOutputTypes: string | string[]

        Fragment shader output types, which default to vec4. Passing a string will set the output type for all color attachments. Passing an array will set the output type for each color attachment.

      • useTransformFeedback: boolean

        Whether to use transform feedback. Defaults to false.

    Returns object

    Returns the created shader.

  • Parameters

    • Optional renderTarget: RenderTarget = null

      The render target to render into (output). This function should be called only for render passes which use render target, or passes which render directly into the default framebuffer, in which case a null or undefined render target is expected.

    • options: any = null

    Returns void

  • Mark render pass as clearing the full color buffer.

    Parameters

    • color: Color

      The color to clear to, or undefined to preserve the existing content.

    Returns void

  • Mark render pass as clearing the full depth buffer.

    Parameters

    • depthValue: number

      The depth value to clear to, or undefined to preserve the existing content.

    Returns void

  • Mark render pass as clearing the full stencil buffer.

    Parameters

    • stencilValue: number

      The stencil value to clear to, or undefined to preserve the existing content.

    Returns void