Skip to content

Add viewport_to_ndc#21687

Merged
mockersf merged 4 commits into
bevyengine:mainfrom
IceSentry:camera_viewport_to_ndc
Oct 29, 2025
Merged

Add viewport_to_ndc#21687
mockersf merged 4 commits into
bevyengine:mainfrom
IceSentry:camera_viewport_to_ndc

Conversation

@IceSentry

Copy link
Copy Markdown
Contributor

Objective

  • Computing the ndc from a viewport coordinates is already done in a few places.
  • It's can be useful for users, not just internally.

Solution

  • Extract it to a function

Testing

  • I'm using it in a currently unfinished PR for gpu picking and things worked as expected
  • I also tested 3d_viewport_to_world and 2d_viewport_to_world

@IceSentry IceSentry added the A-Rendering Drawing game state to the screen label Oct 29, 2025
@IceSentry IceSentry added S-Needs-Review Needs reviewer attention (from anyone!) to move forward A-Camera User-facing camera APIs and controllers. D-Trivial Nice and easy! A great choice to get started with Bevy C-Usability A targeted quality-of-life change that makes Bevy easier to use and removed A-Rendering Drawing game state to the screen labels Oct 29, 2025
Comment thread crates/bevy_camera/src/camera.rs Outdated
IceSentry and others added 2 commits October 29, 2025 14:39
Co-authored-by: atlv <email@atlasdostal.com>
@mockersf mockersf added this pull request to the merge queue Oct 29, 2025
Merged via the queue into bevyengine:main with commit 2295479 Oct 29, 2025
36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Camera User-facing camera APIs and controllers. C-Usability A targeted quality-of-life change that makes Bevy easier to use D-Trivial Nice and easy! A great choice to get started with Bevy S-Needs-Review Needs reviewer attention (from anyone!) to move forward

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants