|
@@ -16579,7 +16579,7 @@ function WebGLTextures(_gl, extensions, state, properties, capabilities, utils,
|
|
_gl.generateMipmap(target);
|
|
_gl.generateMipmap(target);
|
|
}
|
|
}
|
|
|
|
|
|
- function getInternalFormat(internalFormatName, glFormat, glType, encoding, forcePassthroughEncoding = false) {
|
|
|
|
|
|
+ function getInternalFormat(internalFormatName, glFormat, glType, encoding, isVideoTexture = false) {
|
|
if (isWebGL2 === false) return glFormat;
|
|
if (isWebGL2 === false) return glFormat;
|
|
|
|
|
|
if (internalFormatName !== null) {
|
|
if (internalFormatName !== null) {
|
|
@@ -16604,7 +16604,7 @@ function WebGLTextures(_gl, extensions, state, properties, capabilities, utils,
|
|
if (glFormat === _gl.RGBA) {
|
|
if (glFormat === _gl.RGBA) {
|
|
if (glType === _gl.FLOAT) internalFormat = _gl.RGBA32F;
|
|
if (glType === _gl.FLOAT) internalFormat = _gl.RGBA32F;
|
|
if (glType === _gl.HALF_FLOAT) internalFormat = _gl.RGBA16F;
|
|
if (glType === _gl.HALF_FLOAT) internalFormat = _gl.RGBA16F;
|
|
- if (glType === _gl.UNSIGNED_BYTE) internalFormat = encoding === sRGBEncoding && forcePassthroughEncoding === false ? _gl.SRGB8_ALPHA8 : _gl.RGBA8;
|
|
|
|
|
|
+ if (glType === _gl.UNSIGNED_BYTE) internalFormat = encoding === sRGBEncoding && isVideoTexture === false ? _gl.SRGB8_ALPHA8 : _gl.RGBA8;
|
|
if (glType === _gl.UNSIGNED_SHORT_4_4_4_4) internalFormat = _gl.RGBA4;
|
|
if (glType === _gl.UNSIGNED_SHORT_4_4_4_4) internalFormat = _gl.RGBA4;
|
|
if (glType === _gl.UNSIGNED_SHORT_5_5_5_1) internalFormat = _gl.RGB5_A1;
|
|
if (glType === _gl.UNSIGNED_SHORT_5_5_5_1) internalFormat = _gl.RGB5_A1;
|
|
}
|
|
}
|
|
@@ -17550,7 +17550,7 @@ function WebGLTextures(_gl, extensions, state, properties, capabilities, utils,
|
|
|
|
|
|
const glFormat = utils.convert(texture.format, texture.encoding);
|
|
const glFormat = utils.convert(texture.format, texture.encoding);
|
|
const glType = utils.convert(texture.type);
|
|
const glType = utils.convert(texture.type);
|
|
- const glInternalFormat = getInternalFormat(texture.internalFormat, glFormat, glType, texture.encoding, true);
|
|
|
|
|
|
+ const glInternalFormat = getInternalFormat(texture.internalFormat, glFormat, glType, texture.encoding);
|
|
const samples = getRenderTargetSamples(renderTarget);
|
|
const samples = getRenderTargetSamples(renderTarget);
|
|
|
|
|
|
_gl.renderbufferStorageMultisample(_gl.RENDERBUFFER, samples, glInternalFormat, renderTarget.width, renderTarget.height);
|
|
_gl.renderbufferStorageMultisample(_gl.RENDERBUFFER, samples, glInternalFormat, renderTarget.width, renderTarget.height);
|