Skip to content
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

WebGPU: Depth Texture example #23665

Merged
merged 2 commits into from
Mar 8, 2022
Merged

WebGPU: Depth Texture example #23665

merged 2 commits into from
Mar 8, 2022

Conversation

sunag
Copy link
Collaborator

@sunag sunag commented Mar 6, 2022

Related issue: #23655

Description

WebGPU Depth Texture
https://raw.githack.com/sunag/three.js/dev-rtt-webgpu/examples/webgpu_depth_texture.html

This contribution is funded by Googe via Igalia.

@sunag
Copy link
Collaborator Author

sunag commented Mar 7, 2022

@Mugen87 @mrdoob Can I merger this example?

Comment on lines +65 to +66
const material = new Nodes.MeshBasicNodeMaterial();
material.colorNode = invert( smoothstep( camera.near, camera.far, negate( positionView.z ) ) );
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Depth Material Approach

@Mugen87
Copy link
Collaborator

Mugen87 commented Mar 8, 2022

I'm not sure about providing a standalone example with a new depth material. Maybe it's better to focus on DepthTexture since in most use cases you want a beauty AND depth pass with a single render.

@mrdoob How do you feel about this?

@mrdoob
Copy link
Owner

mrdoob commented Mar 8, 2022

Hmm, I think we can keep this for now.
Good to have a few more webgpu examples/tests.

@mrdoob mrdoob merged commit b260f86 into mrdoob:dev Mar 8, 2022
@mrdoob
Copy link
Owner

mrdoob commented Mar 8, 2022

Thanks!

@sunag sunag deleted the dev-rtt-webgpu branch March 8, 2022 19:36
donmccurdy pushed a commit to donmccurdy/three.js that referenced this pull request Mar 10, 2022
* add webgpu_depth_texture example

* use invert() instead of sub()
@sunag sunag restored the dev-rtt-webgpu branch March 10, 2022 18:13
@sunag sunag deleted the dev-rtt-webgpu branch March 10, 2022 18:13
abernier pushed a commit to abernier/three.js that referenced this pull request Sep 16, 2022
* add webgpu_depth_texture example

* use invert() instead of sub()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants