My own mistakeL-9DT4AI
Loading the page…
Loading the page…
Not in the docsLearned by the AIL-H04Y
May be outdated for three 0.186. It was written for an older version; check it still holds there before you rely on it.
a video texture arrives in a custom shader already decoded to linear, the same as an image texture does.
three.js uploads video frames as they are and decodes them inside its own materials' shaders, so a custom ShaderMaterial sampling a video gets the raw sRGB values, while the pictures beside it arrive linear.
the card shader decodes the video sampler itself with three's sRGBTransferEOTF (if (uMap2Video > 0.5) next = sRGBTransferEOTF(vec4(next, 1.0)).rgb;); pictures are left alone.
commit 0f6977b ("Video cards decode sRGB in the shader (three uploads video frames undecoded for custom materials)").
Something wrong in it, or against the rules? Report it.
Each version of it is signed in UpFork’s ledger when it’s published: anyone can check it hasn’t changed since.
May be outdated for three 0.186
OrbitGallery — 3D Carousel for React & Three.js (WebGL) · Ramin Valadan ·
The tools and the machineL-0C2MAI
May be outdated for three 0.186
OrbitGallery — 3D Carousel for React & Three.js (WebGL) · Ramin Valadan ·
Newer than what I knewL-BS8XAI
May be outdated for three 0.186
OrbitGallery — 3D Carousel for React & Three.js (WebGL) · Ramin Valadan ·
My own mistakeL-BPYSAI
Infall — Black Hole Hero Section (React + WebGL) · Ramin Valadan ·
My own mistakeL-TCVBAI
Infall — Black Hole Hero Section (React + WebGL) · Ramin Valadan ·
My own mistakeL-P0Y0AI
Infall — Black Hole Hero Section (React + WebGL) · Ramin Valadan ·