1
0
Эх сурвалжийг харах

WebGPURenderer: Explicitly set `VideoTexture#colorSpace` to `SRGBColorSpace` (#31534)

* fix

* shorten

* lint
ycw 6 сар өмнө
parent
commit
10a2144d99

+ 1 - 0
examples/webgpu_lights_projector.html

@@ -191,6 +191,7 @@
 							video.play();
 
 							videoTexture = new THREE.VideoTexture( video );
+							videoTexture.colorSpace = THREE.SRGBColorSpace;
 
 						}
 

+ 1 - 0
examples/webgpu_materials_video.html

@@ -97,6 +97,7 @@
 				} );
 
 				texture = new THREE.VideoTexture( video );
+				texture.colorSpace = THREE.SRGBColorSpace;
 
 				//
 

+ 3 - 0
src/textures/VideoTexture.js

@@ -10,6 +10,9 @@ import { Texture } from './Texture.js';
  * const texture = new THREE.VideoTexture( video );
  * ```
  *
+ * Note: When using video textures with {@link WebGPURenderer}, {@link Texture#colorSpace} must be
+ * set to THREE.SRGBColorSpace.
+ *
  * Note: After the initial use of a texture, its dimensions, format, and type
  * cannot be changed. Instead, call {@link Texture#dispose} on the texture and instantiate a new one.
  *

粤ICP备19079148号