three.js WebGLMultipleRenderTargets

2023-02-16 17:47 更新

一個(gè)特殊的渲染目標(biāo),使片段著色器能夠?qū)懭攵鄠€(gè)紋理。這種方法對(duì)于高級(jí)渲染技術(shù)很有用,例如后處理或延遲渲染。注意:WebGLMultipleRenderTargets 只能與 WebGL 2 渲染上下文一起使用。

示例

webgl2 / multiple / rendertargets

構(gòu)造函數(shù)

WebGLMultipleRenderTargets(width : Number, height : Number, count : Number)

width - 渲染目標(biāo)的寬度。默認(rèn)值為 1。

height - 渲染目標(biāo)的高度。默認(rèn)值為 1。

count - 渲染目標(biāo)的數(shù)量。默認(rèn)值為 1。

屬性

.isWebGLMultipleRenderTargets : Boolean

只讀標(biāo)志,用于檢查給定對(duì)象是否屬于 WebGLMultipleRenderTargets 類型。

.texture : Array

紋理屬性在 WebGLMultipleRenderTargets 中被覆蓋并替換為數(shù)組。該數(shù)組包含各個(gè)渲染目標(biāo)的紋理引用。

WebGLRenderTarget 屬性在此類上可用。

方法

WebGLRenderTarget 方法在此類上可用。

源碼

src/renderers/WebGLMultipleRenderTargets.js


以上內(nèi)容是否對(duì)您有幫助:
在線筆記
App下載
App下載

掃描二維碼

下載編程獅App

公眾號(hào)
微信公眾號(hào)

編程獅公眾號(hào)