-
-
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
TSL: Fix texture_depth_2d in wgslFn #27323
Conversation
Unfortunately, when I try to use the DepthTexture in wgslFn, I get the following error message:
As soon as I change "new THREE.DepthTexture();" to a normal texture "new THREE.Texture();" and the "texture_depth_2d" to "texture_2d" the test code goes. |
Hmm.. this is other problem releated, seems that |
I also tried this with the renderTarget setup from the WebGPU DepthTexture example. The example was my starting point. |
I couldn't find your comment in the forum in which you mentioned that you would like to port the sky example to WebGPU otherwise I would have mentioned it there. I did that today. Only the two includes in the colorNode wgslFn are missing because I didn't know what the wgsl equivalent was
Do you want that? Does what you mentioned mean that additional extensions are needed for the DepthTexture (texture_depth_2d) for wgslFn? |
Oh great! What I imagined was create a Node called scene.backgroundNode = new SkyNode( ...params ); It would be great to have this in TSL. About the includes: |
The SkyNode thing sounds good. I loaded a cubeTexture for testing. When I pass this to a wgslFn, the texture type is correct with
but the console shows lots of warnings about the wrong binding dimension. But now it's New Year's Eve and its time to take a break and toast to all the successful expansions. I also know unity water codes and my current status with three.js is already very advanced. With correct refraction (depthTextures) and correct reflection (cube textures) and post-processing (underwater), three.js will produce just as beautiful results as in the well-known and popular sea games. But that has time in the new year. I wish you a happy new year. |
Related issue: #27274 (comment)
Description
Fix
texture_depth_2d
node reference if used as parameter inwgslFn
.