Update to 0.14 + Add 0BSD option

This commit is contained in:
Silas Bartha 2024-07-21 19:27:11 -04:00
parent 347594e421
commit 56aee7bc7c
Signed by: soaos
GPG Key ID: 9BD3DCC0D56A09B2
5 changed files with 26 additions and 13 deletions

@ -1,7 +1,7 @@
[package]
name = "bevy_dither_post_process"
version = "0.1.4"
version = "0.2.0"
edition = "2021"
[dependencies.bevy]
version = "0.13"
version = "0.14"

5
LICENSE-0BSD Normal file

@ -0,0 +1,5 @@
Copyright (C) 2024 by Silas Bartha silas@exvacuum.dev
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

@ -1,6 +1,7 @@
# bevy_dither_post_process
![License](https://img.shields.io/badge/license-MIT%2FApache-blue.svg)
![Crates](https://img.shields.io/crates/v/bevy_dither_post_process)
![License](https://img.shields.io/badge/license-0BSD%2FMIT%2FApache-blue.svg)
![Tag](https://img.shields.io/github/v/tag/exvacuum/bevy_dither_post_process)
![Build](https://img.shields.io/github/actions/workflow/status/exvacuum/bevy_dither_post_process/rust.yml)
[![Docs](https://img.shields.io/website?url=https%3A%2F%2Fexvacuum.github.io%2Fbevy_dither_post_process%2F&label=docs)](https://exvacuum.github.io/bevy_dither_post_process)
@ -20,10 +21,17 @@ bevy_dither_post_process::components::DitherPostProcessSettings::new(3, &asset_s
| Crate Version | Bevy Version |
|--- |--- |
| 0.2 | 0.14 |
| 0.1 | 0.13 |
## Installation
### crates.io
```toml
[dependencies]
bevy_dither_post_process = "0.2"
```
### Using git URL in Cargo.toml
```toml
[dependencies.bevy_dither_post_process]
@ -57,3 +65,7 @@ commands.spawn((
This effect will only run for cameras which contain this component.
## License
This crate is licensed under your choice of 0BSD, Apache-2.0, or MIT license.

@ -33,7 +33,7 @@ impl Plugin for DitherPostProcessPlugin {
app.add_plugins((ExtractComponentPlugin::<DitherPostProcessSettings>::default(),));
let Ok(render_app) = app.get_sub_app_mut(RenderApp) else {
let Some(render_app) = app.get_sub_app_mut(RenderApp) else {
return;
};
@ -53,7 +53,7 @@ impl Plugin for DitherPostProcessPlugin {
}
fn finish(&self, app: &mut App) {
let Ok(render_app) = app.get_sub_app_mut(RenderApp) else {
let Some(render_app) = app.get_sub_app_mut(RenderApp) else {
return;
};

@ -2,14 +2,10 @@ use bevy::{
ecs::query::QueryItem,
prelude::*,
render::{
render_asset::RenderAssets,
render_graph::{NodeRunError, RenderGraphContext, RenderLabel, ViewNode},
render_resource::{
render_asset::RenderAssets, render_graph::{NodeRunError, RenderGraphContext, RenderLabel, ViewNode}, render_resource::{
BindGroupEntries, Operations, PipelineCache, RenderPassColorAttachment,
RenderPassDescriptor,
},
renderer::RenderContext,
view::ViewTarget,
}, renderer::RenderContext, texture::GpuImage, view::ViewTarget
},
};
@ -46,8 +42,8 @@ impl ViewNode for DitherRenderNode {
let post_process = view_target.post_process_write();
let Some(threshold_map) = world
.resource::<RenderAssets<Image>>()
.get(dither_post_process_settings.handle())
.resource::<RenderAssets<GpuImage>>()
.get(dither_post_process_settings.handle().id())
else {
warn!("Failed to get threshold map, skipping...");
return Ok(());