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

Distortion camera initialization fix #3033

Merged

Conversation

WilliamLewww
Copy link
Contributor

Closes #2527 - Last camera's distortion affects previous cameras' distortions

When loading multiple cameras on the application startup, each camera would finish initialization but their compositor's material would only be set after every camera has been initialized. This would make all compositor materials to be set to the most recently initialized camera.

To fix this issue, the compositor material should be set right after their camera is done initializing rather than waiting for all the cameras to finish initialization.

fix

scpeters and others added 3 commits May 14, 2021 15:45
There is a bug in the initialization of cameras with distortion.
Loading multiple cameras with different distortion parameters
at the same time causes some of the same distortion parameters
to be applied to all those cameras. Spawning a model with a single
distorted camera afterwards works fine, even in a world that
already contains distorted cameras.

Signed-off-by: Steve Peters <scpeters@openrobotics.org>
…n cameras

Signed-off-by: William Lew <WilliamMilesLew@gmail.com>
Signed-off-by: William Lew <WilliamMilesLew@gmail.com>
@scpeters
Copy link
Member

a 3 line fix!

@scpeters
Copy link
Member

it looks like this fix works; it doesn't have a regression test, but I'd like to merge this and get it released to unblock users who need it. I will keep the underlying issue open until we have merged a regression test

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.

Last camera's distortion affects previous cameras' distortions
3 participants