Fix: TV screen material renders video as is
This commit is contained in:
@@ -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);
|
||||
}
|
||||
`;
|
||||
|
||||
Reference in New Issue
Block a user