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

WebGPURenderer: Add missing Z axis to viewportCoordinate #28041

Merged
merged 1 commit into from
Apr 1, 2024

Conversation

RenaudRohlinger
Copy link
Collaborator

Description

Currently, it is not possible to manipulate a non-logarithmic custom depth through depthNode because gl_FragCoord.z is not exposed.

In a typical custom depth setup, you would usually execute something like gl_FragDepth = gl_FragCoord.z.

This PR introduces the Z axis and makes it accessible via viewportCoordinate.z on both WebGPU and WebGL backends.

This contribution is funded by Utsubo

@RenaudRohlinger RenaudRohlinger added this to the r164 milestone Apr 1, 2024
@sunag sunag merged commit d4a3298 into mrdoob:dev Apr 1, 2024
11 checks passed
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.

2 participants