This updates the shield depth prepass from the Bevy 0.10 post to Bevy 0.14.
https://bevyengine.org/news/bevy-0-10/#depth-and-normal-prepass
| diff --git a/examples/mouse_to_tile.rs b/examples/mouse_to_tile.rs | |
| index 9ea13ec..3b03fc0 100644 | |
| --- a/examples/mouse_to_tile.rs | |
| +++ b/examples/mouse_to_tile.rs | |
| @@ -1,4 +1,8 @@ | |
| -use bevy::{color::palettes, math::Vec4Swizzles}; | |
| +use bevy::{ | |
| + color::palettes::{self, tailwind::GREEN_400}, | |
| + math::Vec4Swizzles, | |
| + sprite::MaterialMesh2dBundle, |
| use bevy::prelude::*; | |
| fn main() { | |
| App::new() | |
| .add_plugins(DefaultPlugins) | |
| .add_systems( | |
| Update, | |
| ( | |
| produce, | |
| read_one.run_if(on_event::<MyEvent>()), |
| use bevy::{ecs::system::EntityCommand, prelude::*}; | |
| fn main() { | |
| App::new() | |
| .add_plugins(DefaultPlugins) | |
| .add_systems(Startup, (startup, log).chain()) | |
| .run(); | |
| } | |
| fn startup(mut commands: Commands) { |
| use std::ops::Deref; | |
| use bevy::{color::palettes::tailwind::*, prelude::*}; | |
| use calc::*; | |
| use itertools::Itertools; | |
| use rust_decimal::prelude::*; | |
| fn main() { | |
| App::new() | |
| .insert_resource(ClearColor(SLATE_950.into())) |
This updates the shield depth prepass from the Bevy 0.10 post to Bevy 0.14.
https://bevyengine.org/news/bevy-0-10/#depth-and-normal-prepass
| # Compilation provided by Compiler Explorer at https://godbolt.org/ | |
| example::no_pow: | |
| push rax | |
| mov eax, edi | |
| sub eax, 1 | |
| mov dword ptr [rsp + 4], eax | |
| cmp edi, 1 | |
| setb al | |
| test al, 1 | |
| jne .LBB0_2 |
| use color_eyre::eyre::{Result, Context}; | |
| use nom::{ | |
| bytes::complete::tag, | |
| character::complete::alpha1, | |
| combinator::rest, | |
| error::{ErrorKind, ParseError}, | |
| sequence::preceded, | |
| *, | |
| }; | |
| use thiserror::Error; // 1.0.38 |
| # the scripting-addition must be loaded manually if | |
| # you are running yabai on macOS Big Sur. Uncomment | |
| # the following line to have the injection performed | |
| # when the config is executed during startup. | |
| # | |
| # for this to work you must configure sudo such that | |
| # it will be able to run the command without password | |
| sudo yabai --load-sa | |
| yabai -m signal --add event=dock_did_restart action="sudo yabai --load-sa" |
| #import bevy_pbr::mesh_view_bindings | |
| #import bevy_pbr::mesh_bindings | |
| // NOTE: Bindings must come before functions that use them! | |
| #import bevy_pbr::mesh_functions | |
| #import bevy_shader_utils::simplex_noise_3d | |
| #import bevy_shader_utils::simplex_noise_2d | |
| struct StandardMaterial { |
| use bevy::{ | |
| asset::AssetServerSettings, | |
| pbr::{ | |
| MaterialPipeline, MaterialPipelineKey, | |
| StandardMaterialKey, StandardMaterialUniform, | |
| }, | |
| prelude::*, | |
| reflect::TypeUuid, | |
| render::{ | |
| mesh::{ |