View Permutation with a maximum of 3 fixed points.cs
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
var unchaged = new int[] { 1, 2, 3, 4, 5, 6 }; | |
var perms = GetPermutations(unchaged, 6); | |
int counter = 0; | |
var tolerances = new int[] { 0, 0, 0, 0 }; | |
foreach (var perm in perms) | |
{ | |
var list = perm.ToList(); | |
var text = ""; | |
int tolerance = 0; | |
for (int i = 0; i < list.Count; i++) |
View LODTools.cs
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 UnityEditor; | |
using UnityEngine; | |
public class LODTools | |
{ | |
[MenuItem("Tools/Add LOD Group/LOD 3")] | |
private static void AddGroup() | |
{ | |
var objects = Selection.objects; | |
foreach (var ob in objects) |
View Blending.cginc
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
#pragma once | |
half heightBlend(half h1, half h2, half slope, half contrast) | |
{ | |
h2 = 1 - h2; | |
return saturate((saturate((slope - min(h1, h2)) / max(abs(h1 - h2), 0.1)) - contrast) / max(1.0 - contrast, 0.1)); | |
//half tween = saturate((slope - min(h1, h2)) / max(abs(h1 - h2), 0.1)); | |
//half threshold = contrast; | |
//half width = 1.0 - contrast; | |
//return saturate((tween - threshold) / max(width, 0.1)); |