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

[Merged by Bors] - Add inverse_projection and inverse_view_proj fields to shader view uniform #5119

Closed
wants to merge 2 commits into from

Conversation

elijaharita
Copy link
Contributor

@elijaharita elijaharita commented Jun 27, 2022

Objective

Transform screen-space coordinates into world space in shaders. (My use case is for generating rays for ray tracing with the same perspective as the 3d camera).

Solution

Add inverse_projection and inverse_view_proj fields to shader view uniform


Changelog

Added

inverse_projection and inverse_view_proj fields to shader view uniform

Note

It'd probably be good to double-check that I did the matrix multiplication in the right order for inverse_proj_view. Thanks!

crates/bevy_render/src/view/mod.rs Outdated Show resolved Hide resolved
Co-authored-by: Robert Swain <robert.swain@gmail.com>
@superdump superdump added A-Rendering Drawing game state to the screen C-Usability A simple quality-of-life change that makes Bevy easier to use labels Jun 28, 2022
@superdump superdump requested a review from cart June 28, 2022 10:06
Copy link
Member

@james7132 james7132 left a comment

Choose a reason for hiding this comment

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

Normally I'd be concerned with the size of the uniform, but given we usually only have a handful of these, this seems like a general usability win.

@james7132 james7132 added the S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it label Jul 2, 2022
@alice-i-cecile
Copy link
Member

bors r+

bors bot pushed a commit that referenced this pull request Jul 4, 2022
…w uniform (#5119)

# Objective

Transform screen-space coordinates into world space in shaders. (My use case is for generating rays for ray tracing with the same perspective as the 3d camera).

## Solution

Add `inverse_projection` and `inverse_view_proj` fields to shader view uniform

---

## Changelog

### Added
`inverse_projection` and `inverse_view_proj` fields to shader view uniform

## Note

It'd probably be good to double-check that I did the matrix multiplication in the right order for `inverse_proj_view`. Thanks!
@bors bors bot changed the title Add inverse_projection and inverse_view_proj fields to shader view uniform [Merged by Bors] - Add inverse_projection and inverse_view_proj fields to shader view uniform Jul 4, 2022
@bors bors bot closed this Jul 4, 2022
inodentry pushed a commit to IyesGames/bevy that referenced this pull request Aug 8, 2022
…w uniform (bevyengine#5119)

# Objective

Transform screen-space coordinates into world space in shaders. (My use case is for generating rays for ray tracing with the same perspective as the 3d camera).

## Solution

Add `inverse_projection` and `inverse_view_proj` fields to shader view uniform

---

## Changelog

### Added
`inverse_projection` and `inverse_view_proj` fields to shader view uniform

## Note

It'd probably be good to double-check that I did the matrix multiplication in the right order for `inverse_proj_view`. Thanks!
james7132 pushed a commit to james7132/bevy that referenced this pull request Oct 28, 2022
…w uniform (bevyengine#5119)

# Objective

Transform screen-space coordinates into world space in shaders. (My use case is for generating rays for ray tracing with the same perspective as the 3d camera).

## Solution

Add `inverse_projection` and `inverse_view_proj` fields to shader view uniform

---

## Changelog

### Added
`inverse_projection` and `inverse_view_proj` fields to shader view uniform

## Note

It'd probably be good to double-check that I did the matrix multiplication in the right order for `inverse_proj_view`. Thanks!
ItsDoot pushed a commit to ItsDoot/bevy that referenced this pull request Feb 1, 2023
…w uniform (bevyengine#5119)

# Objective

Transform screen-space coordinates into world space in shaders. (My use case is for generating rays for ray tracing with the same perspective as the 3d camera).

## Solution

Add `inverse_projection` and `inverse_view_proj` fields to shader view uniform

---

## Changelog

### Added
`inverse_projection` and `inverse_view_proj` fields to shader view uniform

## Note

It'd probably be good to double-check that I did the matrix multiplication in the right order for `inverse_proj_view`. Thanks!
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-Usability A simple quality-of-life change that makes Bevy easier to use S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants