#游戏引擎 #效果 #白色 #黑色 #后期处理 #有序 #处理

bevy_dither_post_process

Bevy游戏引擎的黑白有序抖动后处理效果

2个版本

0.2.1 2024年8月5日
0.2.0 2024年7月21日

#625 in 游戏开发

Download history 115/week @ 2024-07-21 19/week @ 2024-07-28 128/week @ 2024-08-04 11/week @ 2024-08-11

273 每月下载次数
bevy_terminal_display 中使用

0BSD OR MIT OR Apache-2.0

20KB
242

bevy_dither_post_process

Crates License Tag Build Docs

Bevy引擎的插件,添加抖动后处理效果。

效果通过使用可配置级别的Bayer矩阵实现的二值有序抖动。它将图像抖动成黑白,并在整个屏幕上运行。

屏幕截图

使用配置

bevy_dither_post_process::components::DitherPostProcessSettings::new(3, &asset_server);

兼容性

包版本 Bevy版本
0.2 0.14
0.1 0.13

安装

crates.io

[dependencies]
bevy_dither_post_process = "0.2"

在Cargo.toml中使用git URL

[dependencies.bevy_dither_post_process]
git = "https://github.com/exvacuum/bevy_dither_post_process.git"

用法

In main.rs

use bevy::prelude::*;
use bevy_dither_post_process;

fn main() {
    App::new()
        .add_plugins((
            DefaultPlugins,
            bevy_dither_post_process::DitherPostProcessPlugin,
        ))
        .run();
}

当生成相机时

commands.spawn((
    // Camera3dBundle...
    bevy_dither_post_process::components::DitherPostProcessSettings::new(level, &asset_server);
));

此效果仅对包含此组件的相机运行。

许可

此crate根据您的选择受0BSD、Apache-2.0或MIT许可的约束。

依赖

~35–72MB
~1.5M SLoC