-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reduce font oversampling due to texture limits
Rendering the webui on mobile chromium fails with logging the error message: `INVALID_VALUE: texImage2D: width or height out of range _glTexImage2D` After playing a bit more with remote debugging on chrome and firefox i found out a bit more: - glTexImage2D is called 3 times during the initialisation regardless of browser choice, twice with a 120x100 texture (probably the fair logo in light and dark) and once with a 4096x16384 texture - on my pc GLctx.getParameter(GLctx.MAX_TEXTURE_SIZE) returns 32k, on my phone it returns only 4k. This number seems to be the maximum supported texture dimension, so the height of the second one would violate that. (also that corresponds to ~270Mb ). (the browser window is actually 432*834, so this texture fits the whole screen more than 200 times) - Still don't know why this is not a problem on mobile firefox, since this is only a warning maybe it's just that firefox uses only the valid parts of the returned texture or handles this case differently. - we use 4 times font oversampling (to ensure that the fonts look good when the flowgraph is zoomed) and at the same time and all that for 4 different font sizes (+ some icons). I assume the flowgraph could just use the biggest fontsize without oversampling and be scaled down by default. This PR tries to set the oversampling to 2, which will result in a 75% smaller font atlas texture. Even without any oversampling there was only a slight blur in the flowgraph view fonts, so for now 2x oversampling should be a good compromise. Signed-off-by: Alexander Krimm <[email protected]>
- Loading branch information
Showing
1 changed file
with
74 additions
and
103 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters