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

Update for bevy ecs v2 #31

Merged
merged 17 commits into from
Apr 3, 2021
Merged

Update for bevy ecs v2 #31

merged 17 commits into from
Apr 3, 2021

Conversation

rparrett
Copy link
Contributor

@rparrett rparrett commented Mar 5, 2021

A work in progress.

Things seem to work, but I ran out of time and only fixed one of the examples for now.

Should be able to finish this up later tonight.

This should be good to go.

@rparrett
Copy link
Contributor Author

rparrett commented Mar 6, 2021

Unfortunately, there seems to be an issue and some of the examples aren't working properly at the moment. I tested all the others and they seem fine.

sprite - not ok, nothing displayed
breakout - not ok, only score displayed
font_atlas_debug - panics

@rparrett
Copy link
Contributor Author

rparrett commented Mar 7, 2021

Won't be able to work on this today, but I tried rebasing against the dev branch (locally) and this didn't seem to help the situation.

But the rebase was very painless.

Should this be pointed at that branch?

@rparrett
Copy link
Contributor Author

rparrett commented Mar 8, 2021

Didn't get anywhere this morning, but observed that the reflected layout info! isn't happening in this PR (but that's true in the examples that do work as well)

@rparrett
Copy link
Contributor Author

rparrett commented Mar 9, 2021

It looks like I had just falsely remembered the sprite flipping PR getting merged after ecs v2. Ignoring that would certainly cause issues with sprites showing up. Investigating.

edit: yup, that's the issue. Will fully implement sprite flipping in a bit.

@rparrett rparrett changed the base branch from master to dev March 9, 2021 00:22
@rparrett rparrett marked this pull request as ready for review March 9, 2021 00:45
@rparrett
Copy link
Contributor Author

rparrett commented Mar 9, 2021

This is now rebased against/pointing at the dev branch.

@rparrett
Copy link
Contributor Author

rparrett commented Mar 25, 2021

@mrk-its

Pinging you to let you know that I will likely need to abandon this work for now due to time constraints.

I've pushed my current efforts to get this working with bevy's new PBR stuff.

This puts this PR in a state where 2d stuff seems to work, but basically everything 3d is broken. It's broken in a way that shaders compile, there are no error messages or warnings, but we just get a grey screen.

I suspect that there's something flying over my head related to texture samplers, or perhaps the camera bindings.

@rparrett
Copy link
Contributor Author

rparrett commented Apr 1, 2021

The issue seems related to camera bindings, or bindings in general.

I accidentally found that a simple change in utils.rs / reflect_layout seems to at least make some stuff show up in 3d_scene. I discovered this while attempting to add a BindingDescriptor to the CameraViewProj BindGroupDescriptor in the same function. (Which got me nothing but webgl errors)

if name == "CameraPosition" {
    continue;
}

@rparrett
Copy link
Contributor Author

rparrett commented Apr 2, 2021

This is now working (thanks mockersf) but relies on bevyengine/bevy#1798

@rparrett
Copy link
Contributor Author

rparrett commented Apr 2, 2021

There are some lingering questions about whether the manual BindingDescriptor overrides in utils.rs are actually needed, and a few comments about a couple specific changes here: https://github.com/rparrett/bevy_webgl2/pull/1

src/shaders/pbr.frag Outdated Show resolved Hide resolved
@mrk-its mrk-its merged commit 33dda29 into mrk-its:dev Apr 3, 2021
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.

None yet

3 participants