Skip to content

Commit

Permalink
Update VideoTexture doc with note about using RGBA format to avoid Fi…
Browse files Browse the repository at this point in the history
…refox 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.
  • Loading branch information
jlivak authored Apr 29, 2021
1 parent 4ad8243 commit 54a207c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions docs/api/en/textures/VideoTexture.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,9 @@ <h3>[name]( [param:Video video], [param:Constant mapping], [param:Constant wrapS
[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 />
Expand Down

0 comments on commit 54a207c

Please sign in to comment.