diff --git a/cocos/core/gfx/webgl/webgl-device.ts b/cocos/core/gfx/webgl/webgl-device.ts index 5a16c00bbe..9ad1aff86d 100644 --- a/cocos/core/gfx/webgl/webgl-device.ts +++ b/cocos/core/gfx/webgl/webgl-device.ts @@ -257,6 +257,10 @@ export class WebGLGFXDevice extends GFXDevice { this._depthBits = gl.getParameter(gl.DEPTH_BITS); this._stencilBits = gl.getParameter(gl.STENCIL_BITS); + if (CC_ALIPAY) { + this._depthBits = 24; + } + this._devicePixelRatio = info.devicePixelRatio || 1.0; this._width = this._canvas.width; this._height = this._canvas.height; @@ -314,6 +318,10 @@ export class WebGLGFXDevice extends GFXDevice { this._OES_element_index_uint = this.getExtension('OES_element_index_uint'); this._ANGLE_instanced_arrays = this.getExtension('ANGLE_instanced_arrays'); + if (CC_ALIPAY) { + this._WEBGL_depth_texture = { UNSIGNED_INT_24_8_WEBGL: 0x84FA }; + } + this._features.fill(false); if (this._WEBGL_color_buffer_float) {