Video Texture - how to keep video aspect in new material

Hi!
Based on @xiaomingTang’s fiddle:
https://jsfiddle.net/prisoner849/zmg4ybkq/

float ratio = 16. / 9.; //480./204.;

you just need to know the actual ratio of a video or an image, thus you can pass it to the shader as a uniform.

4 Likes