Giter Club home page Giter Club logo

bevy_aabb_instancing's People

Contributors

bonsairobo avatar greaka avatar icesentry avatar krasnovpavel avatar loispostula avatar neo-zhixing avatar teh-cmc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

bevy_aabb_instancing's Issues

Streaming Performance

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.

using this to render a cuboid per entity?

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).

Alpha Blending / Transparency

As of writing, the vertex pulling renderer does not support alpha blending for several reasons:

  • vertex pulling optimizations (3-face index buffer) preclude backface culling
  • vertex pulling selection of visible faces may be "wrong" when the chosen face is a "back face"
    • the face will be alpha blended, but it should be culled entirely

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.

HDR Support

We currently crash when Camera::hdr is set to true. We should be able to support this for effects like bloom.

Efficient Dynamic Rendering

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:

  • Rather than overwriting the color of every cuboid when we want to change the color scale, we could just have a per-Cuboids uniform determining how the range of colors maps onto a range of normalized values
  • Similarly for visibility based on thresholds of the normalized values

Add Bevy 0.12 support

It 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,)

Big ask: can we instance in a browser?

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?

Clipping Planes totally busted in 0.6.2

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.

Any updates on shader compatibility with the shadows in Bevy?

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.