s.width / gl.canvas.height;
            const sourceAspectRatio = sourceWidth / sourceHeight;

            let xScale = 1.0;
            let yScale = 1.0;

            if( canvasAspectRatio > sourceAspectRatio )
            {
                yScale = canvasAspectRatio / sourceAspectRatio;
            }
            else
            {
                xScale = sourceAspectRatio / canvasAspectRatio;
            }

            // upload image/video to GPU
            //-------------------------------------------