Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IE/Edge scale non-square-aspect-ratio files jaggedly using WebGL #277

Closed
brion opened this issue Jul 23, 2015 · 5 comments

Comments

Projects
None yet
3 participants
@brion
Copy link
Owner

commented Jul 23, 2015

Switching back to the stripe texture for IE/Edge speeds up WebGL drawing significantly due to the slow upload of non-RGBA textures, but it disables the antialiasing on the texture.

This has no effect on files with square pixels because we draw 1:1 into the canvas, which is then scaled to the desired output size... but on files with non-square pixel aspect ratio, we have a canvas at the square-pixel-equivalent display size and draw into it, which can create jaggies for instance on Xylocopa WebM version:

https://brionv.com/misc/ogv.js/demo2/#file=Xylocopa_violacea_male_-_2012-10-23.webm&search=jarry&size=360p.webm

xylocopa edge vs firefox

@brion brion added this to the ogv.js 1.1 - cleanup milestone Jul 23, 2015

@brion brion added the bug label Aug 17, 2015

@patrickkettner

This comment has been minimized.

Copy link

commented Aug 17, 2015

Hey @brion! I work on Edge and just wanted to let you know that I reported this internally and we are working on it.

Thanks a ton for listing the issue so we can find it :D

@hartman

This comment has been minimized.

Copy link

commented Aug 25, 2015

@brion brion modified the milestones: ogv.js 2.0 - modular cleanup, ogv.js 1.2 - various improvements Apr 28, 2016

@brion

This comment has been minimized.

Copy link
Owner Author

commented Jun 2, 2016

On further investigation, it looks about the same on Mac OS X without the stripe texture stuff if I use gl.NEAREST as the mag filter... nearest neighbor just looks awful. ;)

I think the thing to do is to do some rendering into frame buffers so can do the unpacking in one step (no texture filtering) and then the YUV-RGB blit in the second (with linear filtering).

@brion

This comment has been minimized.

Copy link
Owner Author

commented Oct 27, 2017

Ended up just removing the stripe optimization, it's a pain in the butt for relatively little benefit.

Note that artifacting seemed worse with Intel GPUs than with NVidia GPUs. Could be a difference in how they handle nearest-neighbor sampling at funky boundaries.

@brion

This comment has been minimized.

Copy link
Owner Author

commented Oct 28, 2017

Actually ended up retooling the stripe unpacking as a separate render step, it's all much cleaner now. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.