WebGLMultipleRenderTargets - Verge3D 用户手册 - Soft8Soft
Description: 了解如何在使用 Verge3D 制作的交互式 3D 应用程序中使用 WebGLMultipleRenderTargets

WebGLRenderTarget →

# WebGLMultipleRenderTargets

A special render target that enables a fragment shader to write to several textures. This approach is useful for advanced rendering techniques like post-processing or deferred rendering.

WebGLMultipleRenderTargets can only be used with a WebGL 2 rendering context.

## Constructor

### WebGLMultipleRenderTargets(width : Integer, height : Integer, count : Integer, options : Object)

- width — the width of the render target. Default is `1`.
- height — the height of the render target. Default is `1`.
- count — the number of render targets. Default is `1`.
- options — (optional) object that holds texture parameters for an auto-generated target texture and depthBuffer/stencilBuffer booleans.

For an explanation of the texture parameters see Texture. For a list of valid options, see WebGLRenderTarget.

## Properties

### # .isWebGLMultipleRenderTargets : Boolean

Read-only flag to check if a given object is of type WebGLMultipleRenderTargets.

### # .texture : Array

The texture property is overwritten in WebGLMultipleRenderTargets and replaced with an array. This array holds the texture references of the respective render targets.

WebGLRenderTarget properties are available on this class.

## Methods

WebGLRenderTarget methods are available on this class.

## 源代码

关于如何获取此模块的源代码，请查看 本页。