1个不稳定版本
0.1.1 | 2020年4月12日 |
---|
#2069 in 游戏开发
305KB
2K SLoC
包含 (cab文件,18KB) .vs/atmosphere_render/v16/.suo
space_render
Amethyst游戏引擎的一个紧凑型渲染插件,用于渲染不同的太空元素。它目前支持行星渲染(好吧,大气层)、星星/太阳渲染和背景宇宙渲染(很多小星星)。
如何使用
如示例将所需插件添加到您的Amethyst渲染捆绑包中
use space_render::{
cosmos::{Cosmos, CosmosRender},
planet::PlanetRender,
star::StarRender,
};
let display_config_path = app_root.join("config\\display.ron");
let game_data = GameDataBuilder::default()
// Add all your other bundles here:
// ...
// Setup the rendering bundle.
.with_bundle(
RenderingBundle::<DefaultBackend>::new()
// Here you add whatever other rendering plugins you want to use.
// The following are necessary for 3D pbr rendering:
//.with_plugin(RenderToWindow::from_config_path(display_config_path).with_clear([0.0, 0.0, 0.0, 0.0]))
//.with_plugin(RenderPbr3D::default().with_skinning())
// We need to include the `CosmosRender` plugin in our rendering bundle in order to render the background stars.
.with_plugin(CosmosRender::new(Some(Cosmos::default()))),
// This is the atmosphere renderer.
.with_plugin(PlanetRender::new()),
// This renders the 'sun' (basicall just a billboard).
// It does the job far away but it doesn't really work if you get up close.
// May fix if needed in the future.
.with_plugin(StarRender::new()),
)?;
依赖项
~37–53MB
~749K SLoC