|
|
@@ -85,7 +85,6 @@ class WebGLState {
|
|
|
this.currentBoundTextures = {};
|
|
|
this.currentBoundBufferBases = {};
|
|
|
|
|
|
-
|
|
|
this._init();
|
|
|
|
|
|
}
|
|
|
@@ -271,6 +270,22 @@ class WebGLState {
|
|
|
|
|
|
}
|
|
|
|
|
|
+ setMRTBlending( textures ) {
|
|
|
+
|
|
|
+ const gl = this.gl;
|
|
|
+ const drawBuffersIndexedExt = this.backend.drawBuffersIndexedExt;
|
|
|
+
|
|
|
+ if ( ! drawBuffersIndexedExt ) return;
|
|
|
+
|
|
|
+ for ( let i = 1; i < textures.length; i ++ ) {
|
|
|
+
|
|
|
+ // use opaque blending for additional render targets
|
|
|
+ drawBuffersIndexedExt.blendFuncSeparateiOES( i, gl.ONE, gl.ZERO, gl.ONE, gl.ZERO );
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* Defines the blending.
|
|
|
*
|