-
-
Notifications
You must be signed in to change notification settings - Fork 35.2k
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 WebGL2.0 initial support with GLSL 1 to 3 runtime conversion #13717
Merged
Merged
Changes from all commits
Commits
Show all changes
41 commits
Select commit
Hold shift + click to select a range
d1d38c9
WebGLRenderer WebGL2.0 basic support
takahirox 63839ee
Minor clean up
takahirox b17356f
Add internalFormat conversion function to WebGLTextures
takahirox 24e0ec4
Update setupFrameBufferTexture()
takahirox b3af65a
Skip GLSL conversion if material is RawShaderMaterial
takahirox b1f0db4
Ignore EXT_frag_depth for WebGL 2.0
takahirox a04bea6
Ignore EXT_shader_texture_lod for WebGL 2.0
takahirox 5392545
Update instancing for WebGL 2.0
takahirox 2b0dac6
Clean up WebGLUtils
takahirox cf3ff01
Clean up WebGLProgram
takahirox 32cb672
Add .isGLSL3 to ShaderMaterial
takahirox 2456569
Clean up WebGLTextures
takahirox 6065f4f
Update EXT_blend_minmax handling for WebGL 2.0
takahirox f02117f
Update WebGLUtils for WebGL 2.0 UNSIGNED_INT_24_8
takahirox c1ff8fc
Update internalFormat for WebGL2.0
takahirox 7a4dc58
Add WebGL_draw_buffers as built-in extensionn for WebGL2.0 to WebGLEx…
takahirox fd7ced8
Clean up WebGLProgram
takahirox 949623b
Add webgl2 option to WebGLRenderer
takahirox 89c1738
Update WebGLTextures for gl.RGB
takahirox 42831e8
Update getInternalFormat() in WebGLTextures
takahirox 51dad3f
Fix HalfFloatType bug in WebGLUtils
takahirox e11ed2b
Clean up WebGLUtils
takahirox ddc4893
Enable webgl2_sandbox example
takahirox 4ec384f
Remove trailing space
takahirox b53cec2
Do not force POT texture for WebGL2
takahirox 5219c0f
Save isWebGL2 to WebGL context object
takahirox 3f0dfd9
Add webgl2 to Detector
takahirox 062d7db
Remove .isGLSL3 property from ShaderMaterial and determine GLSL3 shad…
takahirox 8ca782f
Rename webgl2 with autoWebgl2
takahirox 325d8e9
Add webgl2 option to WebGLRenderer
takahirox 3cdf35b
Combine webgl2 and autoWebgl2 options to webglVersion
takahirox dc11ded
Revert the change of WebGLRenderer.setRenderTarget
takahirox bdbc68b
Revert the change of setupFrameBufferTexture in WebGLTextures
takahirox 46ee5b6
Remove workaround from WebGLExtensions and add if ( gl.isWebGL2 ) ins…
takahirox ab65cb7
Merge remote-tracking branch 'upstream/dev' into WebGLRendererWebGL2.0
takahirox acee27d
Remove webglVersion option from WebGLRenderer constructor
takahirox f696296
Revert "Remove webglVersion option from WebGLRenderer constructor"
takahirox d177df5
Revert "Enable webgl2_sandbox example"
takahirox 158fc6c
Update webgl2_sandbox example
takahirox fda6fac
Remove webglVersion option from WebGLRenderer constructor.
takahirox a18d1a2
Merge branch 'dev' into WebGLRendererWebGL2.0
takahirox File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
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
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
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
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wouldn't pollute the webgl context. What about adding a
isWebGL2
attribute on theWebGLRenderer
itself?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the problem is that certain modules of the renderer like
WebGLBufferRenderer
do not have a reference to the renderer but to the raw WebGL context instead. If we addisWebGL2
toWebGLRenderer
, we need to pass it to the respective modules.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I was thinking about it too, in any case the change will be small, just replacing the WebGLcontext parameter by WebGLRenderer and access the context from the renderer inside the module. Not strong opinion either, but If we pollute the webgl context, should we open the door to practices like babylon's #13717 (comment) ?
I guess @mrdoob should decide here :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup, I was gonna comment the same thing about no reference to
WebGLRenderer
from some modules. I don't prefer passingWebGLRenderer
instance to such modules instead ofWebGLContext
because I don't wanna let them have dependency withWebGLRenderer
.And also, tbh I don't really wanna pollute
WebGLContext
object. So....isWebGL2( gl )
function in utils.js? Not strong preference tho.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think? @mrdoob