aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Silas Bartha <[email protected]>2024-07-21 19:27:11 -0400
committerLibravatar Silas Bartha <[email protected]>2024-07-21 19:27:11 -0400
commit56aee7bc7c5ee71de8e5d6997e877759b5d9e9b7 (patch)
treecaa87a9af161fdfc795dfe197054b189ebdfacbf
parent347594e4217c8947dfae0faf888f1ded7c0329e5 (diff)
Update to 0.14 + Add 0BSD option0.2
-rw-r--r--Cargo.toml4
-rw-r--r--LICENSE-0BSD5
-rw-r--r--README.md14
-rw-r--r--src/lib.rs4
-rw-r--r--src/nodes.rs12
5 files changed, 26 insertions, 13 deletions
diff --git a/Cargo.toml b/Cargo.toml
index fc8aeb8..9424d79 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -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"
diff --git a/LICENSE-0BSD b/LICENSE-0BSD
new file mode 100644
index 0000000..7a39b21
--- /dev/null
+++ b/LICENSE-0BSD
@@ -0,0 +1,5 @@
+Copyright (C) 2024 by Silas Bartha [email protected]
+
+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.
diff --git a/README.md b/README.md
index ea4057d..2c62d6c 100644
--- a/README.md
+++ b/README.md
@@ -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.
+
diff --git a/src/lib.rs b/src/lib.rs
index 28eecd8..0f69fd3 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -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;
};
diff --git a/src/nodes.rs b/src/nodes.rs
index 377718a..1cf3972 100644
--- a/src/nodes.rs
+++ b/src/nodes.rs
@@ -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(());