Skip to content

Instantly share code, notes, and snippets.

View shawnscode's full-sized avatar

maojingkai shawnscode

View GitHub Profile
@shawnscode
shawnscode / AdaptingQuadTreeMesh.cs
Last active November 8, 2022 01:40
Adaptive Quadtree Mesh Generation
// maojingkai (oammix@gmail.com)
// 2022/09/07
using UnityEngine;
using Unity.Mathematics;
using System.Collections.Generic;
namespace SPGF
@shawnscode
shawnscode / cel.shader
Created September 22, 2016 05:53
Cell Shading
Shader "Cell Shading"
{
Properties
{
_DiffTex("Diffuse Texture", 2D) = "white" {}
_NormalMap("Normal Map", 2D) = "bump" {}
_RampTex("Ramp Texture", 2D) = "white" {}
_SpecExp("Specular Exponent", Range(0.1, 150)) = 20.0
_SpecBoost("Specular Boost", Float) = 0.3
_RimExp("Rim Light Exponent", Range(0.1, 150)) = 4.0
-- maojingkai(oammix@gmail.com)
local _getmetatable = getmetatable
local _setmetatable = setmetatable
local _rawset = rawset
local _rawget = rawget
local metatable = {}
metatable['__tostring'] = 'metamethod'
metatable['__call'] = 'metamethod'