-
-
Notifications
You must be signed in to change notification settings - Fork 35.1k
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
WebGLRenderer: Create WebGL2 context by default #19620
Conversation
weee 👍 |
Hmm... I'm seeing regressions... https://raw.githack.com/mrdoob/three.js/dev/examples/webgl_loader_gltf.html Before: After: |
@elalish Seems to be the You can test this on model-viewer by passing WebGL2 context to the renderer: var canvas = document.createElement( 'canvas' );
var context = canvas.getContext( 'webgl2', { alpha: false } );
renderer = new THREE.WebGLRenderer( { canvas: canvas, context: context } ); |
Another regression... https://raw.githack.com/mrdoob/three.js/dev/examples/webgl_shaders_tonemapping.html Before: After: |
So if the user needs a WebGL 1 context, it's necessary to create it on application level and pass it into the renderer, right? |
webgl_mirror_nodes is broken with shader compilation errors. |
Should be fixed via #19625. |
What would a use case be to not want WebGL 2? |
For example a project does not have the budget to update its shader code (see #19627) but still needs an important bug fix in a newer |
|
This comment has been minimized.
This comment has been minimized.
I think that's fair. Here are 2 possible ways: new THREE.WebGLRenderer( { forceWebGL1: true } ); Or make a new class that extends new THREE.WebGL1Renderer(); And the internal code would just do I think I prefer the later? |
I'm fine with both. Pick the one you like the best 😇 . In any event, it's good if we provide users an easy fallback just for the case they struggle with the migration. |
Fixes #19040