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

Upgrade to bevy 0.13 #27

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

MarijnS95
Copy link

No description provided.

Comment on lines 37 to -38
opaque_phase.add(Opaque3d {
// TODO: https://github.com/bevyengine/bevy/pull/11671/files
asset_id: AssetId::invalid(),
// asset_id: CUBE_INDICES_HANDLE.into(),
// distance: inverse_view_row_2.dot(entry.position.extend(1.0)),
pipeline,
entity,
distance: inverse_view_row_2.dot(entry.position.extend(1.0)),
Copy link
Author

Choose a reason for hiding this comment

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

@Elabajaba since you wrote bevyengine/bevy#11671, how is an app like this that uses a simple index buffer and "generates"/computes vertex positions "on the fly" in the vertex shader supposed to provide an AssetId<Mesh>? Looks like we can't get the original sorting based on distance.

Choose a reason for hiding this comment

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

I'm not sure tbh. I didn't realize anyone was doing vertex pulling with bevy's standard opaque3d pipeline.

I opened a PR on your fork (MarijnS95#1) that re-implements bevy's old Opaque3d pass as a custom pass to get this working, but I'm not sure if it's the best solution.

Copy link
Author

Choose a reason for hiding this comment

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

@Elabajaba that sounds unfortunate.

Thanks for the ping. Looks like creating forks via the gh CLI doesn't automatically set myself as watching my own repo, so I didn't receive any other notification for you opening a PR there.

I'll take a closer look later but already see some drive-by fixes that you ought to better submit separately :)

for (
entity,
cuboids,
transform,
materials_id,
maybe_visibility,
instance_buffer_needs_update,
) in cuboids.iter()
{
for (entity, cuboids, transform, materials_id, maybe_visibility) in &cuboids {
let instance_buffer_needs_update = cuboids.is_added() || cuboids.is_changed();
Copy link
Author

Choose a reason for hiding this comment

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

Following the docs there's an is_added() etc now, as I no longer seem to be able to use the Added/Changed traits to get a boolean value out of the query. Something about ReadOnlyQueryData not being implemented, and I'm not familiar enough with bevy internals to debug that further.

@MarijnS95 MarijnS95 mentioned this pull request Apr 9, 2024
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