Skip to content

VideoTexture’s colorSpace not working on Emissive channel #29625

@vis-prime

Description

@vis-prime

Description

When a videoTexture is applied on emissiveMap of a MeshStandardMaterial , SRGBColorSpace does not work and it always stays in Linear Color Space.

Reproduction steps

  • create videoTexture
  • set its colorspace to SRGBColorSpace
  • Apply video texture on emissiveMap of MeshStandardMaterial
  • make emissive color white and diffuse color black so its simulating a real life 'display/screen/tv'
  • notice the video's colors look washed out as its displaying in Linear Color Space

Code

 const videoTexture = new THREE.VideoTexture(videoElem)
 videoTexture.colorSpace = THREE.SRGBColorSpace
 
 const emit_mesh = new THREE.Mesh(planeGeometry, new THREE.MeshStandardMaterial({
    color: 0x000000,
    emissive: 0xffffff,
    emissiveMap: videoTexture,
  }))
  scene.add(emit_mesh)

Live example

In this demo jsfiddle.net

The same VideoTexture and an ImageTexture is applied on

emissiveMap input of a MeshStandardMaterial
map input of a MeshStandardMaterial
map input of a MeshBasicMaterial

& GUI controls colorSpace of both

Screenshots

(look at the top right plane in this video)

Untitled.video.-.Made.with.Clipchamp.mp4

Version

r169

Device

Desktop

Browser

Chrome

OS

Windows

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions