This file contains 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 "Mattatz/StencilSample" { | |
Properties { | |
_Outline ("Outline Length", Range(0.0, 1.0)) = 0.2 | |
_Color ("Color", Color) = (0.8, 0.8, 0.8, 1.0) | |
_OutlineColor ("Outline Color", Color) = (0.2, 0.2, 0.2, 1.0) | |
} |
This file contains 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 System.Collections; | |
[RequireComponent (typeof (MeshFilter))] | |
public class Corn : MonoBehaviour { | |
public int subdivisions = 10; | |
public float radius = 1f; | |
public float height = 2f; |
This file contains 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 "Mattatz/UVTransform" { | |
Properties { | |
_MainTex ("Base (RGB)", 2D) = "white" {} | |
_TexScale ("Scale of Tex", Float) = 1.0 | |
_TexRatio ("Ratio of Tex", Float) = 1.0 | |
_Theta ("Rotation of Tex", Float) = 0.0 | |
_PlaneScale ("Scale of Plane Mesh", Vector) = (1, 1, 0, 0) | |
} |
This file contains 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 "Mattatz/SobelFilter" { | |
Properties { | |
_MainTex ("Base (RGB)", 2D) = "white" {} | |
_DeltaX ("Delta X", Float) = 0.01 | |
_DeltaY ("Delta Y", Float) = 0.01 | |
} | |
SubShader { | |
Tags { "RenderType"="Opaque" } |
This file contains 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 "Mattaz/LIC" { | |
Properties { | |
_VectorFieldTex ("Vector Field Texture", 2D) = "white" {} | |
_NoiseTex ("Noise Texture", 2D) = "white" {} | |
_FlowLength ("Flow Length", int) = 10 | |
} | |
SubShader { | |
Tags { "RenderType"="Opaque" } | |
LOD 200 |
This file contains 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 "PostEffect/Bezel" | |
{ | |
Properties | |
{ | |
_MainTex ("Texture", 2D) = "white" {} | |
_HorizontalCount ("Horizontal Screen Count", Int) = 7 | |
_VerticalCount ("Vertical Screen Count", Int) = 2 | |
_Bezel ("Bezel Size", Vector) = (0.01, 0.01, -1, -1) |
This file contains 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
// BitwiseOperations.glsl | |
const int BIT_COUNT = 8; | |
int modi(int x, int y) { | |
return x - y * (x / y); | |
} | |
int or(int a, int b) { | |
int result = 0; |
This file contains 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
#ifndef __LAB_COLORSPACE__ | |
#define __LAB_COLORSPACE__ | |
/* | |
* Conversion between RGB and LAB colorspace. | |
* Import from flowabs glsl program : https://code.google.com/p/flowabs/source/browse/glsl/?r=f36cbdcf7790a28d90f09e2cf89ec9a64911f138 | |
*/ | |
float3 rgb2xyz( float3 c ) { | |
float3 tmp; |
This file contains 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 "Mattatz/TextureAnimation" | |
{ | |
Properties | |
{ | |
_MainTex ("Texture", 2D) = "white" {} | |
_Color ("Color", Color) = (1, 1, 1, 1) | |
_Cols ("Cols Count", Int) = 5 | |
_Rows ("Rows Count", Int) = 3 | |
_Frame ("Per Frame Length", Float) = 0.5 |
This file contains 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 System.Collections; | |
namespace Utils { | |
public class RandomPointOnMesh { | |
public static Vector3 Sample (Mesh mesh) { | |
int[] triangles = mesh.triangles; | |
int index = Mathf.FloorToInt(Random.value * (triangles.Length / 3)); |
OlderNewer