Skip to content

Instantly share code, notes, and snippets.

View mattatz's full-sized avatar
👁️‍🗨️
Yes

mattatz mattatz

👁️‍🗨️
Yes
View GitHub Profile
@mattatz
mattatz / LIC.shader
Last active April 3, 2022 14:09
Simple Line Integral Convolution shader for Unity.
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
@mattatz
mattatz / SobelFilter.shader
Last active January 19, 2024 10:41
Sobel filter shader for Unity.
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" }
@mattatz
mattatz / UVTransform.shader
Created April 6, 2015 02:28
Example of uv transform shader for Unity.
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)
}
@mattatz
mattatz / Cone.cs
Last active March 15, 2022 23:53
Example of a cone mesh creator for Unity.
using UnityEngine;
using System.Collections;
[RequireComponent (typeof (MeshFilter))]
public class Corn : MonoBehaviour {
public int subdivisions = 10;
public float radius = 1f;
public float height = 2f;
@mattatz
mattatz / StencilSample.shader
Created January 8, 2015 03:28
Example of stencil shader to draw a simple outline for Unity.
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)
}