This is an implementation of pgfx using wgpu.
This is being provided as a prototype library. I am currently developing a game (Penta Terra) and do not have time to fully invest in this. Please feel free to use this concept if you are interesting in building it out.
Add the following to your dependencies section:
# Core library, include any desired features (glam, image, web-time)
pgfx = { git = "https://github.com/tilde35/pgfx", features = [""]}
# WGPU backend
pgfx_wgpu = { git = "https://github.com/tilde35/pgfx" }Refer to the examples section for the setup process.
This sampler provides more options beyond what the default sampler allows (such as comparison operations).
During the configuration of the render pipeline, call configure_render_pipeline to get the pre-assembled pipeline
configuration. Changes can be made here as long as the pipeline doesn't become invalid due to those changes.
Example:
render_pass
.run(&pipeline)
.input(&vbuf)
// ...
.execute(|cfg| {
// ...
let b = cfg.configure_render_pipeline();
// Make advanced configuration changes
Ok(())
})?;During the configuration of the compute pipeline, call configure_compute_pipeline to get the pre-assembled pipeline
configuration. Changes can be made here as long as the pipeline doesn't become invalid due to those changes.
Example:
compute_pass
.run(&pipeline)
.input(&buf0)
// ...
.execute(|cfg| {
// ...
let b = cfg.configure_compute_pipeline();
// Make advanced configuration changes
Ok(())
})?;