Skip to content

Instantly share code, notes, and snippets.

View IceSentry's full-sized avatar

IceSentry IceSentry

  • Montreal, Canada
  • 14:26 (UTC -04:00)
View GitHub Profile
@IceSentry
IceSentry / machine.js
Created April 16, 2020 22:30
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@IceSentry
IceSentry / custom_material.wgsl
Created June 13, 2022 15:35
ShaderType wrapped f32
struct WrappedF32 {
[[size(16)]]
value: f32;
};
struct CustomMaterial {
data: array<WrappedF32, 4>;
};
[[group(1), binding(0)]]
var<uniform> material: CustomMaterial;
@IceSentry
IceSentry / demo.png
Last active July 14, 2022 16:25
Bevy Material lines 0.8
demo.png
## Contributors
A huge thanks to the 141 contributors that made this release (and associated docs) possible! In random order:
- @hakolao
- @Weibye
- @harudagondi
- @Suficio
- @CAD97
- @xtr3m3nerd
@IceSentry
IceSentry / main.rs
Created April 13, 2023 17:43
Bevy post processing 0.10
//! This example shows how to create a custom render pass that runs after the main pass
//! and reads the texture generated by the main pass.
//!
//! The example shader is a very simple implementation of chromatic aberration.
//!
//! This is a fairly low level example and assumes some familiarity with rendering concepts and wgpu.
use bevy::{
core_pipeline::{
clear_color::ClearColorConfig, core_3d,
@IceSentry
IceSentry / main.rs
Created August 30, 2023 07:38
Simple quad material
//! A shader and a material that uses it.
use bevy::{
prelude::*,
reflect::{TypePath, TypeUuid},
render::render_resource::{AsBindGroup, ShaderRef},
};
use bevy_internal::window::WindowResized;
fn main() {
@IceSentry
IceSentry / main.rs
Created June 26, 2024 03:28
bevy UiMaterial image slider
//! Demonstrates the use of [`UiMaterials`](UiMaterial) and how to change material values
use bevy::color::palettes::css::BLACK;
use bevy::prelude::*;
use bevy::reflect::TypePath;
use bevy::render::render_resource::*;
fn main() {
App::new()
.add_plugins(DefaultPlugins)