Skip to content

Instantly share code, notes, and snippets.

using UnityEngine;
using System.Collections;
public class TimeTextureMac : MonoBehaviour
{
WebCamTexture webcamTexture;
Texture2D timeTexture;
Color[][] colorList;
int width, height, sliceCount;
int userSliceCount = 2;
using UnityEngine;
using System.Collections;
public class TimeTexture : MonoBehaviour
{
WebCamTexture textureWebcam;
Texture2D texture;
Color[][] colorList;
int width;
int height;
Shader "Custom/Transparent" {
Properties {
_Color ("Color", Color) = (1,1,1,1)
_MainTex ("Texture (RGB)", 2D) = "white" {}
}
SubShader {
Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" }
Pass {
Cull off
Blend SrcAlpha OneMinusSrcAlpha
Shader "Distortion/VortexTriangle" {
Properties {
_Color ("Color", Color) = (1,1,1,1)
_MainTex ("Texture (RGB)", 2D) = "white" {}
_Size ("Size", Range(0, 1.0)) = 0.01
_Scale ("Scale", Range(0, 1.0)) = 0.01
_Offset ("Offset", Range(0, 1.0)) = 0.01
}
SubShader {
Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" }
Shader "Distortion/Vortex" {
Properties {
_Color ("Color", Color) = (1,1,1,1)
_MainTex ("Texture (RGB)", 2D) = "white" {}
_Size ("Size", Range(0, 1.0)) = 0.01
}
SubShader {
Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" }
Pass {
Blend SrcAlpha OneMinusSrcAlpha
Shader "Distortion/Vortex" {
Properties {
_Color ("Color", Color) = (1,1,1,1)
_MainTex ("Texture (RGB)", 2D) = "white" {}
_Size ("Size", Range(0, 1.0)) = 0.01
}
SubShader {
Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" }
Pass {
Blend SrcAlpha OneMinusSrcAlpha
Shader "Custom/Wireframe"
{
Properties
{
_Color ("Color", Color) = (1,1,1,1)
_MainTex ("Texture (RGB)", 2D) = "white" {}
}
SubShader
{
Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" }
@leon196
leon196 / Warband.shader
Last active October 18, 2015 22:17
Vertex Distortion
Shader "Custom/Warband" {
Properties {
_Color ("Color", Color) = (1,1,1,1)
_MainTex ("Texture (RGB)", 2D) = "white" {}
_Size ("Size", Range(0, 1.0)) = 0.01
}
SubShader {
Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" }
Pass {
Blend SrcAlpha OneMinusSrcAlpha
var Color = {};
Color.Red = '#F26C4F';
Color.RedOrange = '#F68E55';
Color.YellowOrange = '#FBAF5C';
Color.Yellow = '#FFF467';
Color.PeaGreen = '#ACD372';
Color.YellowGreen = '#7CC576';
Color.Green = '#3BB878';
Color.GreenCyan = '#1ABBB4';