Skip to content

Conversation

@Saratii
Copy link

@Saratii Saratii commented Dec 28, 2025

This pull requests adds a tag component that can be applied to a camera to specify that it should have clouds. Previously, this plugin will not work for any project with multiple cameras. I changed the compute shader pipeline to not assume that there is only one camera. I did not make it fully support rendering clouds to multiple cameras but a lot of the support for that feature is included in this PR. I updated the examples and the readme with information about the CloudCamera component.

@Saratii Saratii marked this pull request as draft December 28, 2025 02:47
@Saratii Saratii closed this Dec 28, 2025
@Saratii Saratii reopened this Dec 28, 2025
@Saratii Saratii marked this pull request as ready for review December 28, 2025 04:24
@Saratii Saratii changed the title Add a component to skip cameras Add a component to specify which camera has clouds Dec 28, 2025
@evroon
Copy link
Owner

evroon commented Dec 28, 2025

Thanks for the issue and PR! I only wonder whether setting this component should be required when having only one camera, to keep things as simple as possible.

Could you maybe also add an example with two cameras based on what you posted? #20 (comment)

src/compute.rs Outdated
Comment on lines 60 to 63
let Some(camera) = camera else {
warn_once!("No camera with CloudCamera component found. Clouds will not render.");
return;
};
Copy link
Owner

Choose a reason for hiding this comment

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

I think it should just panic here with an error message. Logs are easy to miss and this is clearly a case where the user should either remove the CloudsPlugin or add CloudsCamera. Although we might still want to allow not having CloudsCamera when there is only one render camera, but not sure.

@Saratii
Copy link
Author

Saratii commented Dec 28, 2025

Thanks for the issue and PR! I only wonder whether setting this component should be required when having only one camera, to keep things as simple as possible.

Could you maybe also add an example with two cameras based on what you posted? #20 (comment)

This doesn't add all of the functionality required to have clouds on two cameras it just prevents clouds from breaking on both cameras when two cameras exist. An example here might not be necessary until that feature is added.

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.

3 participants