bevyengine / bevyengine/bevy

Platform specific render pipeline implementations

Open
#4,300 3 comments 0 reactions 0 assignees View on GitHub
A-Rendering C-Code-Quality
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 22h
Merged PRs (30d)
161

Description

## What problem does this solve or what need does it fill?
There are a number of platform related rendering limitations that has been a consistent lowest common denominator in our rendering pipelines. Features like storage buffer support and compute shaders may be addressed when WebGPU formally lands, but other options like push constants as a form of optimization are likely not to land until a V2 spec lands. Common engine features like morph targets, particle systems, etc. all will require optimizing for these limitations, which may hamper more intensive native use cases.

## What solution would you like?
Split the `bevy_pbr` pipelines into two, one behind a `#[cfg(target="wasm32")]` and the other behind the opposite. We should attempt to reuse as much of the infrastructure made available right now between the two, but use case specific pipelines for meshes, particle systems, shadows, etc. should attempt to leverage as much platform support as possible instead of being limited

This can increase maintenance burden unless we figure out a good way to reconcile the these platform differences transparently.

## What alternative(s) have you considered?
Relying on `WgpuLimits` and `wgpu_types::Features` to alter the pipeline depending on platform feature support. This would ulimately be the most flexible solution, though likely the hardest to debug and maintain going forward.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.