fix(webgl2): correct viewport height, add opt-in WebGL2NoColorConversion flag - #997
Open
Endymi0n74 wants to merge 1 commit into
Open
fix(webgl2): correct viewport height, add opt-in WebGL2NoColorConversion flag#997Endymi0n74 wants to merge 1 commit into
Endymi0n74 wants to merge 1 commit into
Conversation
…n (flag) - gl.viewport() used drawingBufferWidth for both dimensions; the height is now drawingBufferHeight (a non-square canvas rendered stretched/scaled). - New opt-in BX_FLAGS.WebGL2NoColorConversion: skips the browser color management on video uploads (UNPACK_COLORSPACE_CONVERSION_WEBGL=NONE). Off by default — slight color shift possible on some machines. Both are one-line behaviour changes on the WebGL2 renderer path. Default behaviour is unchanged (flag off). 🤖 Generated with Codebuff Co-Authored-By: Codebuff <noreply@codebuff.com>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Quoi
Deux corrections indépendantes du renderer WebGL2, dans un seul fichier + le flag associé :
gl.viewport(0, 0, gl.drawingBufferWidth, gl.drawingBufferWidth)utilisait la largeur pour la hauteur. Avec un canvas non carré, le rendu était étiré/recadré. Correct :gl.drawingBufferHeight.WebGL2NoColorConversion:gl.pixelStorei(gl.UNPACK_COLORSPACE_CONVERSION_WEBGL, gl.NONE)saute la gestion des couleurs du navigateur sur les uploads vidéo — un léger décalage de couleurs est possible, le flag est désactivé par défaut (DEFAULT_FLAGS+ typeBxFlags).Pourquoi c'est sûr
false).pixelStorein'est exécuté que si le flag est activé par le build (window.BX_FLAGS).Détails
webgl2-player.ts(+7/−1),bx-flags.ts(+1),types/index.d.ts(+1)bun build.ts --version 6.7.12 --variant full→ exit 0 (gate eslint + TS)