Skip to content

Instantly share code, notes, and snippets.

View ikriz's full-sized avatar
👨‍💻
Coding Magic

Kristen ikriz

👨‍💻
Coding Magic
View GitHub Profile
Shader "Diffuse Lightmap" {
Properties {
_MainTex ("Texture 1", 2D) = "white" {}
}
SubShader {
Tags { "RenderType" = "Opaque" }
Pass {
@ikriz
ikriz / PostBuildTrigger.cs
Created February 21, 2014 21:56
Example PostProcessBuild Script referenced at http://www.ikriz.nl/2012/06/18/unity-post-process-mayhem/
using System.IO;
using UnityEngine;
using UnityEditor;
using UnityEditor.Callbacks;
public static class PostBuildTrigger
{
private static DirectoryInfo targetdir;
private static string buildname;
private static string buildDataDir;
@ikriz
ikriz / gist:8952257
Last active August 29, 2015 13:56
Method to Split YUV Planes
void SplitYUVPlanes(int width, int height, unsigned char *data, int size, unsigned char *yuvInput[3])
{
// live input *data is YUV444 Packed
// Conversion from 444 Packed -> 444 Planar
int index = 0;
int srcStride = size;
// need to flip image from bottom-up to top-down
int revheight = height - 1;