Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions examples/webgpu_lights_projector.html
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@
video.play();

videoTexture = new THREE.VideoTexture( video );
videoTexture.colorSpace = THREE.SRGBColorSpace;

}

Expand Down
1 change: 1 addition & 0 deletions examples/webgpu_materials_video.html
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@
} );

texture = new THREE.VideoTexture( video );
texture.colorSpace = THREE.SRGBColorSpace;

//

Expand Down
6 changes: 6 additions & 0 deletions src/textures/VideoTexture.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ import { Texture } from './Texture.js';
* const texture = new THREE.VideoTexture( video );
* ```
*
* Note: Due to inherent design constraints in WebGPURenderer, .colorSpace must be explicitly set
* to SRGBColorSpace. Assigning alternative values may result in perceptible color inaccuracies,
* including luminance shifts and hue distortion. This outcome is a direct consequence of the
* renderer's internal texture handling mechanisms and is entirely independent of the color space
* employed by the browser during video decoding.
*
* 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.
*
Expand Down