Fix: TV screen material renders video as is

This commit is contained in:
Dejvino
2025-11-17 13:35:51 +01:00
parent 272c4267a3
commit 1a7b93bc7c
3 changed files with 47 additions and 6 deletions
+19
View File
@@ -0,0 +1,19 @@
export const screenVertexShader = `
varying vec2 vUv;
void main() {
vUv = uv;
gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);
}
`;
export const screenFragmentShader = `
varying vec2 vUv;
uniform sampler2D videoTexture;
void main() {
// Sample the video texture
gl_FragColor = texture2D(videoTexture, vUv);
}
`;