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.
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.