- Analyse the image and convert all colours to hue/saturation/value (HSV)
- Consolidate a list of all unique hue/saturation/value combinations
- Group HSV values with same H and similar SV; S & V ranges configurable
- Create a list of unique grouped reference colours, write this to a 1D texture and/or a list of shader constants
- Write another sprite texture the same size as the original, which we call the
reference sprite. Set the colour components as follows:
- R = index of reference colour
This file contains hidden or 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
This is free and unencumbered software released into the public domain. | |
Anyone is free to copy, modify, publish, use, compile, sell, or | |
distribute this software, either in source code form or as a compiled | |
binary, for any purpose, commercial or non-commercial, and by any | |
means. | |
In jurisdictions that recognize copyright laws, the author or authors | |
of this software dedicate any and all copyright interest in the | |
software to the public domain. We make this dedication for the benefit |
This file contains hidden or 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 System; | |
using System.Collections; | |
using System.Collections.Generic; | |
/// <summary> | |
/// Utility class which stores a dynamic array of objects or value types, and exposes | |
/// where it places them in its internal storage so you can remove them by index | |
/// if you need to. Indexes remain stable at all times. | |
/// | |
/// This is useful for cases like Coroutine where you may not have a reference |
This file contains hidden or 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 System.IO; | |
using System.Security.Cryptography; | |
// Copyright 2018 Steve Streeting | |
// | |
// Permission is hereby granted, free of charge, to any person obtaining a copy | |
// of this software and associated documentation files (the "Software"), to deal | |
// in the Software without restriction, including without limitation the rights | |
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
// copies of the Software, and to permit persons to whom the Software is |
This file contains hidden or 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 UnityEngine; | |
using System.Collections.Generic; | |
// Written by Steve Streeting 2017 | |
// License: CC0 Public Domain http://creativecommons.org/publicdomain/zero/1.0/ | |
/// <summary> | |
/// Component which will flicker a linked light while active by changing its | |
/// intensity between the min and max values given. The flickering can be | |
/// sharp or smoothed depending on the value of the smoothing parameter. |
This file contains hidden or 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 UnityEngine; | |
using UnityEditor; | |
using System.Linq; | |
/// This just exposes the Sorting Layer / Order in MeshRenderer since it's there | |
/// but not displayed in the inspector. Getting MeshRenderer to render in front | |
/// of a SpriteRenderer is pretty hard without this. | |
[CustomEditor(typeof(MeshRenderer))] | |
public class MeshRendererSortingEditor : Editor | |
{ |
This file contains hidden or 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
steve@STEVENSTREED3AA MINGW64 ~/Documents/projects/Go/src/github.com/github/git-lfs (windows-tests) | |
$ script/integration | |
compile git-lfs for script/integration | |
commands\mancontent_gen.go | |
Using go1.5.1 | |
Git LFS: /c/Users/steve/Documents/projects/Go/src/github.com/github/git-lfs/bin/git-lfs | |
git-lfs/1.0.0 (GitHub; windows amd64; go 1.5.1; git e980edd) | |
git version 2.5.1.windows.1 | |
Updated pre-push hook. | |
Git LFS initialized. |
NewerOlder