Skip to content

Instantly share code, notes, and snippets.

View shanecelis's full-sized avatar

Shane Celis shanecelis

View GitHub Profile
@shanemikel
shanemikel / ast.rs
Created April 13, 2019 01:57
Lua parsing in Rust with Pest (operator precedence)
#[derive(Parser)]
#[grammar = "lua.pest"]
pub struct LuaParser;
lazy_static! {
static ref PREC_CLIMBER: PrecClimber<Rule> = {
use Rule::*;
use Operator as O;
use Assoc::Left as L;
@HAliss
HAliss / CurveDissolve.shader
Last active June 7, 2022 17:26
Creates a monochromatic texture with color values from a given animation curve
Shader "Custom/CurveDissolve"
{
Properties
{
_Color ("Color", Color) = (1,1,1,1)
_MainTex ("Albedo (RGB)", 2D) = "white" {}
_Noise("Noise", 2D) = "white" {}
_CurveTexture("Curve texture", 2D) = "white" {}
_Cutoff("Cutoff", Range(0,1)) = 0
_Glossiness ("Smoothness", Range(0,1)) = 0.5
@dmlary
dmlary / main.rs
Last active January 1, 2025 14:17
minimal example of adding a custom render pipeline in bevy 0.11
/// minimal example of adding a custom render pipeline in bevy 0.11.
///
/// When this example runs, you should only see a blue screen. There are no
/// vertex buffers, or anything else in this example. Effectively it is
/// shader-toy written in bevy.
///
/// This revision adds a post-processing node to the RenderGraph to
/// execute the shader. Thanks to @Jasmine on the bevy discord for
/// suggesting I take a second look at the bevy post-processing example
///