浏览代码

Update VideoTexture doc with note about using RGBA format to avoid Firefox performance issue. (#21746)

* VideoTexture should use RGBA format to avoid firefox issue.

There's an issue with Firefox desktop that causes RGBFormat on a video texture to destroy performance.  When testing with a single 4K 360 video, frame times on Firefox with RGBFormat were ~200x RGBAFormat.  (62ms vs .32ms)  I propose defaulting to RGBAFormat to avoid this.

* Revert VideoTexture.js changes.

* Update VideoTexture doc with 'format' default value and note about a Firefox bug.
Jake Livak 4 年之前
父节点
当前提交
54a207c16c
共有 1 个文件被更改,包括 3 次插入2 次删除
  1. 3 2
      docs/api/en/textures/VideoTexture.html

+ 3 - 2
docs/api/en/textures/VideoTexture.html

@@ -49,8 +49,9 @@
 		[page:Constant minFilter] -- How the texture is sampled when a texel covers less than one pixel.
 		The default is [page:Textures THREE.LinearMipmapLinearFilter]. See [page:Textures minification filter constants] for other choices.<br />
 
-		[page:Constant format] -- The format used in the texture.
-		See [page:Textures format constants] for other choices.<br />
+		[page:Constant format] -- The default is [page:Textures THREE.RGBFormat].
+		See [page:Textures format constants] for other choices.
+		Note that a bug has been reported with Firefox's WebGL implementation where use of [page:Textures THREE.RGBFormat] on a VideoTexture can result in a significant performance penalty, if you encounter this issue it is recommended to pass in [page:Textures THREE.RGBAFormat] instead.<br />
 
 		[page:Constant type] -- Default is [page:Textures THREE.UnsignedByteType].
 		See [page:Textures type constants] for other choices.<br />