Crate rend3[−][src]
Expand description
Easy to use, customizable, efficient 3D renderer library built on wgpu.
Library is under active development. While internals will likely change quite a bit, the external api will only experience minor changes as features are added.
To use rend3 add the following to your Cargo.toml:
rend3 = "0.1.2"
Screenshots
Examples
Take a look at the examples getting started with the api.
Purpose
rend3
tries to fulfill the following usecases:
- Games and visualizations that need a customizable and efficient renderer.
- Small projects that just want to put objects on screen, but want lighting and effects.
- A small cog in a big machine: a renderer doesn’t interfere with the rest of the program.
rend3
is not:
- A renderer for insane production value AAA games. AAA games have requirements far beyond any possible indie game and would be unreasonable to target.
- A framework or engine. It does not include all the parts needed to make an advanced game or simulation nor care how you structure
your program. I do have plans for a
rend3-util
(or similar) crate that is a very basic framework for the second use case listed above.
GPU Mode
On Vulkan and DX12, we can enable “gpu mode”, which uses modern bindless resources and gpu-based culling. This reduces CPU load and allows sigifigantly more powerful culling.
Future Plans
I have grand plans for this library. An overview can be found in the issue tracker under the enhancement label.
Helping Out
We welcome all contributions and ideas. If you want to participate or have ideas for this library, we’d love to hear them!
Modules
Managers for various type of resources.
Reexport of rend3_types
with some added wgpu re-exports.
Utilities and isolated bits of functionality that need a home.
Macros
Structs
Information about an adapter. Includes named PCI IDs for vendors.
Container for Instance/Adapter/Device/Queue etc.
Validated set of features and limits for a given T.
Core struct which contains the renderer world. Primary way to interact with the world.
Enums
Enum mapping to each of a device’s limit.
Stores two different types of data depending on the renderer mode.
Reason why the renderer failed to initialize.
Determines if a more-compatible CPU driven rendering, or faster GPU driven rendering.
Set of common GPU vendors.
Constants
Features required to run in cpu-mode.
Limits required to run in cpu-mode.
Features required to run in gpu-mode.
Limits required to run in gpu-mode.
Format of all shadow maps.
Largest uniform buffer binding needed to run rend3.
Features that rend3 can use if it they are available, but we don’t require.
Resolution of all shadow maps.
Traits
Routine which renders the current state of the renderer. The rend3-pbr
crate offers a PBR, clustered-forward implementation of the render routine.
Functions
Check that all required features for a given mode are present in the feature set given.
Check that all required limits for a given mode are present in the given limit set.
Convinence function that re-configures the surface with the expected usages.
Creates an Instance/Adapter/Device/Queue using the given choices. Tries to get the best combination.