Skip to content

Instantly share code, notes, and snippets.

View bcatcho's full-sized avatar

Brandon Catcho bcatcho

  • ambient.us
  • San Francisco
View GitHub Profile
Shader "Custom/yar" {
Properties {
_ColorLow ("Color Low", COLOR) = (1,1,1,1)
_ColorHigh ("Color High", COLOR) = (1,1,1,1)
_yPosLow ("Y Pos Low", Float) = 0
_yPosHigh ("Y Pos High", Float) = 10
_GradientStrength ("Graident Strength", Float) = 1
_EmissiveStrengh ("Emissive Strengh ", Float) = 1
_ColorX ("Color X", COLOR) = (1,1,1,1)
_ColorY ("Color Y", COLOR) = (1,1,1,1)
@bcatcho
bcatcho / SpriteCombiner.cs
Last active July 26, 2021 02:50
Combine Unity3d Sprites
// The MIT License (MIT) - https://gist.github.com/bcatcho/1926794b7fd6491159e7
// Copyright (c) 2015 Brandon Catcho
using UnityEngine;
using System.Collections.Generic;
using System.Linq;
#if UNITY_EDITOR
using System;
using UnityEditor;
using UnityEditor.Sprites;
using UnityEngine;
using UnityEditor;
using System.Collections;
namespace CatchCo.Diagram.EditorScripts
{
public class SpriteHelperEditorWindow : EditorWindow
{
[MenuItem ("CatchCo/Sprite Helper")]
private static void Init ()
@bcatcho
bcatcho / ExtrudedMeshTrail.js
Created July 20, 2013 17:20
Offical Procedural Unity3d Examples
// Generates an extrusion trail from the attached mesh
// Uses the MeshExtrusion algorithm in MeshExtrusion.cs to generate and preprocess the mesh.
var time = 2.0;
var autoCalculateOrientation = true;
var minDistance = 0.1;
var invertFaces = false;
private var srcMesh : Mesh;
private var precomputedEdges : MeshExtrusion.Edge[];
class ExtrudedTrailSection