-
-
Notifications
You must be signed in to change notification settings - Fork 35.5k
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
WebGLBackend #26581
WebGLBackend #26581
Conversation
Amazing! |
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.
CodeQL found more than 10 potential problems in the proposed changes. Check the Files changed tab for more details.
The project used this type of message to inform the user when WebGL/WebGL 2/WebGPU is not supported and thus the example does not work. But since the example does work (just with a different 3D API), I wonder if logging a info message to the browser console is already sufficient. |
@@ -0,0 +1,199 @@ | |||
import { LinearFilter, LinearMipmapLinearFilter, LinearMipmapNearestFilter, NearestFilter, NearestMipmapLinearFilter, NearestMipmapNearestFilter, RGBAFormat, DepthFormat, DepthStencilFormat, UnsignedShortType, UnsignedIntType, UnsignedInt248Type, FloatType, HalfFloatType, MirroredRepeatWrapping, ClampToEdgeWrapping, RepeatWrapping, UnsignedByteType, _SRGBAFormat, NoColorSpace, LinearSRGBColorSpace, SRGBColorSpace, NeverCompare, AlwaysCompare, LessCompare, LessEqualCompare, EqualCompare, GreaterEqualCompare, GreaterCompare, NotEqualCompare } from 'three'; |
Check notice
Code scanning / CodeQL
Unused variable, import, function or class
The examples below are working on both backends:
Example like There are two verifications if if ( WebGPU.isAvailable() === false && WebGL.isWebGL2Available() === false ) {
document.body.appendChild( WebGPU.getErrorMessage() );
throw new Error( 'No WebGPU or WebGL2 support' );
} |
looks great and excited about these developments! I'm having trouble running the cubemap adjustments example , see screenshot: |
|
||
if ( extensions.has( 'EXT_texture_filter_anisotropic' ) === true ) { | ||
|
||
extension = extensions.get( 'EXT_texture_filter_anisotropic' ); |
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.
looks like the error is with this variable 'extension'
Also, the same example fails under Firefox because |
After this fix it's working on Firefox using WebGL2.
I think the idea of this example is just to show the Light API being used in analytical light, in this case selective lights. |
Users copy the examples. It is incorrect to use If you refuse to add an envmap, then as a compromise, please hardwire metalness to zero in the example. Otherwise the rendering is completely wrong. |
If so, are examples like As far as I know the |
Do we need GLSL1NodeBuilder if we are already deprecating WebGL1? |
Related issue: #26079
Description
https://raw.githack.com/mrdoob/three.js/dev/examples/webgpu_lights_selective.html
A minimal version of
WebGLBackend
. WIP.