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 for custom ScalingMode #68

Closed
DasLixou opened this issue Nov 17, 2022 · 14 comments · Fixed by #69
Closed

Support for custom ScalingMode #68

DasLixou opened this issue Nov 17, 2022 · 14 comments · Fixed by #69
Labels
bug Something isn't working
Milestone

Comments

@DasLixou
Copy link

add support for custom ScalingMode. i currently have a scalingmode set in my Camera3dBundle aka PostProcessingInput but it doesnt apply when i use vfx-bag. probably because it is a camera of a camera?

@torsteingrindvik
Copy link
Owner

I can take a look at this.

I also have to look at ScalingMode since I haven't used it.
Just to make sure, could you describe what you expect to happen and what actually happens?

@DasLixou
Copy link
Author

ScalingMode is a thing on the camera that says how it behaves when the target gets resized. the problem seems that the image (target) that it now renderes to doesn't resize to the window size when i get it correctly.

@DasLixou
Copy link
Author

Without your plugin (ScalingMode works as expected)
grafik

With your plugin (is wrongly scaled)
grafik

@torsteingrindvik
Copy link
Owner

Thank you for the details.
I will look into it as soon as I have time.

@torsteingrindvik torsteingrindvik added the bug Something isn't working label Nov 18, 2022
@torsteingrindvik torsteingrindvik added this to the Version 0.2 milestone Nov 18, 2022
@torsteingrindvik
Copy link
Owner

I attempted a workaround for this by extracting the orthographic projection from the user's input camera, and propagating that to the spawned cameras.

This kinda fixed it, but there were some other bugs.

But this all boils down to issues due to spawning cameras for effects.
Now with Bevy 0.9 there is a proper way to do post processing.

I am going to port this entire plugin to use that approach, and then there will be no cameras spawned, and I expect the issue to go away.

Therefore I consider this bug blocked on #45 .

@DasLixou
Copy link
Author

Oh LOL i also started a Little vfx Library today to see how far I can come and also make it not use cameras lmao 🤣.

@DasLixou
Copy link
Author

@torsteingrindvik seems like i found the issue. Your image to what the camera displays its thing on won't rescale. i made a system that makes it in my library (it currently doesn't show it but it gets piped trough correctly :D ) which resizes the images to the end-target. here if u wanna see: LixouStudios/bevy_vfx@cb8f3c6

@torsteingrindvik
Copy link
Owner

@DasLixou thanks.

I have started on a plugin rework now though so I don't expect this issue to linger for very long.

@DasLixou
Copy link
Author

DasLixou commented Nov 19, 2022

@DasLixou thanks.

I have started on a plugin rework now though so I don't expect this issue to linger for very long.

Are you going to use RenderGraphs? @torsteingrindvik

@DasLixou
Copy link
Author

@torsteingrindvik would you make the plugin rework on a public branch? I would like to contribute a little bit :)

@torsteingrindvik
Copy link
Owner

It will use render graphs, and yes it will be public when I have landed on an approach.

@DasLixou
Copy link
Author

It will use render graphs, and yes it will be public when I have landed on an approach.

Cool 😎

@torsteingrindvik
Copy link
Owner

After the rework this plugin should behave the same as Bevy proper for scalingmode.
If this is still relevant to you and you try this out let me know how it goes.

@DasLixou
Copy link
Author

😎

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants