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

Support Screenspace raycasting for cameras rendering to a texture #41

Closed
wants to merge 1 commit into from

Conversation

dtaralla
Copy link

@dtaralla dtaralla commented Mar 9, 2022

Hi!
Since the render-to-texture cameras feature has been merged in bevy's main branch, here is a simple change to allow supporting 1st pass cameras rendering to an Image.

Maybe there is another cleaner way to do this. I find it a bit intrusive to have to gather Res<Assets<Images>> along Res<Windows> just to be able to support both cases.
With generics? Unfortunately I'm not fluent enough with Rust generics to find a way to do it (I wanted to make get_camera_rendering_size a generic with "template argument" from C++ with RenderTarget enum values, but it seems we can't do that yet in Rust).

@dtaralla
Copy link
Author

Thanks for adding support for this with your Bevy 0.7 commit! 🙏

@dtaralla dtaralla closed this Apr 18, 2022
@aevyrie
Copy link
Owner

aevyrie commented Apr 22, 2022

Apologies for neglecting this PR. Has the latest release worked for your use case?

@dtaralla
Copy link
Author

Yep, thanks!

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