foresightminingsoftwarecorporation / bevy_aabb_instancing Goto Github PK
View Code? Open in Web Editor NEWFast AABB rendering plugin for Bevy Engine.
License: Apache License 2.0
Fast AABB rendering plugin for Bevy Engine.
License: Apache License 2.0
It's worth investigating what the current bottleneck is for writing instance data from CPU to GPU. There are at least a couple users of the crate that desire fast data transfer. We don't currently have a crate example that continuously streams data, but if we did then we could benchmark it and try a few optimizations.
For static scenes made from cuboids this seems perfect, but im quite confused whether this can be used to efficiently render a lot of cuboids on bevy entities which might move or be changed.
Currently it's unclear whether thats even a possibility, or how to do it if it is. As far as i can see, i would have to update the entity containing the Cuboids component from all the entities i want to render as cuboids.
Ideally some more examples would be very nice, especially ones showing the cuboids moving in any way (if this is supported).
As of writing, the vertex pulling renderer does not support alpha blending for several reasons:
For these reasons, alpha blending is currently disabled in the vertex pulling pipeline (using BlendState::REPLACE
).
If we are going to support transparency, I think it should happen in its own pipeline, or at least a specialized pipeline. There will need to be some big changes to the index buffering as well as the shader code.
We currently crash when Camera::hdr
is set to true. We should be able to support this for effects like bloom.
The vertex pulling shader crushes cuboid instances. But things are not so great on the CPU side. Buffering instances after changes to visibility, color, or position can be quite slow. I suspect the main cause for this is lack of buffer reuse: every change to Cuboids
will result in throwing away the old buffer and allocating and writing a new one. Also, the instance buffer encompasses all attributes rather than splitting each attribute/field into its own storage buffer, which would reduce GPU bandwidth requirements.
There are more things we can do to trivialize dynamic color re-scaling:
Cuboids
uniform determining how the range of colors maps onto a range of normalized valuesIt seems that the current version of the library is not compatible with the latest version of Bevy (0.12).
the trait
bevy_app::plugin::sealed::Plugins<_>
is not implemented for(VertexPullingRenderPlugin,)
Changing the color options on a Cuboids
entity currently has no effect.
Thought I would push my luck and try it on the browsers of a mac:
app-8d2b3f51c8c35afe.js:1734 panicked at 'wgpu error: Validation Error
Caused by:
In Device::create_bind_group_layout
note: label = `cuboid_instances_layout`
binding 0 entry is invalid
Downlevel flags VERTEX_STORAGE are required but not supported on the device.
This is not an invalid use of WebGPU: the underlying API or device does not support enough features to be a fully compliant implementation. A subset of the features can still be used. If you are running this program on native and not in a browser and wish to work around this issue, call Adapter::downlevel_properties or Device::downlevel_properties to get a listing of the features the current platform supports.
', /Users/bit/.cargo/registry/src/github.com-1ecc6299db9ec823/wgpu-0.13.1/src/backend/direct.rs:2391:5
Do we have to wait for WebGPU to land in 2023 or are there maybe some tweaks we could try to get it running somehow in the browser?
Workflow is pending manual review.
URL: https://github.com/ForesightMiningSoftwareCorporation/bevy_aabb_instancing/actions/runs/6411418368
Required approvers: [loispostula sebcrozet aevyrie greaka Ratysz TheRawMeatball IceSentry JulianRuiseco MichaelBradetLegris]
Respond "approved", "approve", "lgtm", "yes" to continue workflow or "denied", "deny", "no" to cancel.
A change that was new in 0.6.2 broke clipping planes. It's fixed on main
, and I think I will just publish 0.7.0
and not worry about backporting unless someone asks for it. There are breaking changes on main
anyway.
Nice work with this engine, it's been fairly easy to adopt for my needs and I can't get enough of how fast it runs. My question is in the title, has the shader pipeline been adopted to enable shadows for the most recent updates to Bevy 0.10? I haven't found a way to combat this yet but I'm interested if the team has.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.