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

add depth to world position #9718

Closed
wants to merge 1 commit into from

Conversation

IceSentry
Copy link
Contributor

Objective

  • Add a function to convert the depth to a world position

@IceSentry IceSentry marked this pull request as draft September 7, 2023 22:01
@Trashtalk217 Trashtalk217 mentioned this pull request Sep 7, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Sep 7, 2023

The generated examples/README.md is out of sync with the example metadata in Cargo.toml or the example readme template. Please run cargo run -p build-templated-pages -- update examples to update it, and commit the file change.

1 similar comment
@github-actions
Copy link
Contributor

github-actions bot commented Sep 7, 2023

The generated examples/README.md is out of sync with the example metadata in Cargo.toml or the example readme template. Please run cargo run -p build-templated-pages -- update examples to update it, and commit the file change.

@superdump
Copy link
Contributor

I think these should be called position_ndc_to_world or view. Perhaps with ordering of grammar in the function names aligning with the mesh functions as I don’t remember if normal or tangent were prefixes or suffixes. And maybe we want to add some ndc_depth_to_view_z as that is often useful. There are more optimised ways of doing that for specific projections and we could implement that, plus a shader def to make it work for any projection.

@alice-i-cecile alice-i-cecile added C-Feature A new feature, making something new possible A-Rendering Drawing game state to the screen labels Sep 8, 2023
Copy link
Member

@alice-i-cecile alice-i-cecile left a comment

Choose a reason for hiding this comment

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

The depth_to_world_position conversion logic seems very useful, even if you're not using PBR-style graphics. Is there a more general home for it?

@alice-i-cecile
Copy link
Member

Closing in favor of #9726.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Rendering Drawing game state to the screen C-Feature A new feature, making something new possible
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants