Skip to content

Instantly share code, notes, and snippets.

View xDavidLeon's full-sized avatar

David León xDavidLeon

View GitHub Profile
@xDavidLeon
xDavidLeon / ToonDeferredShading2017.shader
Created May 18, 2017 14:43
Unity 5.6 Deferred Cel Shading Modification
// Unity built-in shader source. Copyright (c) 2016 Unity Technologies. MIT license (see license.txt)
// Modifications by David Leon. Copyright (c) 2017 Lince Works SL. MIT license (see license.txt)
Shader "ToonDeferredShading2017" {
Properties {
_LightTexture0 ("", any) = "" {}
_LightTextureB0 ("", 2D) = "" {}
_ShadowMapTexture ("", any) = "" {}
_SrcBlend ("", Float) = 1
_DstBlend ("", Float) = 1
@xDavidLeon
xDavidLeon / UnityStandardBRDF.cginc
Created March 26, 2016 10:38
UnityStandardBRDF modification for Cel Shading.
#ifndef UNITY_STANDARD_BRDF_INCLUDED
#define UNITY_STANDARD_BRDF_INCLUDED
#include "UnityCG.cginc"
#include "UnityStandardConfig.cginc"
#include "UnityLightingCommon.cginc"
//-------------------------------------------------------------------------------------
// Legacy, to keep backwards compatibility for (pre Unity 5.3) custom user shaders:
#define unity_LightGammaCorrectionConsts_PIDiv4 (IsGammaSpace()? (UNITY_PI/4)*(UNITY_PI/4): (UNITY_PI/4))
// Toony Colors Pro+Mobile 2
// (c) 2014,2015 Jean Moreno
// Modified by David Leon (Lince Works)
Shader "Toony Colors Pro 2/LDK/Basic"
{
Properties
{
//TOONY COLORS
// Toony Colors Pro+Mobile 2
// (c) 2014,2015 Jean Moreno
Shader "Toony Colors Pro 2/LDK/Basic"
{
Properties
{
//TOONY COLORS
_Color ("Color", Color) = (0.5,0.5,0.5,1.0)
Shader "Custom/CelShadingForward" {
Properties {
_Color("Color", Color) = (1, 1, 1, 1)
_MainTex("Albedo (RGB)", 2D) = "white" {}
}
SubShader {
Tags {
"RenderType" = "Opaque"
}
LOD 200
@xDavidLeon
xDavidLeon / Dungeon.cs
Created May 8, 2015 17:20
Zelda Dungeon Generator for Unity 3D
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public class Dungeon : MonoSingleton<Dungeon>
{
[System.Serializable]
public class Position
{
public int x = 0;
@xDavidLeon
xDavidLeon / gist:7844012
Created December 7, 2013 15:34
Unity Deferred Shader Test
Shader "Leon/Test" {
Properties {
_MainTex ("Texture", 2D) = "white" {}
_Emissive ("Emissive", 2D) = "black" {}
_BumpMap ("Bumpmap", 2D) = "bump" {}
}
SubShader {
Tags { "RenderType" = "Opaque" }
CGPROGRAM
#pragma surface surf Leon