This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using Unity.Entities; | |
using Unity.Entities.Serialization; | |
using Unity.Transforms; | |
using System.Threading.Tasks; | |
using Unity.Rendering; | |
#if UNITY_EDITOR | |
using UnityEditor; | |
#endif |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Ambi: AmbientNeoPixel Arduino Sketch | |
//Created By: Cory Malantonio | |
#include <Adafruit_NeoPixel.h> | |
#define PIN 6 | |
Adafruit_NeoPixel strip = Adafruit_NeoPixel(50, PIN, NEO_RGB + NEO_KHZ800); | |
int r[11]; // array for each color value | |
int g[11]; | |
int b[11]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Source: http://www.codeavarice.com/dev-blog/tutorial-burning-edges-dissolve-shader-in-unity | |
Shader "Custom/Dissolving" { | |
Properties{ | |
_Color("Color", Color) = (1,1,1,1) | |
_MainTex("Albedo (RGB)", 2D) = "white" {} | |
[NoScaleOffset]_BumpMap("Normal (RGB)", 2D) = "bump" {} | |
_BumpScale("Normal Scale", Range(0,10)) = 1 | |
_Glossiness("Smoothness", Range(0,1)) = 0.5 | |
_Metallic("Metallic", Range(0,1)) = 0.0 | |
[NoScaleOffset]_MetallicGlossMap("Metallic Map", 2D) = "white" {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static bool CustomFoldout(string title, bool display) | |
{ | |
var style = new GUIStyle("ShurikenModuleTitle") | |
{ | |
font = new GUIStyle(EditorStyles.label).font, | |
fontStyle = FontStyle.Bold, | |
border = new RectOffset(15, 7, 4, 4), | |
fixedHeight = 22, | |
contentOffset = new Vector2(20f, -2f) | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Source: https://farfarer.com/blog/2013/02/11/pre-integrated-skin-shader-unity-3d/ | |
Shader "Custom/Skin Shader" { | |
Properties { | |
_Color ("Main Color", Color) = (1,1,1,1) | |
_MainTex ("Diffuse (RGB)", 2D) = "white" {} | |
_SpecularTex ("Specular (R) Gloss (G) SSS Mask (B)", 2D) = "yellow" {} | |
_BumpMap ("Normal (Normal)", 2D) = "bump" {} | |
// BRDF Lookup texture, light direction on x and curvature on y. | |
_BRDFTex ("BRDF Lookup (RGB)", 2D) = "gray" {} | |
// Curvature scale. Multiplier for the curvature - best to keep this very low - between 0.02 and 0.002. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Original shader by cboe - Mar, 23, 2009 | |
// Enhanced to 3 axis movement by Seon - Jan, 21, 2010 | |
// Added _WaveSpeed - Jan, 26, 2010 | |
// | |
// Requirements: assumes you are using a subdivided plane created with X (width) * Z (height) where Y is flat. | |
// Requirements: assumes UV as: left X (U0) is attatched to pole, and Top Z (V1) is at top of pole. | |
// | |
// Enjoy! | |
Shader "Custom/FlagWave" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Source from : https://farfarer.com/blog/2012/09/11/translucent-shader-unity3d/ | |
Shader "Custom/Translucent" { | |
Properties { | |
_MainTex ("Base (RGB)", 2D) = "white" {} | |
_BumpMap ("Normal (Normal)", 2D) = "bump" {} | |
_Color ("Main Color", Color) = (1,1,1,1) | |
_SpecColor ("Specular Color", Color) = (0.5, 0.5, 0.5, 1) | |
_Shininess ("Shininess", Range (0.03, 1)) = 0.078125 | |
//_Thickness = Thickness texture (invert normals, bake AO). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using UnityEngine; | |
using System.Collections; | |
[AttributeUsage(AttributeTargets.Field)] | |
public class ReadOnlySerializeFieldAttribute : PropertyAttribute | |
{ | |
public ReadOnlySerializeFieldAttribute() | |
{ } | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using UnityEngine; | |
using System.Collections; | |
[AttributeUsage(AttributeTargets.Field, AllowMultiple = true)] | |
public class CommentAttribute : PropertyAttribute | |
{ | |
/// <summary> | |
/// <para>The header text.</para> | |
/// </summary> | |
public readonly string comment; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Shader "Special/Splat" | |
{ | |
Properties | |
{ | |
_MainTex ("Texture", 2D) = "white" {} | |
_NoiseTex ("Texture", 2D) = "white" {} | |
_Warp ("Warp", Range(0,1)) = 0 | |
} | |
SubShader | |
{ |
NewerOlder