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

Adjust to main branch of bevy #2

Merged
merged 5 commits into from
Jan 6, 2022
Merged

Conversation

CGMossa
Copy link
Contributor

@CGMossa CGMossa commented Jan 5, 2022

Since bevy 0.6 release is happening this week, I wanted to do something, and this project example was a good thing to use for learning about the new changes.

I've done all the adjustments that I can dicpher from the WIP migration guide, and #help channel over at bevy's discord.

But the renderer was changed quite a bit, and the remaining issues requires that I understand those and the overhaul the current way of doing it to that. I don't know how to do that right now, so this is left as a draft.

@thebracket
Copy link
Owner

Wow, thank you! I was waiting for bevy_egui to update before I started to prepare for the new Bevy. I tried switching once before, and kept running into problems getting Bevy and Egui working. The render stuff shouldn't be too bad - mostly new cameras (including ambient light, finally - which will make a lot of PBR stuff not look terrible), better light handling and (really important) render-to-texture support that is a whole lot less painful to use. The render-to-texture is needed because the 3D viewport shouldn't occupy the whole screen.

I'll pull this branch down and see how it's going.

@thebracket thebracket marked this pull request as ready for review January 6, 2022 15:57
@thebracket thebracket merged commit b4c08c4 into thebracket:main Jan 6, 2022
@thebracket
Copy link
Owner

I took the base PR, and added a bunch of render-specific tweaks to it. It works! Thank you so much.
Some fun issues, mostly with Bevy itself. Enabling tangent buffers on custom meshes crashes completely. You can solve the crash by adding an index buffer, but that messes up all the geometry. So until bevyengine/bevy#3120 is merged (which makes Bevy use the correct buffers in the shaders), PBR and normal mapping support is really broken. I sincerely hope they fix that before the next release; it breaks everything that uses custom meshes and wants nice PBR support!

It's also quite a bit slower in debug mode. I think that's because it's doing a full cube-map render for the point light, to handle shadows - and it looks like it's updating the shadow map every frame, rather than when the geometry changes.

@CGMossa
Copy link
Contributor Author

CGMossa commented Jan 6, 2022

Perfect.
Note the branches specified in the cargo toml. They are the branches that will eventually will be merged for 0.6. So they will have to be yanked out when they are published to crates.io.

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