├── .gitignore ├── Assets ├── IslandGenerator.meta ├── IslandGenerator │ ├── DemoScene.unity │ ├── DemoScene.unity.meta │ ├── Dep.meta │ ├── Dep │ │ ├── CoherentNoise.meta │ │ ├── CoherentNoise │ │ │ ├── .svn │ │ │ │ ├── entries │ │ │ │ ├── format │ │ │ │ ├── pristine │ │ │ │ │ ├── 12 │ │ │ │ │ │ └── 12d1eeb1f1590bc297a25ebe7a4bc2e8b5575e96.svn-base │ │ │ │ │ ├── 15 │ │ │ │ │ │ └── 15898791e2b6b2daead7308c9970719a99041e0b.svn-base │ │ │ │ │ ├── 17 │ │ │ │ │ │ └── 177a66c14a1a6bdb476948186412c8ba517b84a0.svn-base │ │ │ │ │ ├── 30 │ │ │ │ │ │ └── 306e804cc16d6c95b718a603c184636e9a940940.svn-base │ │ │ │ │ ├── 32 │ │ │ │ │ │ └── 3273ba04cd168f0afd054c7c056f995bb1cc7b87.svn-base │ │ │ │ │ ├── 35 │ │ │ │ │ │ └── 35dd4d968eacefe6be0cdd2ac4478b77fd60f274.svn-base │ │ │ │ │ ├── 41 │ │ │ │ │ │ └── 41d956383f1cf3b8ab5058a4488aee5e6a57c169.svn-base │ │ │ │ │ ├── 43 │ │ │ │ │ │ ├── 431f49a31d39a1bf443343ff537ac46b4c9b0077.svn-base │ │ │ │ │ │ └── 43a30b12dc4d71013959b9024973f1bf72522814.svn-base │ │ │ │ │ ├── 45 │ │ │ │ │ │ └── 45e4e3158b09c3188164b86064030ab5d58dfa04.svn-base │ │ │ │ │ ├── 64 │ │ │ │ │ │ ├── 646da4e5efdb5fe23f7136f4df4cfbc2cc87aa2d.svn-base │ │ │ │ │ │ └── 64896615f4c26d257173e39e7d6f15c0e57b218b.svn-base │ │ │ │ │ ├── 67 │ │ │ │ │ │ ├── 67c5e9cd8f35c4834720abaeff76cb50c273a76b.svn-base │ │ │ │ │ │ └── 67d7e690ea2091396c1ba3a3f677b78223748fbb.svn-base │ │ │ │ │ ├── 73 │ │ │ │ │ │ ├── 730a5dc9f5bb3d3bad00099ac2310f6916728e36.svn-base │ │ │ │ │ │ └── 7362e930abf0c56287942df0075d4f8bfd927fa7.svn-base │ │ │ │ │ ├── 75 │ │ │ │ │ │ └── 75d9f59ba222f8a9ec2eb63438b640a860ec1c47.svn-base │ │ │ │ │ ├── 06 │ │ │ │ │ │ └── 06a3ab504d27e180406fc2f837a7ef7d4e3ce66b.svn-base │ │ │ │ │ ├── 0a │ │ │ │ │ │ └── 0a3b9658a0690bbf749dae59005c600b653821c3.svn-base │ │ │ │ │ ├── 0d │ │ │ │ │ │ └── 0d7bef7863c06ff3fcd4cba0e4d74159d52ef2e8.svn-base │ │ │ │ │ ├── 1b │ │ │ │ │ │ └── 1b7bb9f02b6f5757a0008a3b83b444aca83b0faa.svn-base │ │ │ │ │ ├── 4a │ │ │ │ │ │ └── 4a0af022cf44eeb55a1177db4239228d50607dda.svn-base │ │ │ │ │ ├── 5b │ │ │ │ │ │ └── 5b62c5da730861d7879d36bf012dbe99db18d982.svn-base │ │ │ │ │ ├── 6e │ │ │ │ │ │ └── 6e63b415439ec701b36b10220f9ce8917332be78.svn-base │ │ │ │ │ ├── 6f │ │ │ │ │ │ └── 6fe8a766ee480dabf22e259d8f06e9e5e5ec6305.svn-base │ │ │ │ │ ├── 7a │ │ │ │ │ │ └── 7aacd5dad95576469cdec8adc8fbedce97f3ff4b.svn-base │ │ │ │ │ ├── 7c │ │ │ │ │ │ └── 7c5c16c9ae122677dd4ead4f9b7890423152e404.svn-base │ │ │ │ │ ├── 7f │ │ │ │ │ │ └── 7f58b9534d7f9be0a568517e0f58abb06acdcb3d.svn-base │ │ │ │ │ ├── 8b │ │ │ │ │ │ └── 8b38f96416f1a9af247f564bbd19a384851ed059.svn-base │ │ │ │ │ ├── 8d │ │ │ │ │ │ └── 8ddeeb1a62c47577b5d3e0636b55d394ff4d8ed6.svn-base │ │ │ │ │ ├── 9a │ │ │ │ │ │ ├── 9a8661db7c2e4aa9ae4b34d61fe8f4341e511a93.svn-base │ │ │ │ │ │ └── 9abc32790c7fab483dec7e82e7b77b14171df29d.svn-base │ │ │ │ │ ├── a0 │ │ │ │ │ │ ├── a06b20f90d55fdc7f2c36284a1b9067ee0b6acd1.svn-base │ │ │ │ │ │ └── a0e2d90808c3871023dd5c8bd51ea717a0c53e1b.svn-base │ │ │ │ │ ├── aa │ │ │ │ │ │ └── aa144d381fa5b58e844b59d796327992e1a064ef.svn-base │ │ │ │ │ ├── b2 │ │ │ │ │ │ └── b2795b48d81ee7f54a644edc2915ba96dadaa8d3.svn-base │ │ │ │ │ ├── b9 │ │ │ │ │ │ └── b964d5695d2937c31e2f50097fa61ac8f830675f.svn-base │ │ │ │ │ ├── bb │ │ │ │ │ │ └── bb551e81df39115b1b9517c02bb36ced506391f3.svn-base │ │ │ │ │ ├── bc │ │ │ │ │ │ ├── bc3e6d325121bc917d652971f208bb1528ac6684.svn-base │ │ │ │ │ │ ├── bc87a2292b69c2bb2fc9fe53763f77a4cabcb3eb.svn-base │ │ │ │ │ │ └── bce7698d3d05813701a7e14e202b69951b075da3.svn-base │ │ │ │ │ ├── c1 │ │ │ │ │ │ └── c112ca40a76bc202c94f6b198829f61d5eb49242.svn-base │ │ │ │ │ ├── c4 │ │ │ │ │ │ └── c49b23a4c3d4588398444089f1e9c5da4d621383.svn-base │ │ │ │ │ ├── c8 │ │ │ │ │ │ └── c85eeaff337f053a4a8840719cab5426e2016e62.svn-base │ │ │ │ │ ├── cc │ │ │ │ │ │ └── cc849d81450d848fc191169a64462fb153f0e3b2.svn-base │ │ │ │ │ ├── d1 │ │ │ │ │ │ └── d11acbaa01070536138ad946d1dcb28f62789b01.svn-base │ │ │ │ │ ├── e0 │ │ │ │ │ │ └── e060b57e92c47935a0d1c2fb56dc08ed8dca7610.svn-base │ │ │ │ │ ├── ea │ │ │ │ │ │ └── ea47d104e58cd13ddf33d7c834524e45063ed6b1.svn-base │ │ │ │ │ ├── ed │ │ │ │ │ │ └── ed76bc5b8cb5003db7ff4a95be0ed4874d2bb0b6.svn-base │ │ │ │ │ ├── f3 │ │ │ │ │ │ └── f3ef5f77c441dcd5960a5615e8164bca3e139124.svn-base │ │ │ │ │ ├── f5 │ │ │ │ │ │ └── f5f6376ad25fcc272709ef9659ed7fbf771bf4f5.svn-base │ │ │ │ │ └── f7 │ │ │ │ │ │ └── f752b380e3f153bc03d42f30e9e6a83727a54849.svn-base │ │ │ │ └── wc.db │ │ │ ├── CoherentNoise.XML │ │ │ ├── CoherentNoise.XML.meta │ │ │ ├── CoherentNoise.dll │ │ │ ├── CoherentNoise.dll.meta │ │ │ ├── Demo.meta │ │ │ ├── Demo │ │ │ │ ├── Grass.psd │ │ │ │ ├── Grass.psd.meta │ │ │ │ ├── New Terrain 1.asset │ │ │ │ ├── New Terrain 1.asset.meta │ │ │ │ ├── New Terrain.asset │ │ │ │ ├── New Terrain.asset.meta │ │ │ │ ├── Skybox.meta │ │ │ │ ├── Skybox │ │ │ │ │ └── Textures.meta │ │ │ │ ├── Terrain Textures.meta │ │ │ │ ├── Terrain Textures │ │ │ │ │ ├── GoodDirt.psd │ │ │ │ │ ├── GoodDirt.psd.meta │ │ │ │ │ ├── Grass (Hill).psd │ │ │ │ │ └── Grass (Hill).psd.meta │ │ │ │ ├── TerrainDemo.cs │ │ │ │ ├── TerrainDemo.cs.meta │ │ │ │ ├── demo.unity │ │ │ │ └── demo.unity.meta │ │ │ ├── Manual.pdf │ │ │ ├── Manual.pdf.meta │ │ │ ├── readme.txt │ │ │ └── readme.txt.meta │ │ ├── FortuneVoronoi.meta │ │ └── FortuneVoronoi │ │ │ ├── AssemblyInfo.cs │ │ │ ├── AssemblyInfo.cs.meta │ │ │ ├── FortuneVoronoi.cs │ │ │ ├── FortuneVoronoi.cs.meta │ │ │ ├── LICENCE │ │ │ ├── LICENCE.meta │ │ │ ├── PriorityQueue.cs │ │ │ ├── PriorityQueue.cs.meta │ │ │ ├── ToolBox.cs │ │ │ ├── ToolBox.cs.meta │ │ │ ├── Vector.cs │ │ │ └── Vector.cs.meta │ ├── Materials.meta │ ├── Materials │ │ ├── IslandMaterial.mat │ │ ├── IslandMaterial.mat.meta │ │ ├── IslandPineGroup.mat │ │ ├── IslandPineGroup.mat.meta │ │ ├── IslandPlant.mat │ │ ├── IslandPlant.mat.meta │ │ ├── WaterPlane.mat │ │ └── WaterPlane.mat.meta │ ├── Prefabs.meta │ ├── Prefabs │ │ ├── Island.prefab │ │ └── Island.prefab.meta │ ├── Scripts.meta │ ├── Scripts │ │ ├── IslandGenerator.meta │ │ ├── IslandGenerator │ │ │ ├── Island.cs │ │ │ ├── Island.cs.meta │ │ │ ├── IslandDemo.cs │ │ │ ├── IslandDemo.cs.meta │ │ │ ├── IslandTile.cs │ │ │ ├── IslandTile.cs.meta │ │ │ ├── IslandTileCorner.cs │ │ │ ├── IslandTileCorner.cs.meta │ │ │ ├── IslandTileEdge.cs │ │ │ ├── IslandTileEdge.cs.meta │ │ │ ├── IslandVegetation.cs │ │ │ └── IslandVegetation.cs.meta │ │ ├── Meta.meta │ │ └── Meta │ │ │ ├── World.cs │ │ │ └── World.cs.meta │ ├── Shaders.meta │ ├── Shaders │ │ ├── IslandShader.sgraph │ │ ├── IslandShader.sgraph.meta │ │ ├── IslandShader.shader │ │ └── IslandShader.shader.meta │ ├── Textures.meta │ └── Textures │ │ ├── IslandRamp.psd │ │ ├── IslandRamp.psd.meta │ │ ├── pine_group_1.png │ │ ├── pine_group_1.png.meta │ │ ├── trop_plant_1.png │ │ └── trop_plant_1.png.meta ├── Standard Assets.meta ├── Standard Assets │ ├── Scripts.meta │ └── Scripts │ │ ├── Camera Scripts.meta │ │ ├── Camera Scripts │ │ ├── MouseOrbit.js │ │ ├── MouseOrbit.js.meta │ │ ├── SmoothFollow.js │ │ ├── SmoothFollow.js.meta │ │ ├── SmoothLookAt.js │ │ └── SmoothLookAt.js.meta │ │ ├── General Scripts.meta │ │ └── General Scripts │ │ ├── ActivateTrigger.cs │ │ ├── ActivateTrigger.cs.meta │ │ ├── DragRigidbody.js │ │ └── DragRigidbody.js.meta ├── StrumpyShaderEditor.meta └── StrumpyShaderEditor │ ├── Documentation.meta │ ├── Documentation │ ├── KeyBindings.pdf │ ├── KeyBindings.pdf.meta │ ├── ShaderEditorDoc.pdf │ └── ShaderEditorDoc.pdf.meta │ ├── Editor.meta │ └── Editor │ ├── Resources.meta │ ├── Resources │ ├── Internal.meta │ ├── Internal │ │ ├── 1x2AA.png │ │ ├── 1x2AA.png.meta │ │ ├── Checker.mat │ │ ├── Checker.mat.meta │ │ ├── Delete.tga │ │ ├── Delete.tga.meta │ │ ├── Down.tga │ │ ├── Down.tga.meta │ │ ├── ShaderTemplate.template │ │ ├── ShaderTemplate.template.meta │ │ ├── Temp.meta │ │ ├── TextureCopy.shader │ │ ├── TextureCopy.shader.meta │ │ ├── Up.tga │ │ ├── Up.tga.meta │ │ ├── checker.png │ │ └── checker.png.meta │ ├── Public.meta │ └── Public │ │ ├── Graphs.meta │ │ └── Graphs │ │ ├── Distortion.sgraph │ │ ├── Distortion.sgraph.meta │ │ ├── NormalMap.sgraph │ │ ├── NormalMap.sgraph.meta │ │ ├── RampLighting.sgraph │ │ ├── RampLighting.sgraph.meta │ │ ├── RimLighting.sgraph │ │ ├── RimLighting.sgraph.meta │ │ ├── VertexModification.sgraph │ │ ├── VertexModification.sgraph.meta │ │ ├── clip.sgraph │ │ ├── clip.sgraph.meta │ │ ├── defaultlighting.sgraph │ │ ├── defaultlighting.sgraph.meta │ │ ├── depthBiasedAlpha.sgraph │ │ ├── depthBiasedAlpha.sgraph.meta │ │ ├── hypnotic.sgraph │ │ ├── hypnotic.sgraph.meta │ │ ├── lerpcube.sgraph │ │ ├── lerpcube.sgraph.meta │ │ ├── movinggradient.sgraph │ │ ├── movinggradient.sgraph.meta │ │ ├── uvpan.sgraph │ │ └── uvpan.sgraph.meta │ ├── Scripts.meta │ ├── Scripts │ ├── NodeEditorWindow.cs │ ├── NodeEditorWindow.cs.meta │ ├── StrumpyPreviewWindow.cs │ └── StrumpyPreviewWindow.cs.meta │ ├── StrumpyShaderEditor.dll │ └── StrumpyShaderEditor.dll.meta ├── LICENSE ├── ProjectSettings ├── AudioManager.asset ├── DynamicsManager.asset ├── EditorBuildSettings.asset ├── EditorSettings.asset ├── GraphicsSettings.asset ├── InputManager.asset ├── NavMeshLayers.asset ├── NetworkManager.asset ├── Physics2DSettings.asset ├── ProjectSettings.asset ├── QualitySettings.asset ├── TagManager.asset └── TimeManager.asset └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | [Ll]ibrary/ 2 | [Tt]emp/ 3 | [Oo]bj/ 4 | [Bb]uild/ 5 | 6 | # Autogenerated VS/MD solution and project files 7 | /*.csproj 8 | /*.unityproj 9 | /*.sln 10 | /*.suo 11 | /*.user 12 | /*.userprefs 13 | /*.pidb 14 | /*.booproj 15 | 16 | #Unity3D Generated File On Crash Reports 17 | sysinfo.txt 18 | -------------------------------------------------------------------------------- /Assets/IslandGenerator.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b763c149de4ebc14c9b7e548be4fc3d4 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/IslandGenerator/DemoScene.unity: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaellasky/ManyLandsGenerator/932989d0dacb2dadeda5502fa2294990f7d378b7/Assets/IslandGenerator/DemoScene.unity -------------------------------------------------------------------------------- /Assets/IslandGenerator/DemoScene.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6d1675c515378064180769b2314c6dff 3 | DefaultImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/IslandGenerator/Dep.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2cf7c93fdd21c1a469199ac8d923e580 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/IslandGenerator/Dep/CoherentNoise.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7443f19338e6fe64c80865cf8733bbc4 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/IslandGenerator/Dep/CoherentNoise/.svn/entries: -------------------------------------------------------------------------------- 1 | 12 2 | -------------------------------------------------------------------------------- /Assets/IslandGenerator/Dep/CoherentNoise/.svn/format: -------------------------------------------------------------------------------- 1 | 12 2 | -------------------------------------------------------------------------------- /Assets/IslandGenerator/Dep/CoherentNoise/.svn/pristine/06/06a3ab504d27e180406fc2f837a7ef7d4e3ce66b.svn-base: -------------------------------------------------------------------------------- 1 | using CoherentNoise.Interpolation; 2 | using UnityEngine; 3 | 4 | namespace CoherentNoise.Generation 5 | { 6 | /// 7 | /// Most basic coherent noise: value noise. This algorithm generates random values in integer coordinates and smoothly interpolates between them. 8 | /// Generated noise has no special characteristics except that it's noisy. 9 | /// 10 | /// Values returned range from -1 to 1. 11 | /// 12 | public class ValueNoise : Generator 13 | { 14 | private readonly CoherentNoise.LatticeNoise m_Source; 15 | private readonly SCurve m_SCurve; 16 | 17 | /// 18 | /// Create new generator with specified seed 19 | /// 20 | /// noise seed 21 | public ValueNoise(int seed) 22 | : this(seed, null) 23 | { 24 | 25 | } 26 | 27 | /// 28 | /// Noise period. Used for repeating (seamless) noise. 29 | /// When Period >0 resulting noise pattern repeats exactly every Period, for all coordinates. 30 | /// 31 | public int Period { get { return m_Source.Period; } set { m_Source.Period = value; } } 32 | 33 | /// 34 | /// Create new generator with specified seed and interpolation algorithm. Different interpolation algorithms can make noise smoother at the expense of speed. 35 | /// 36 | /// noise seed 37 | /// Interpolator to use. Can be null, in which case default will be used 38 | public ValueNoise(int seed, SCurve sCurve) 39 | { 40 | m_Source = new CoherentNoise.LatticeNoise(seed); 41 | m_SCurve = sCurve; 42 | } 43 | 44 | private SCurve SCurve { get { return m_SCurve ?? SCurve.Default; } } 45 | 46 | #region Implementation of Noise 47 | 48 | /// 49 | /// Returns noise value at given point. 50 | /// 51 | /// X coordinate 52 | /// Y coordinate 53 | /// Z coordinate 54 | /// Noise value 55 | public override float GetValue(float x, float y, float z) 56 | { 57 | int ix = Mathf.FloorToInt(x); 58 | int iy = Mathf.FloorToInt(y); 59 | int iz = Mathf.FloorToInt(z); 60 | 61 | // interpolate the coordinates instead of values - it's way faster 62 | float xs = SCurve.Interpolate(x - ix); 63 | float ys = SCurve.Interpolate(y - iy); 64 | float zs = SCurve.Interpolate(z - iz); 65 | 66 | // THEN we can use linear interp to find our value - triliear actually 67 | 68 | float n0 = m_Source.GetValue(ix, iy, iz); 69 | float n1 = m_Source.GetValue(ix + 1, iy, iz); 70 | float ix0 = Mathf.Lerp(n0, n1, xs); 71 | 72 | n0 = m_Source.GetValue(ix, iy + 1, iz); 73 | n1 = m_Source.GetValue(ix + 1, iy + 1, iz); 74 | float ix1 = Mathf.Lerp(n0, n1, xs); 75 | 76 | float iy0 = Mathf.Lerp(ix0, ix1, ys); 77 | 78 | n0 = m_Source.GetValue(ix, iy, iz + 1); 79 | n1 = m_Source.GetValue(ix + 1, iy, iz + 1); 80 | ix0 = Mathf.Lerp(n0, n1, xs); // on y=0, z=1 edge 81 | 82 | n0 = m_Source.GetValue(ix, iy + 1, iz + 1); 83 | n1 = m_Source.GetValue(ix + 1, iy + 1, iz + 1); 84 | ix1 = Mathf.Lerp(n0, n1, xs); // on y=z=1 edge 85 | 86 | float iy1 = Mathf.Lerp(ix0, ix1, ys); 87 | 88 | return Mathf.Lerp(iy0, iy1, zs); // inside cube 89 | } 90 | 91 | 92 | #endregion 93 | } 94 | } -------------------------------------------------------------------------------- /Assets/IslandGenerator/Dep/CoherentNoise/.svn/pristine/0a/0a3b9658a0690bbf749dae59005c600b653821c3.svn-base: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | 4 | namespace CoherentNoise.Texturing 5 | { 6 | /// 7 | /// Use methods in this class to create Unity textures with noise generators. All textures are created using 2D noise (i.e, Z coordinate is always 0), and sample source noise in 8 | /// [0,1]x[0,1] area. 9 | /// 10 | public static class TextureMaker 11 | { 12 | /// 13 | /// Generic texture-building method. Creates a texture using a fuction that transforms float coordiantes (in the range [0,1]x[0,1]) into color 14 | /// 15 | ///Texture width. 16 | ///Texture height 17 | /// Function mapping coordinates to color 18 | ///Texture format to use 19 | /// 20 | public static Texture Make(int width, int height, Func colorFunc, TextureFormat format=TextureFormat.RGB24) 21 | { 22 | Color[] cols = new Color[width * height]; 23 | for (int ii = 0; ii < width; ii++) 24 | { 25 | for (int jj = 0; jj < height; jj++) 26 | { 27 | cols[ii + jj * width] = colorFunc((float)ii / width, (float)jj / height); 28 | } 29 | } 30 | var res = new Texture2D(width, height, format, false); 31 | res.SetPixels(cols, 0); 32 | res.Apply(); 33 | 34 | return res; 35 | 36 | } 37 | 38 | /// 39 | /// Creates a texture with only alpha channel. 40 | /// 41 | ///Texture width. 42 | ///Texture height 43 | ///Noise source 44 | /// 45 | public static Texture AlphaTexture(int width, int height, Generator noise) 46 | { 47 | return Make(width,height,(x,y)=>new Color(0,0,0,noise.GetValue(x,y,0)*0.5f+0.5f), TextureFormat.Alpha8); 48 | } 49 | /// 50 | /// Creates a monochrome texture. 51 | /// 52 | ///Texture width. 53 | ///Texture height 54 | ///Noise source 55 | /// 56 | public static Texture MonochromeTexture(int width, int height, Generator noise) 57 | { 58 | return Make(width, height, (x, y) => 59 | { 60 | var v = noise.GetValue(x, y, 0) * 0.5f + 0.5f; 61 | return new Color(v, v, v, 1); 62 | }); 63 | } 64 | 65 | /// 66 | /// Creates a texture using ramp of colors. Noise value (clamped to [-1,1]) is mapped to one-dimensional ramp texture to obtain final color. 67 | /// As there are no 1-dimensional textures in Unity, Texture2D is used, that is sampled along its top line. 68 | /// 69 | ///Texture width. 70 | ///Texture height 71 | ///Noise source 72 | ///Ramp texture 73 | /// 74 | public static Texture RampTexture(int width, int height, Generator noise, Texture2D ramp) 75 | { 76 | Color[] rampCols = ramp.GetPixels(0, 0, ramp.width, 1); 77 | 78 | return Make(width, height, (x, y) => 79 | { 80 | var v = noise.GetValue(x, y, 0) * 0.5f + 0.5f; 81 | return rampCols[(int)(Mathf.Clamp01(v) * (ramp.width - 1))]; 82 | }); 83 | } 84 | 85 | /// 86 | /// Creates a texture to use as a bump map, taking height noise as input. 87 | /// 88 | ///Texture width. 89 | ///Texture height 90 | ///heightmap source 91 | /// 92 | public static Texture BumpMap(int width, int height, Generator noise) 93 | { 94 | var res = new Texture2D(width, height, TextureFormat.RGB24, false); 95 | for (int mip = 0; mip < res.mipmapCount; mip++) 96 | { 97 | Color[] cols = new Color[width * height]; 98 | for (int ii = 0; ii < width; ii++) 99 | { 100 | for (int jj = 0; jj < height; jj++) 101 | { 102 | var left = noise.GetValue((ii - 0.5f) / width, (float)jj / height, 0); 103 | var right = noise.GetValue((ii + 0.5f) / width, (float)jj / height, 0); 104 | var down = noise.GetValue((float)ii / width, (jj - 0.5f) / height, 0); 105 | var up = noise.GetValue((float)ii / width, (jj + 0.5f) / height, 0); 106 | Vector3 normal = new Vector3(right - left, up - down, 1).normalized; 107 | cols[ii + jj * width] = new Color(normal.x, normal.y, normal.z); 108 | } 109 | } 110 | res.SetPixels(cols, mip); 111 | width >>= 1; 112 | height >>= 1; 113 | } 114 | res.Apply(false); 115 | 116 | return res; 117 | } 118 | 119 | } 120 | } -------------------------------------------------------------------------------- /Assets/IslandGenerator/Dep/CoherentNoise/.svn/pristine/0d/0d7bef7863c06ff3fcd4cba0e4d74159d52ef2e8.svn-base: -------------------------------------------------------------------------------- 1 | using CoherentNoise.Interpolation; 2 | using UnityEngine; 3 | 4 | namespace CoherentNoise.Generation 5 | { 6 | /// 7 | /// This is the same noise as , but it does not change in Z direction. This is more efficient if you're only interested in 2D noise anyway. 8 | /// 9 | public class ValueNoise2D : Generator 10 | { 11 | private readonly CoherentNoise.LatticeNoise m_Source; 12 | private readonly SCurve m_SCurve; 13 | 14 | /// 15 | /// Create new generator with specified seed 16 | /// 17 | /// noise seed 18 | public ValueNoise2D(int seed) 19 | : this(seed, null) 20 | { 21 | 22 | } 23 | 24 | /// 25 | /// Create new generator with specified seed and interpolation algorithm. Different interpolation algorithms can make noise smoother at the expense of speed. 26 | /// 27 | /// noise seed 28 | /// Interpolator to use. Can be null, in which case default will be used 29 | public ValueNoise2D(int seed, SCurve sCurve) 30 | { 31 | m_Source = new CoherentNoise.LatticeNoise(seed); 32 | m_SCurve = sCurve; 33 | } 34 | 35 | private SCurve SCurve { get { return m_SCurve ?? SCurve.Default; } } 36 | 37 | /// 38 | /// Noise period. Used for repeating (seamless) noise. 39 | /// When Period >0 resulting noise pattern repeats exactly every Period, for all coordinates. 40 | /// 41 | public int Period { get { return m_Source.Period; } set { m_Source.Period = value; } } 42 | 43 | #region Implementation of Noise 44 | 45 | /// 46 | /// Returns noise value at given point. 47 | /// 48 | /// X coordinate 49 | /// Y coordinate 50 | /// Z coordinate 51 | /// Noise value 52 | public override float GetValue(float x, float y, float z) 53 | { 54 | int ix = Mathf.FloorToInt(x); 55 | int iy = Mathf.FloorToInt(y); 56 | 57 | // interpolate the coordinates instead of values - it's way faster 58 | float xs = SCurve.Interpolate(x - ix); 59 | float ys = SCurve.Interpolate(y - iy); 60 | 61 | // THEN we can use linear interp to find our value - biliear actually 62 | 63 | float n0 = m_Source.GetValue(ix, iy, 0); 64 | float n1 = m_Source.GetValue(ix + 1, iy, 0); 65 | float ix0 = Mathf.Lerp(n0, n1, xs); 66 | 67 | n0 = m_Source.GetValue(ix, iy + 1, 0); 68 | n1 = m_Source.GetValue(ix + 1, iy + 1, 0); 69 | float ix1 = Mathf.Lerp(n0, n1, xs); 70 | 71 | return Mathf.Lerp(ix0, ix1, ys); 72 | } 73 | 74 | 75 | #endregion 76 | } 77 | } -------------------------------------------------------------------------------- /Assets/IslandGenerator/Dep/CoherentNoise/.svn/pristine/12/12d1eeb1f1590bc297a25ebe7a4bc2e8b5575e96.svn-base: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace CoherentNoise.Interpolation 4 | { 5 | internal class CosineSCurve: SCurve 6 | { 7 | #region Overrides of Interpolator 8 | 9 | public override float Interpolate(float t) 10 | { 11 | return (float)( (1 - Math.Cos(t * 3.1415927)) * .5); 12 | } 13 | 14 | #endregion 15 | } 16 | } -------------------------------------------------------------------------------- /Assets/IslandGenerator/Dep/CoherentNoise/.svn/pristine/15/15898791e2b6b2daead7308c9970719a99041e0b.svn-base: -------------------------------------------------------------------------------- 1 | using System; 2 | using CoherentNoise.Generation.Combination; 3 | using CoherentNoise.Generation.Displacement; 4 | using CoherentNoise.Generation.Modification; 5 | using UnityEngine; 6 | 7 | namespace CoherentNoise 8 | { 9 | /// 10 | /// This class defines a number of useful extension methods for class, that apply common noise transformations 11 | /// 12 | public static class NoiseEx 13 | { 14 | /// 15 | /// Stretch/squeeze noise generator () 16 | /// 17 | ///Source noise 18 | ///Squeeze in X direction 19 | ///Squeeze in Y direction 20 | ///Squeeze in Z direction 21 | /// 22 | public static Generator Scale(this Generator source, float x, float y, float z) 23 | { 24 | return new Scale(source, x, y, z); 25 | } 26 | 27 | /// 28 | /// Translate (move) noise 29 | /// 30 | ///Source noise 31 | ///Distance in X direction 32 | ///Distance in Y direction 33 | ///Distance in Z direction 34 | /// 35 | public static Generator Translate(this Generator source, float x, float y, float z) 36 | { 37 | return new Translate(source, x, y, z); 38 | } 39 | 40 | /// 41 | /// Roate noise () 42 | /// 43 | ///Noise source 44 | ///Angle around X axis 45 | ///Angle around Y axis 46 | ///Angle around Z axis 47 | /// 48 | public static Generator Rotate(this Generator source, float x, float y, float z) 49 | { 50 | return new Rotate(source, x, y, z); 51 | } 52 | 53 | /// 54 | /// Apply turnbulence transform to noise () 55 | /// 56 | ///Noise source 57 | ///Turbulence base frequency 58 | ///Turbulence power 59 | ///Turbulence seed 60 | /// 61 | public static Generator Turbulence(this Generator source, float frequency, float power, int seed) 62 | { 63 | return new Turbulence(source, seed) 64 | { 65 | Frequency = frequency, 66 | Power = power, 67 | OctaveCount = 6 68 | }; 69 | } 70 | 71 | /// 72 | /// Apply turnbulence transform to noise () with random seed 73 | /// 74 | ///Noise source 75 | ///Turbulence base frequency 76 | ///Turbulence power 77 | /// 78 | public static Generator Turbulence(this Generator source, float frequency, float power) 79 | { 80 | return new Turbulence(source, Guid.NewGuid().GetHashCode()) 81 | { 82 | Frequency = frequency, 83 | Power = power, 84 | OctaveCount = 6 85 | }; 86 | } 87 | 88 | /// 89 | /// Blend two noise generators using third one as weight 90 | /// 91 | ///Source noise 92 | ///Noise to blend 93 | ///Blend weight 94 | /// 95 | public static Generator Blend(this Generator source, Generator other, Generator weight) 96 | { 97 | return new Blend(source, other, weight); 98 | } 99 | 100 | /// 101 | /// Apply modification function to noise 102 | /// 103 | ///Source noise 104 | ///Function to apply 105 | /// 106 | public static Generator Modify(this Generator source, Func modifier) 107 | { 108 | return new Modify(source, modifier); 109 | } 110 | 111 | /// 112 | /// Multiply noise by AnimationCurve value 113 | /// 114 | ///Source noise 115 | ///Curve 116 | /// 117 | public static Generator Curve(this Generator source, AnimationCurve curve) 118 | { 119 | return new Curve(source, curve); 120 | } 121 | 122 | /// 123 | /// Binarize noise 124 | /// 125 | ///Source noise 126 | ///Treshold value 127 | /// 128 | public static Generator Binarize(this Generator source, float treshold) 129 | { 130 | return new Binarize(source, treshold); 131 | } 132 | 133 | /// 134 | /// Apply bias to noise 135 | /// 136 | /// Source noise 137 | /// Bias value 138 | /// 139 | public static Generator Bias(this Generator source, float b) 140 | { 141 | return new Bias(source, b); 142 | } 143 | 144 | /// 145 | /// Apply gain to noise 146 | /// 147 | /// Source noise 148 | /// Gain value 149 | /// 150 | public static Generator Gain(this Generator source, float g) 151 | { 152 | return new Gain(source, g); 153 | } 154 | 155 | /// 156 | /// Apply a linear transform to noise. The same as noise.Modify(f=>a*f+b) 157 | /// 158 | ///Source noise 159 | ///Scale value 160 | ///Shift value 161 | /// 162 | public static Generator ScaleShift(this Generator source, float a, float b) 163 | { 164 | return new Modify(source, f => a*f + b); 165 | } 166 | } 167 | } -------------------------------------------------------------------------------- /Assets/IslandGenerator/Dep/CoherentNoise/.svn/pristine/17/177a66c14a1a6bdb476948186412c8ba517b84a0.svn-base: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | 4 | namespace CoherentNoise.Generation.Displacement 5 | { 6 | /// 7 | /// This generator rotates its source around origin. 8 | /// 9 | public class Rotate: Generator 10 | { 11 | private Generator m_Source; 12 | private Quaternion m_Rotation; 13 | 14 | /// 15 | /// Create new rotation using a quaternion 16 | /// 17 | ///Source generator 18 | ///Rotation 19 | public Rotate(Generator source, Quaternion rotation) 20 | { 21 | m_Source = source; 22 | m_Rotation = rotation; 23 | } 24 | 25 | /// 26 | /// Create new rotation using Euler angles 27 | /// 28 | ///Source generator 29 | ///Rotation around X axis 30 | ///Rotation around Y axis 31 | ///Rotation around Z axis 32 | public Rotate(Generator source, float angleX, float angleY, float angleZ):this(source, Quaternion.Euler(angleX,angleY,angleZ)) 33 | { 34 | 35 | } 36 | 37 | #region Overrides of Noise 38 | 39 | /// 40 | /// Returns noise value at given point. 41 | /// 42 | /// X coordinate 43 | /// Y coordinate 44 | /// Z coordinateNoise value 45 | public override float GetValue(float x, float y, float z) 46 | { 47 | Vector3 v = m_Rotation*new Vector3(x,y,z); 48 | return m_Source.GetValue(v); 49 | } 50 | 51 | #endregion 52 | } 53 | } -------------------------------------------------------------------------------- /Assets/IslandGenerator/Dep/CoherentNoise/.svn/pristine/1b/1b7bb9f02b6f5757a0008a3b83b444aca83b0faa.svn-base: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace CoherentNoise.Generation.Combination 4 | { 5 | /// 6 | /// This generator returns minimum value of its two source generators 7 | /// 8 | public class Min : Generator 9 | { 10 | private readonly Generator m_A; 11 | private readonly Generator m_B; 12 | 13 | /// 14 | /// Create new generator 15 | /// 16 | ///First generator 17 | ///Second generator 18 | public Min(Generator a, Generator b) 19 | { 20 | m_A = a; 21 | m_B = b; 22 | } 23 | 24 | #region Implementation of Noise 25 | 26 | /// 27 | /// Returns noise value at given point. 28 | /// 29 | /// X coordinate 30 | /// Y coordinate 31 | /// Z coordinate 32 | /// Noise value 33 | public override float GetValue(float x, float y, float z) 34 | { 35 | return Mathf.Min(m_A.GetValue(x, y, z), m_B.GetValue(x, y, z)); 36 | } 37 | 38 | #endregion 39 | } 40 | } -------------------------------------------------------------------------------- /Assets/IslandGenerator/Dep/CoherentNoise/.svn/pristine/30/306e804cc16d6c95b718a603c184636e9a940940.svn-base: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | 4 | namespace CoherentNoise.Generation.Patterns 5 | { 6 | /// 7 | /// Generates concentric cylinders centered in (0,0,0) and parallel to Z axis. Resulting "noise" has value -1 in the center, 1 at radius, -1 at 2*radius etc. 8 | /// 9 | public class Cylinders : Function 10 | { 11 | /// 12 | /// Create new cylinders pattern 13 | /// 14 | ///radius 15 | ///When radius <=0 16 | public Cylinders(float radius) 17 | : base((x, y, z) => 18 | { 19 | var d = new Vector2(x, y).magnitude; 20 | return Helpers.Saw(d / radius); 21 | }) 22 | { 23 | if (radius <= 0) 24 | throw new ArgumentException("Radius must be > 0"); 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /Assets/IslandGenerator/Dep/CoherentNoise/.svn/pristine/35/35dd4d968eacefe6be0cdd2ac4478b77fd60f274.svn-base: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace CoherentNoise.Generation.Modification 4 | { 5 | /// 6 | /// This generator binarizes its source noise, returning only value 0 and 1. A constant treshold value is user for binarization. I.e. result will be 0 where source value is less than treshold, 7 | /// and 1 elsewhere. 8 | /// 9 | public class Binarize:Generator 10 | { 11 | private readonly Generator m_Source; 12 | private readonly float m_Treshold; 13 | 14 | /// 15 | /// Create new binarize generator 16 | /// 17 | ///Source generator 18 | ///Treshold value 19 | public Binarize(Generator source, float treshold) 20 | { 21 | m_Source = source; 22 | m_Treshold = treshold; 23 | } 24 | 25 | #region Overrides of Noise 26 | 27 | /// 28 | /// Returns noise value at given point. 29 | /// 30 | /// X coordinate 31 | /// Y coordinate 32 | /// Z coordinateNoise value 33 | public override float GetValue(float x, float y, float z) 34 | { 35 | return m_Source.GetValue(x, y, z) > m_Treshold ? 1 : 0; 36 | } 37 | 38 | #endregion 39 | } 40 | } -------------------------------------------------------------------------------- /Assets/IslandGenerator/Dep/CoherentNoise/.svn/pristine/41/41d956383f1cf3b8ab5058a4488aee5e6a57c169.svn-base: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | 4 | namespace CoherentNoise.Generation.Fractal 5 | { 6 | /// 7 | /// This generator adds samples with weight decreasing with frequency, like Perlin noise; however, each signal is taken as absolute value, and weighted by previous (i.e. lower-frequency) signal, 8 | /// creating a sort of feedback loop. Resulting noise has sharp ridges, somewhat resembling cliffs. This is useful for terrain generation. 9 | /// 10 | public class RidgeNoise : FractalNoiseBase 11 | { 12 | private float m_Exponent; 13 | private float[] m_SpectralWeights; 14 | private float m_Weight; 15 | 16 | /// 17 | /// Create new ridge generator using seed (seed is used to create a source) 18 | /// 19 | ///seed value 20 | public RidgeNoise(int seed) 21 | : base(seed) 22 | { 23 | Offset = 1; 24 | Gain = 2; 25 | Exponent = 1; 26 | } 27 | 28 | /// 29 | /// Create new ridge generator with user-supplied source. Usually one would use this with or gradient noise with less dimensions, but 30 | /// some weird effects may be achieved with other generators. 31 | /// 32 | ///noise source 33 | public RidgeNoise(Generator source) 34 | : base(source) 35 | { 36 | Offset = 1; 37 | Gain = 2; 38 | Exponent = 1; 39 | } 40 | 41 | /// 42 | /// Exponent defines how fast weights decrease with frequency. The higher the exponent, the less weight is given to high frequencies. 43 | /// Default value is 1 44 | /// 45 | public float Exponent 46 | { 47 | get { return m_Exponent; } 48 | set 49 | { 50 | m_Exponent = value; 51 | OnParamsChanged(); 52 | } 53 | } 54 | 55 | /// 56 | /// Offset is applied to signal at every step. Default value is 1 57 | /// 58 | public float Offset { get; set; } 59 | 60 | /// 61 | /// Gain is the weight factor for previous-step signal. Higher gain means more feedback and noisier ridges. 62 | /// Default value is 2. 63 | /// 64 | public float Gain { get; set; } 65 | 66 | #region Overrides of FractalNoiseBase 67 | 68 | /// 69 | /// Returns new resulting noise value after source noise is sampled. 70 | /// 71 | /// Octave at which source is sampled (this always starts with 0 72 | /// Sampled value 73 | /// Resulting value from previous step 74 | /// Resulting value adjusted for this sample 75 | protected override float CombineOctave(int curOctave, float signal, float value) 76 | { 77 | if (curOctave == 0) 78 | m_Weight = 1; 79 | // Make the ridges. 80 | signal = Offset - Mathf.Abs(signal); 81 | 82 | // Square the signal to increase the sharpness of the ridges. 83 | signal *= signal; 84 | 85 | // The weighting from the previous octave is applied to the signal. 86 | // Larger values have higher weights, producing sharp points along the 87 | // ridges. 88 | signal *= m_Weight; 89 | 90 | // Weight successive contributions by the previous signal. 91 | m_Weight = signal * Gain; 92 | if (m_Weight > 1) 93 | { 94 | m_Weight = 1; 95 | } 96 | if (m_Weight < 0) 97 | { 98 | m_Weight = 0; 99 | } 100 | 101 | // Add the signal to the output value. 102 | return value + (signal * m_SpectralWeights[curOctave]); 103 | } 104 | 105 | /// 106 | /// This method is called whenever any generator's parameter is changed (i.e. Lacunarity, Frequency or OctaveCount). Override it to precalculate any values used in generation. 107 | /// 108 | protected override void OnParamsChanged() 109 | { 110 | PrecalculateWeights(); 111 | } 112 | 113 | #endregion 114 | 115 | private void PrecalculateWeights() 116 | { 117 | float frequency = 1; 118 | m_SpectralWeights = new float[OctaveCount]; 119 | for (int ii = 0; ii < OctaveCount; ii++) 120 | { 121 | // Compute weight for each frequency. 122 | m_SpectralWeights[ii] = Mathf.Pow(frequency, -Exponent); 123 | frequency *= Lacunarity; 124 | } 125 | } 126 | 127 | } 128 | } -------------------------------------------------------------------------------- /Assets/IslandGenerator/Dep/CoherentNoise/.svn/pristine/43/431f49a31d39a1bf443343ff537ac46b4c9b0077.svn-base: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace CoherentNoise.Generation 4 | { 5 | /// 6 | /// This generator creates "noise" that is actually a function of coordinates. Use it to create regular patterns that are then perturbed by noise 7 | /// 8 | public class Function: Generator 9 | { 10 | private readonly Func m_Func; 11 | 12 | /// 13 | /// Create new function generator 14 | /// 15 | /// Value function 16 | public Function(Func func) 17 | { 18 | m_Func = func; 19 | } 20 | 21 | #region Overrides of Noise 22 | 23 | /// 24 | /// Returns noise value at given point. 25 | /// 26 | /// X coordinate 27 | /// Y coordinate 28 | /// Z coordinateNoise value 29 | public override float GetValue(float x, float y, float z) 30 | { 31 | return m_Func(x, y, z); 32 | } 33 | 34 | #endregion 35 | } 36 | } -------------------------------------------------------------------------------- /Assets/IslandGenerator/Dep/CoherentNoise/.svn/pristine/43/43a30b12dc4d71013959b9024973f1bf72522814.svn-base: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | 4 | namespace CoherentNoise.Generation.Displacement 5 | { 6 | /// 7 | /// This generator translates its source by given vector. 8 | /// 9 | public class Translate:Generator 10 | { 11 | private readonly Generator m_Source; 12 | private readonly float m_X; 13 | private readonly float m_Y; 14 | private readonly float m_Z; 15 | 16 | /// 17 | /// Create new translation 18 | /// 19 | ///Source generator 20 | ///Translate value 21 | public Translate(Generator source, Vector3 v):this(source,v.x,v.y,v.z) 22 | { 23 | 24 | } 25 | /// 26 | /// Create new translation 27 | /// 28 | ///Source generator 29 | ///Translate amount along X axis 30 | ///Translate amount along Y axis 31 | ///Translate amount along Z axis 32 | public Translate(Generator source, float x, float y, float z) 33 | { 34 | m_Source = source; 35 | m_Z = z; 36 | m_Y = y; 37 | m_X = x; 38 | } 39 | 40 | #region Overrides of Noise 41 | 42 | /// 43 | /// Returns noise value at given point. 44 | /// 45 | /// X coordinate 46 | /// Y coordinate 47 | /// Z coordinateNoise value 48 | public override float GetValue(float x, float y, float z) 49 | { 50 | return m_Source.GetValue(x + m_X, y + m_Y, z + m_Z); 51 | } 52 | 53 | #endregion 54 | } 55 | } -------------------------------------------------------------------------------- /Assets/IslandGenerator/Dep/CoherentNoise/.svn/pristine/4a/4a0af022cf44eeb55a1177db4239228d50607dda.svn-base: -------------------------------------------------------------------------------- 1 | namespace CoherentNoise.Generation.Voronoi 2 | { 3 | /// 4 | /// This generator creates a "valleys" Voronoi diargam, that returns difference between two closest distances. Resulting noise has highest value at control points and 0 away from control points. 5 | /// 6 | public class VoronoiValleys:VoronoiDiagramBase 7 | { 8 | /// 9 | /// Create new Voronoi diagram using seed. Control points will be obtained using random displacment seeded by supplied value 10 | /// 11 | /// Seed value 12 | public VoronoiValleys(int seed) : base(seed) 13 | { 14 | } 15 | 16 | #region Overrides of VoronoiDiagramBase 17 | 18 | /// 19 | /// Override this method to calculate final value using distances to closest control points. 20 | /// Note that distances that get passed to this function are adjusted for frequency (i.e. distances are scaled so that 21 | /// control points are in unit sized cubes) 22 | /// 23 | /// Distance to closest point 24 | /// Distance to second-closest point 25 | /// Distance to third-closest point 26 | /// 27 | protected override float GetResult(float min1, float min2, float min3) 28 | { 29 | return min2-min1; 30 | } 31 | 32 | #endregion 33 | } 34 | } -------------------------------------------------------------------------------- /Assets/IslandGenerator/Dep/CoherentNoise/.svn/pristine/5b/5b62c5da730861d7879d36bf012dbe99db18d982.svn-base: -------------------------------------------------------------------------------- 1 | namespace CoherentNoise.Generation.Combination 2 | { 3 | /// 4 | /// Generator that multiplies two noise values 5 | /// 6 | public class Multiply: Generator 7 | { 8 | private readonly Generator m_A; 9 | private readonly Generator m_B; 10 | 11 | /// 12 | /// Create new generator 13 | /// 14 | ///First generator to multiply 15 | ///Second generator to multiply 16 | public Multiply(Generator a, Generator b) 17 | { 18 | m_A = a; 19 | m_B = b; 20 | } 21 | 22 | #region Implementation of Noise 23 | 24 | /// 25 | /// Returns noise value at given point. 26 | /// 27 | /// X coordinate 28 | /// Y coordinate 29 | /// Z coordinate 30 | /// Noise value 31 | public override float GetValue(float x, float y, float z) 32 | { 33 | return m_A.GetValue(x, y, z) * m_B.GetValue(x, y, z); 34 | } 35 | 36 | #endregion 37 | } 38 | } -------------------------------------------------------------------------------- /Assets/IslandGenerator/Dep/CoherentNoise/.svn/pristine/64/646da4e5efdb5fe23f7136f4df4cfbc2cc87aa2d.svn-base: -------------------------------------------------------------------------------- 1 | using CoherentNoise.Generation.Fractal; 2 | using UnityEngine; 3 | 4 | namespace CoherentNoise.Generation.Displacement 5 | { 6 | /// 7 | /// Turbulence is a case of Perturb generator, that uses 3 Perlin noise generators as displacement source. 8 | /// 9 | public class Turbulence : Generator 10 | { 11 | private readonly int m_Seed; 12 | private readonly Generator m_Source; 13 | private Generator m_DisplacementX; 14 | private Generator m_DisplacementY; 15 | private Generator m_DisplacementZ; 16 | private float m_Frequency; 17 | private int m_OctaveCount; 18 | 19 | /// 20 | /// Create new perturb generator 21 | /// 22 | ///Source generator 23 | ///Seed value for perturbation noise 24 | public Turbulence(Generator source, int seed) 25 | { 26 | m_Source = source; 27 | m_Seed = seed; 28 | Power = 1; 29 | Frequency = 1; 30 | OctaveCount = 6; 31 | } 32 | 33 | /// 34 | /// Turbulence power, in other words, amount by which source will be perturbed. 35 | /// 36 | /// Default value is 1. 37 | /// 38 | public float Power { get; set; } 39 | 40 | /// 41 | /// Frequency of perturbation noise. 42 | /// 43 | /// Default value is 1. 44 | /// 45 | public float Frequency 46 | { 47 | get { return m_Frequency; } 48 | set 49 | { 50 | m_Frequency = value; 51 | CreateDisplacementSource(); 52 | } 53 | } 54 | 55 | /// 56 | /// Octave count of perturbation noise 57 | /// 58 | /// Default value is 6 59 | /// 60 | public int OctaveCount 61 | { 62 | get { return m_OctaveCount; } 63 | set 64 | { 65 | m_OctaveCount = value; 66 | CreateDisplacementSource(); 67 | } 68 | } 69 | 70 | #region Overrides of Noise 71 | 72 | /// 73 | /// Returns noise value at given point. 74 | /// 75 | /// X coordinate 76 | /// Y coordinate 77 | /// Z coordinateNoise value 78 | public override float GetValue(float x, float y, float z) 79 | { 80 | Vector3 displacement = new Vector3(m_DisplacementX.GetValue(x, y, z),m_DisplacementY.GetValue(x,y,z),m_DisplacementZ.GetValue(x,y,z))*Power; 81 | return m_Source.GetValue(x + displacement.x, y + displacement.y, z + displacement.z); 82 | } 83 | 84 | #endregion 85 | 86 | private void CreateDisplacementSource() 87 | { 88 | m_DisplacementX = new PinkNoise(m_Seed) {Frequency = Frequency, OctaveCount = OctaveCount}; 89 | m_DisplacementY = new PinkNoise(m_Seed + 1) {Frequency = Frequency, OctaveCount = OctaveCount}; 90 | m_DisplacementZ = new PinkNoise(m_Seed + 2) {Frequency = Frequency, OctaveCount = OctaveCount}; 91 | } 92 | } 93 | } -------------------------------------------------------------------------------- /Assets/IslandGenerator/Dep/CoherentNoise/.svn/pristine/64/64896615f4c26d257173e39e7d6f15c0e57b218b.svn-base: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace CoherentNoise.Interpolation 4 | { 5 | internal class CubicSCurve: SCurve 6 | { 7 | #region Overrides of Interpolator 8 | 9 | public override float Interpolate(float t) 10 | { 11 | return t*t*(3f - 2f*t); 12 | } 13 | 14 | #endregion 15 | } 16 | } -------------------------------------------------------------------------------- /Assets/IslandGenerator/Dep/CoherentNoise/.svn/pristine/67/67c5e9cd8f35c4834720abaeff76cb50c273a76b.svn-base: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace CoherentNoise.Generation.Combination 4 | { 5 | /// 6 | /// This generator returns maximum value of its two source generators 7 | /// 8 | public class Max:Generator 9 | { 10 | private readonly Generator m_A; 11 | private readonly Generator m_B; 12 | 13 | /// 14 | /// Create new generator 15 | /// 16 | ///First generator 17 | ///Second generator 18 | public Max(Generator a, Generator b) 19 | { 20 | m_A = a; 21 | m_B = b; 22 | } 23 | 24 | #region Implementation of Noise 25 | 26 | /// 27 | /// Returns noise value at given point. 28 | /// 29 | /// X coordinate 30 | /// Y coordinate 31 | /// Z coordinate 32 | /// Noise value 33 | public override float GetValue(float x, float y, float z) 34 | { 35 | return Mathf.Max(m_A.GetValue(x, y, z), m_B.GetValue(x, y, z)); 36 | } 37 | 38 | #endregion 39 | } 40 | } -------------------------------------------------------------------------------- /Assets/IslandGenerator/Dep/CoherentNoise/.svn/pristine/67/67d7e690ea2091396c1ba3a3f677b78223748fbb.svn-base: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace CoherentNoise.Generation.Fractal 4 | { 5 | /// 6 | /// Pink noise is a fractal noise that adds together weighted signals sampled at different frequencies, with weight inversely proportional to frequency. . 7 | /// When source noise is , this becomes Perlin noise. 8 | /// 9 | public class PinkNoise:FractalNoiseBase 10 | { 11 | private float m_CurPersistence; 12 | 13 | /// 14 | /// Create new pink noise generator using seed. Seed is used to create a source. 15 | /// 16 | ///seed value 17 | public PinkNoise(int seed) : base(seed) 18 | { 19 | Persistence = 0.5f; 20 | } 21 | 22 | /// 23 | /// Create new pink noise generator with user-supplied source. Usually one would use this with or gradient noise with less dimensions, but 24 | /// some weird effects may be achieved with other generators. 25 | /// 26 | ///noise source 27 | public PinkNoise(Generator source) : base(source) 28 | { 29 | Persistence = 0.5f; 30 | } 31 | 32 | #region Overrides of FractalNoiseBase 33 | 34 | /// 35 | /// Returns new resulting noise value after source noise is sampled. Perlin generator adds signal, multiplied by current persistence value. Persistence value 36 | /// is then decreased, so that higher frequencies will have less impact on resulting value. 37 | /// 38 | /// Octave at which source is sampled (this always starts with 0) 39 | /// Sampled value 40 | /// Resulting value from previous step 41 | /// Resulting value adjusted for this sample 42 | protected override float CombineOctave(int curOctave, float signal, float value) 43 | { 44 | if (curOctave == 0) 45 | m_CurPersistence = 1; 46 | value = value + signal*m_CurPersistence; 47 | m_CurPersistence *= Persistence; 48 | return value; 49 | } 50 | 51 | #endregion 52 | 53 | /// 54 | /// Persistence value determines how fast signal diminishes with frequency. i-th octave sugnal will be multiplied by presistence to the i-th power. 55 | /// Note that persistence values >1 are possible, but will not produce interesting noise (lower frequencies will just drown out) 56 | /// 57 | /// Default value is 0.5 58 | /// 59 | public float Persistence { get; set; } 60 | } 61 | } -------------------------------------------------------------------------------- /Assets/IslandGenerator/Dep/CoherentNoise/.svn/pristine/6e/6e63b415439ec701b36b10220f9ce8917332be78.svn-base: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace CoherentNoise.Generation.Voronoi 4 | { 5 | /// 6 | /// This generator creates a "pits" Voronoi diargam, that simply returns distance to closest control point. Resulting noise has value 0 at control points (forming pits) and higher values away from control points. 7 | /// 8 | public class VoronoiPits2D : VoronoiDiagramBase2D 9 | { 10 | /// 11 | /// Create new Voronoi diagram using seed. Control points will be obtained using random displacment seeded by supplied value 12 | /// 13 | /// Seed value 14 | public VoronoiPits2D(int seed) 15 | : base(seed) 16 | { 17 | } 18 | 19 | #region Overrides of VoronoiDiagramBase 20 | 21 | /// 22 | /// Override this method to calculate final value using distances to closest control points. 23 | /// Note that distances that get passed to this function are adjusted for frequency (i.e. distances are scaled so that 24 | /// control points are in unit sized cubes) 25 | /// 26 | /// Distance to closest point 27 | /// Distance to second-closest point 28 | /// Distance to third-closest point 29 | /// 30 | protected override float GetResult(float min1, float min2, float min3) 31 | { 32 | return min1; 33 | } 34 | 35 | #endregion 36 | } 37 | } -------------------------------------------------------------------------------- /Assets/IslandGenerator/Dep/CoherentNoise/.svn/pristine/6f/6fe8a766ee480dabf22e259d8f06e9e5e5ec6305.svn-base: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("CoherentNoise")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("Microsoft")] 12 | [assembly: AssemblyProduct("CoherentNoise")] 13 | [assembly: AssemblyCopyright("Copyright © Microsoft 2011")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("e1ba1acb-0319-4db7-bede-421a88bf243f")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /Assets/IslandGenerator/Dep/CoherentNoise/.svn/pristine/73/730a5dc9f5bb3d3bad00099ac2310f6916728e36.svn-base: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace CoherentNoise.Generation.Modification 4 | { 5 | /// 6 | /// This generator takes a source generator and applies a function to its output. 7 | /// 8 | public class Modify: Generator 9 | { 10 | private Func m_Modifier; 11 | private Generator m_Source; 12 | 13 | /// 14 | /// Create new generator 15 | /// 16 | ///Source generator 17 | ///Modifier function to apply 18 | public Modify(Generator source, Func modifier) 19 | { 20 | m_Source = source; 21 | m_Modifier = modifier; 22 | } 23 | 24 | #region Overrides of Noise 25 | 26 | /// 27 | /// Returns noise value at given point. 28 | /// 29 | /// X coordinate 30 | /// Y coordinate 31 | /// Z coordinateNoise value 32 | public override float GetValue(float x, float y, float z) 33 | { 34 | return m_Modifier(m_Source.GetValue(x, y, z)); 35 | } 36 | 37 | #endregion 38 | } 39 | } -------------------------------------------------------------------------------- /Assets/IslandGenerator/Dep/CoherentNoise/.svn/pristine/73/7362e930abf0c56287942df0075d4f8bfd927fa7.svn-base: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace CoherentNoise 4 | { 5 | internal class LatticeNoise 6 | { 7 | private int m_Seed; 8 | 9 | internal LatticeNoise(int seed) 10 | { 11 | m_Seed = seed; 12 | } 13 | 14 | /// 15 | /// Lattice period. Used for periodic (seamless) generators. 16 | /// Noise is non-periodic if Period <= 0 17 | /// 18 | internal int Period { get; set; } 19 | 20 | /// 21 | /// Noise value at integer coordinates. Used as a source for interpolated coherent noise 22 | /// 23 | /// 24 | /// 25 | /// 26 | /// 27 | internal float GetValue(int x, int y, int z) 28 | { 29 | if (Period > 0) 30 | { 31 | // make periodic lattice. Repeat every Period cells 32 | x = x % Period; if (x < 0) x += Period; 33 | y = y % Period; if (y < 0) y += Period; 34 | z = z % Period; if (z < 0) z += Period; 35 | } 36 | // All constants are primes and must remain prime in order for this noise 37 | // function to work correctly. 38 | // These constant values are lifted directly from libnoise 39 | int n = ( 40 | Constants.MultiplierX * x 41 | + Constants.MultiplierY * y 42 | + Constants.MultiplierZ * z 43 | + Constants.MultiplierSeed * m_Seed) 44 | & 0x7fffffff; 45 | n = (n >> 13) ^ n; 46 | n = (n * (n * n * 60493 + 19990303) + 1376312589) & 0x7fffffff; 47 | return 1 - (n / 1073741824f); // normalize for [-1,1] 48 | } 49 | } 50 | } -------------------------------------------------------------------------------- /Assets/IslandGenerator/Dep/CoherentNoise/.svn/pristine/75/75d9f59ba222f8a9ec2eb63438b640a860ec1c47.svn-base: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace CoherentNoise.Generation.Displacement 4 | { 5 | /// 6 | /// This generator scales its source by given vector. 7 | /// 8 | public class Scale : Generator 9 | { 10 | private readonly Generator m_Source; 11 | private readonly float m_X; 12 | private readonly float m_Y; 13 | private readonly float m_Z; 14 | 15 | /// 16 | /// Create new scaling 17 | /// 18 | ///Source generator 19 | ///Scale value 20 | public Scale(Generator source, Vector3 v) 21 | : this(source, v.x, v.y, v.z) 22 | { 23 | 24 | } 25 | /// 26 | /// Create new scaling 27 | /// 28 | ///Source generator 29 | ///Scale amount along X axis 30 | ///Scale amount along Y axis 31 | ///Scale amount along Z axis 32 | public Scale(Generator source, float x, float y, float z) 33 | { 34 | m_Source = source; 35 | m_Z = z; 36 | m_Y = y; 37 | m_X = x; 38 | } 39 | 40 | #region Overrides of Noise 41 | 42 | /// 43 | /// Returns noise value at given point. 44 | /// 45 | /// X coordinate 46 | /// Y coordinate 47 | /// Z coordinateNoise value 48 | public override float GetValue(float x, float y, float z) 49 | { 50 | return m_Source.GetValue(x * m_X, y * m_Y, z * m_Z); 51 | } 52 | 53 | #endregion 54 | } 55 | } -------------------------------------------------------------------------------- /Assets/IslandGenerator/Dep/CoherentNoise/.svn/pristine/7a/7aacd5dad95576469cdec8adc8fbedce97f3ff4b.svn-base: -------------------------------------------------------------------------------- 1 | using System; 2 | using CoherentNoise.Generation.Displacement; 3 | using UnityEngine; 4 | 5 | namespace CoherentNoise.Generation.Voronoi 6 | { 7 | /// 8 | /// Voronoi cell diagram uses a set of control points to partition space into cells. Each point in space belongs to a cell that corresponds to closest control point. 9 | /// This generator distributes control pointsby randomly displacing points with integer coordinates. Thus, every unit-sized cube will have a single control point in it, 10 | /// randomly placed. A user-supplied function is then used to obtain cell value for a given point. 11 | /// 12 | /// 2D version is faster, but ignores Z coordinate. 13 | /// 14 | public class VoronoiCells2D : Generator 15 | { 16 | private readonly Func m_CellValueSource; 17 | private readonly LatticeNoise[] m_ControlPointSource; 18 | 19 | /// 20 | /// Create new Voronoi diagram using seed. Control points will be obtained using random displacment seeded by supplied value 21 | /// 22 | /// Seed value 23 | /// Function that returns cell's value 24 | public VoronoiCells2D(int seed, Func cellValueSource) 25 | { 26 | Frequency = 1; 27 | m_ControlPointSource = new[] 28 | { 29 | new LatticeNoise(seed), new LatticeNoise(seed + 1), 30 | }; 31 | m_CellValueSource = cellValueSource; 32 | } 33 | 34 | /// 35 | /// Noise period. Used for repeating (seamless) noise. 36 | /// When Period >0 resulting noise pattern repeats exactly every Period, for all coordinates. 37 | /// 38 | public int Period 39 | { 40 | get; 41 | set; 42 | } 43 | 44 | #region Overrides of Noise 45 | 46 | /// 47 | /// Returns noise value at given point. 48 | /// 49 | /// X coordinate 50 | /// Y coordinate 51 | /// Z coordinateNoise value 52 | public override float GetValue(float x, float y, float z) 53 | { 54 | if (Period > 0) 55 | { 56 | // make periodic lattice. Repeat every Period cells 57 | x = x % Period; if (x < 0) x += Period; 58 | y = y % Period; if (y < 0) y += Period; 59 | } 60 | 61 | x *= Frequency; 62 | y *= Frequency; 63 | float min = float.MaxValue; 64 | int ix = 0, iy = 0; 65 | 66 | int xc = Mathf.FloorToInt(x); 67 | int yc = Mathf.FloorToInt(y); 68 | 69 | var v = new Vector2(x, y); 70 | 71 | for (int ii = xc - 1; ii < xc + 2; ii++) 72 | { 73 | for (int jj = yc - 1; jj < yc + 2; jj++) 74 | { 75 | Vector2 displacement = new Vector2( 76 | m_ControlPointSource[0].GetValue(ii, jj, 0) * 0.5f + 0.5f, 77 | m_ControlPointSource[1].GetValue(ii, jj, 0) * 0.5f + 0.5f); 78 | 79 | Vector2 cp = new Vector2(ii, jj) + displacement; 80 | float distance = Vector2.SqrMagnitude(cp - v); 81 | 82 | if (distance < min) 83 | { 84 | min = distance; 85 | ix = ii; 86 | iy = jj; 87 | } 88 | } 89 | } 90 | 91 | return m_CellValueSource(ix, iy); 92 | } 93 | 94 | #endregion; 95 | 96 | /// 97 | /// Frequency of control points. This has the same effect as applying transform to the generator, or placing control points closer together (for high frequency) or further apart (for low frequency) 98 | /// 99 | public float Frequency { get; set; } 100 | } 101 | } -------------------------------------------------------------------------------- /Assets/IslandGenerator/Dep/CoherentNoise/.svn/pristine/7c/7c5c16c9ae122677dd4ead4f9b7890423152e404.svn-base: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace CoherentNoise.Interpolation 4 | { 5 | /// 6 | /// Linear interpolator is the fastest and has the lowest quality, only ensuring continuity of noise values, not their derivatives. 7 | /// 8 | internal class LinearSCurve : SCurve 9 | { 10 | #region Overrides of Interpolator 11 | 12 | public override float Interpolate(float t) 13 | { 14 | return t; 15 | } 16 | 17 | #endregion 18 | } 19 | } -------------------------------------------------------------------------------- /Assets/IslandGenerator/Dep/CoherentNoise/.svn/pristine/7f/7f58b9534d7f9be0a568517e0f58abb06acdcb3d.svn-base: -------------------------------------------------------------------------------- 1 | namespace CoherentNoise.Generation.Voronoi 2 | { 3 | /// 4 | /// This generator creates a "valleys" Voronoi diargam, that returns difference between two closest distances. Resulting noise has highest value at control points and 0 away from control points. 5 | /// 6 | public class VoronoiValleys2D : VoronoiDiagramBase2D 7 | { 8 | 9 | /// 10 | /// Create new Voronoi diagram using seed. Control points will be obtained using random displacment seeded by supplied value 11 | /// 12 | /// Seed value 13 | public VoronoiValleys2D(int seed) 14 | : base(seed) 15 | { 16 | } 17 | 18 | #region Overrides of VoronoiDiagramBase 19 | 20 | /// 21 | /// Override this method to calculate final value using distances to closest control points. 22 | /// Note that distances that get passed to this function are adjusted for frequency (i.e. distances are scaled so that 23 | /// control points are in unit sized cubes) 24 | /// 25 | /// Distance to closest point 26 | /// Distance to second-closest point 27 | /// Distance to third-closest point 28 | /// 29 | protected override float GetResult(float min1, float min2, float min3) 30 | { 31 | return min2 - min1; 32 | } 33 | 34 | #endregion 35 | } 36 | } -------------------------------------------------------------------------------- /Assets/IslandGenerator/Dep/CoherentNoise/.svn/pristine/8b/8b38f96416f1a9af247f564bbd19a384851ed059.svn-base: -------------------------------------------------------------------------------- 1 | namespace CoherentNoise 2 | { 3 | internal class Constants 4 | { 5 | public const int MultiplierX = 1619; 6 | public const int MultiplierY = 31337; 7 | public const int MultiplierZ = 6971; 8 | public const int MultiplierSeed = 1013; 9 | public const int ValueShift = 8; 10 | } 11 | } -------------------------------------------------------------------------------- /Assets/IslandGenerator/Dep/CoherentNoise/.svn/pristine/8d/8ddeeb1a62c47577b5d3e0636b55d394ff4d8ed6.svn-base: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | 4 | namespace CoherentNoise.Generation.Patterns 5 | { 6 | /// 7 | /// Generates concentric spheres centered in (0,0,0). Resulting "noise" has value -1 in the center, 1 at radius, -1 at 2*radius etc. 8 | /// 9 | public class Spheres: Function 10 | { 11 | /// 12 | /// Create new spheres pattern 13 | /// 14 | ///radius 15 | ///When radius <=0 16 | public Spheres(float radius) 17 | : base((x,y,z)=> 18 | { 19 | var d = new Vector3(x, z, y).magnitude; 20 | return Helpers.Saw(d/radius); 21 | }) 22 | { 23 | if (radius <= 0) 24 | throw new ArgumentException("Radius must be > 0"); 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /Assets/IslandGenerator/Dep/CoherentNoise/.svn/pristine/9a/9a8661db7c2e4aa9ae4b34d61fe8f4341e511a93.svn-base: -------------------------------------------------------------------------------- 1 | namespace CoherentNoise.Generation.Combination 2 | { 3 | /// 4 | /// Generator that adds two noise values together 5 | /// 6 | public class Add: Generator 7 | { 8 | private readonly Generator m_A; 9 | private readonly Generator m_B; 10 | 11 | /// 12 | /// Create new generator 13 | /// 14 | ///First generator to add 15 | ///Second generator to add 16 | public Add(Generator a, Generator b) 17 | { 18 | m_A = a; 19 | m_B = b; 20 | } 21 | 22 | #region Implementation of Noise 23 | 24 | /// 25 | /// Returns noise value at given point. 26 | /// 27 | /// X coordinate 28 | /// Y coordinate 29 | /// Z coordinate 30 | /// Noise value 31 | public override float GetValue(float x, float y, float z) 32 | { 33 | return m_A.GetValue(x, y, z) + m_B.GetValue(x, y, z); 34 | } 35 | 36 | #endregion 37 | } 38 | } -------------------------------------------------------------------------------- /Assets/IslandGenerator/Dep/CoherentNoise/.svn/pristine/9a/9abc32790c7fab483dec7e82e7b77b14171df29d.svn-base: -------------------------------------------------------------------------------- 1 | using System; 2 | using CoherentNoise.Generation.Displacement; 3 | using UnityEngine; 4 | 5 | namespace CoherentNoise.Generation.Voronoi 6 | { 7 | /// 8 | /// Voronoi cell diagram uses a set of control points to partition space into cells. Each point in space belongs to a cell that corresponds to closest control point. 9 | /// This generator distributes control points using a vector noise source, that displaces points with integer coordinates. Thus, every unit-sized cube will have a single control point in it, 10 | /// randomly placed. A user-supplied function is then used to obtain cell value for a given point. 11 | /// 12 | public class VoronoiCells : Generator 13 | { 14 | private readonly Func m_CellValueSource; 15 | private readonly LatticeNoise[] m_ControlPointSource; 16 | 17 | /// 18 | /// Create new Voronoi diagram using seed. Control points will be obtained using random displacment seeded by supplied value 19 | /// 20 | /// Seed value 21 | /// Function that returns cell's value 22 | public VoronoiCells(int seed, Func cellValueSource) 23 | { 24 | Frequency = 1; 25 | m_ControlPointSource = new[] 26 | { 27 | new LatticeNoise(seed), new LatticeNoise(seed + 1), new LatticeNoise(seed + 2), 28 | }; 29 | m_CellValueSource = cellValueSource; 30 | } 31 | 32 | /// 33 | /// Noise period. Used for repeating (seamless) noise. 34 | /// When Period >0 resulting noise pattern repeats exactly every Period, for all coordinates. 35 | /// 36 | public int Period 37 | { 38 | get; 39 | set; 40 | } 41 | 42 | #region Overrides of Noise 43 | 44 | /// 45 | /// Returns noise value at given point. 46 | /// 47 | /// X coordinate 48 | /// Y coordinate 49 | /// Z coordinateNoise value 50 | public override float GetValue(float x, float y, float z) 51 | { 52 | if (Period > 0) 53 | { 54 | // make periodic lattice. Repeat every Period cells 55 | x = x % Period; if (x < 0) x += Period; 56 | y = y % Period; if (y < 0) y += Period; 57 | z = z % Period; if (z < 0) z += Period; 58 | } 59 | 60 | x *= Frequency; 61 | y *= Frequency; 62 | z *= Frequency; 63 | float min = float.MaxValue; 64 | int ix = 0, iy = 0, iz = 0; 65 | 66 | int xc = Mathf.FloorToInt(x); 67 | int yc = Mathf.FloorToInt(y); 68 | int zc = Mathf.FloorToInt(z); 69 | 70 | var v = new Vector3(x, y, z); 71 | 72 | for (int ii = xc - 1; ii < xc + 2; ii++) 73 | { 74 | for (int jj = yc - 1; jj < yc + 2; jj++) 75 | { 76 | for (int kk = zc - 1; kk < zc + 2; kk++) 77 | { 78 | Vector3 displacement = new Vector3( 79 | m_ControlPointSource[0].GetValue(ii, jj, kk) * 0.5f + 0.5f, 80 | m_ControlPointSource[1].GetValue(ii, jj, kk) * 0.5f + 0.5f, 81 | m_ControlPointSource[2].GetValue(ii, jj, kk) * 0.5f + 0.5f); 82 | 83 | Vector3 cp = new Vector3(ii, jj, kk) + displacement; 84 | float distance = Vector3.SqrMagnitude(cp - v); 85 | 86 | if (distance < min) 87 | { 88 | min = distance; 89 | ix = ii; 90 | iy = jj; 91 | iz = kk; 92 | } 93 | } 94 | } 95 | } 96 | 97 | return m_CellValueSource(ix, iy, iz); 98 | } 99 | 100 | #endregion; 101 | 102 | /// 103 | /// Frequency of control points. This has the same effect as applying transform to the generator, or placing control points closer together (for high frequency) or further apart (for low frequency) 104 | /// 105 | public float Frequency { get; set; } 106 | } 107 | } -------------------------------------------------------------------------------- /Assets/IslandGenerator/Dep/CoherentNoise/.svn/pristine/a0/a06b20f90d55fdc7f2c36284a1b9067ee0b6acd1.svn-base: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace CoherentNoise.Generation.Modification 4 | { 5 | /// 6 | /// This generator is used to "sharpen" noise, shifting extreme values closer to -1 and 1, while leaving 0 in place. Source noise is 7 | /// clamped to [-1,1], as values outside of this range may result in division by 0. Resulting noise is between -1 and 1, with values that 8 | /// were equal to 0.5 shifted to 0.5+gain/2, and those that were equal to -0.5 shifted to -0.5-gain/2. 9 | /// 10 | public class Gain: Generator 11 | { 12 | private readonly float m_Gain; 13 | private readonly Generator m_Source; 14 | 15 | /// 16 | /// Create new generator 17 | /// 18 | ///Source generator 19 | ///Gain value 20 | public Gain(Generator source, float gain) 21 | { 22 | if (m_Gain <= -1 || m_Gain >= 1) 23 | throw new ArgumentException("Gain must be between -1 and 1"); 24 | 25 | m_Source = source; 26 | m_Gain = gain; 27 | } 28 | 29 | #region Overrides of Noise 30 | 31 | /// 32 | /// Returns noise value at given point. 33 | /// 34 | /// X coordinate 35 | /// Y coordinate 36 | /// Z coordinateNoise value 37 | public override float GetValue(float x, float y, float z) 38 | { 39 | var f = m_Source.GetValue(x, y, z); 40 | if (f >= 0) 41 | return BiasFunc(f); 42 | else 43 | return -BiasFunc(-f); 44 | } 45 | 46 | #endregion 47 | 48 | private float BiasFunc(float f) 49 | { 50 | // clamp f to [0,1] so that we don't ever get a division by 0 error 51 | if (f < 0) 52 | f = 0; 53 | if (f > 1) 54 | f = 1; 55 | // Bias curve that makes a "half" of gain 56 | return f * (1.0f + m_Gain) / (1.0f + m_Gain - (1.0f - f) * 2.0f * m_Gain); 57 | } 58 | } 59 | } -------------------------------------------------------------------------------- /Assets/IslandGenerator/Dep/CoherentNoise/.svn/pristine/a0/a0e2d90808c3871023dd5c8bd51ea717a0c53e1b.svn-base: -------------------------------------------------------------------------------- 1 | using CoherentNoise.Generation; 2 | using CoherentNoise.Generation.Combination; 3 | using UnityEngine; 4 | 5 | namespace CoherentNoise 6 | { 7 | /// 8 | /// A noise generator. 9 | /// 10 | public abstract class Generator 11 | { 12 | /// 13 | /// Returns noise value at given point. 14 | /// 15 | /// X coordinate 16 | /// Y coordinate 17 | /// Z coordinateNoise value 18 | public abstract float GetValue(float x, float y, float z); 19 | 20 | /// 21 | /// Returns noise value at given point. 22 | /// 23 | /// Point coordinates 24 | public float GetValue(Vector3 v) 25 | { 26 | return GetValue(v.x, v.y, v.z); 27 | } 28 | 29 | /// 30 | /// Overloaded + 31 | /// Returns new generator that sums these two 32 | /// 33 | /// 34 | /// 35 | /// 36 | public static Generator operator +(Generator g1, Generator g2) 37 | { 38 | return new Function((x, y, z) => g1.GetValue(x, y, z) + g2.GetValue(x, y, z)); 39 | } 40 | /// 41 | /// Overloaded + 42 | /// Returns new generator that adds a constant value 43 | /// 44 | /// 45 | /// 46 | /// 47 | public static Generator operator +(Generator g1, float f) 48 | { 49 | return new Function((x, y, z) => g1.GetValue(x, y, z) + f); 50 | } 51 | /// 52 | /// Overloaded unary - 53 | /// Returns inverse of argument generator 54 | /// 55 | /// 56 | /// 57 | public static Generator operator -(Generator g1) 58 | { 59 | return -1 * g1; 60 | } 61 | /// 62 | /// Overloaded - 63 | /// Returns new generator that subtracts second argument from first 64 | /// 65 | /// 66 | /// 67 | /// 68 | public static Generator operator -(Generator g1, Generator g2) 69 | { 70 | return new Function((x, y, z) => g1.GetValue(x, y, z) - g2.GetValue(x, y, z)); ; 71 | } 72 | /// 73 | /// Overloaded - 74 | /// Returns new generator that subtracts a constant value 75 | /// 76 | /// 77 | /// 78 | /// 79 | public static Generator operator -(Generator g1, float f) 80 | { 81 | return new Function((x, y, z) => g1.GetValue(x, y, z) - f); 82 | } 83 | /// 84 | /// Overloaded - 85 | /// Returns new generator that subtracts generator from a constant value 86 | /// 87 | /// 88 | /// 89 | /// 90 | public static Generator operator -(float f, Generator g1) 91 | { 92 | return new Function((x, y, z) => f - g1.GetValue(x, y, z)); 93 | } 94 | /// 95 | /// Overloaded * 96 | /// Returns new generator that multiplies these two 97 | /// 98 | /// 99 | /// 100 | /// 101 | public static Generator operator *(Generator g1, Generator g2) 102 | { 103 | return new Function((x, y, z) => g1.GetValue(x, y, z) * g2.GetValue(x, y, z)); ; 104 | } 105 | /// 106 | /// Overloaded * 107 | /// Returns new generator that multiplies noise by a constant value 108 | /// 109 | /// 110 | /// 111 | /// 112 | public static Generator operator *(Generator g1, float f) 113 | { 114 | return new Function((x, y, z) => g1.GetValue(x, y, z) * f); 115 | } 116 | /// 117 | /// Overloaded / 118 | /// Returns new generator that divides values of argument generators. Beware of zeroes! 119 | /// 120 | /// 121 | /// 122 | /// 123 | public static Generator operator /(Generator g1, Generator g2) 124 | { 125 | return new Function((x, y, z) => g1.GetValue(x, y, z) / g2.GetValue(x, y, z)); 126 | } 127 | /// 128 | /// Overloaded / 129 | /// Returns new generator that divides noise by a constant value 130 | /// 131 | /// 132 | /// 133 | /// 134 | public static Generator operator /(Generator g1, float f) 135 | { 136 | return new Function((x, y, z) => g1.GetValue(x, y, z) / f); 137 | } 138 | /// 139 | /// Overloaded / 140 | /// Returns new generator that divides constant value by noise values 141 | /// 142 | /// 143 | /// 144 | /// 145 | public static Generator operator /(float f, Generator g1) 146 | { 147 | return new Function((x, y, z) => f / g1.GetValue(x, y, z)); 148 | } 149 | 150 | /// 151 | /// Conversion operator. Float values may be implicitly converted to a generator that return this value 152 | /// 153 | /// 154 | /// 155 | public static implicit operator Generator(float f) 156 | { 157 | return new Constant(f); 158 | } 159 | } 160 | } -------------------------------------------------------------------------------- /Assets/IslandGenerator/Dep/CoherentNoise/.svn/pristine/aa/aa144d381fa5b58e844b59d796327992e1a064ef.svn-base: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | 4 | namespace CoherentNoise.Generation.Patterns 5 | { 6 | /// 7 | /// Generates planes parallel to YZ plane. Resulting "noise" has value -1 on YZ plane, 1 at step distance, -1 at 2*step etc. 8 | /// 9 | public class Planes : Function 10 | { 11 | /// 12 | /// Create new planes pattern 13 | /// 14 | ///step 15 | ///When step <=0 16 | public Planes(float step) 17 | : base((x, y, z) => Helpers.Saw(x / step)) 18 | { 19 | if (step <= 0) 20 | throw new ArgumentException("Step must be > 0"); 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /Assets/IslandGenerator/Dep/CoherentNoise/.svn/pristine/b2/b2795b48d81ee7f54a644edc2915ba96dadaa8d3.svn-base: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | 4 | namespace CoherentNoise.Generation.Fractal 5 | { 6 | /// 7 | /// A variation of Perlin noise, this generator creates billowy shapes useful for cloud generation. It uses the same formula as Perlin noise, but adds 8 | /// absolute values of signal 9 | /// 10 | public class BillowNoise : FractalNoiseBase 11 | { 12 | private float m_CurPersistence; 13 | 14 | /// 15 | /// Create new billow generator using seed (seed is used to create a source) 16 | /// 17 | ///seed value 18 | public BillowNoise(int seed) 19 | : base(seed) 20 | { 21 | Persistence = 0.5f; 22 | } 23 | /// 24 | /// Create new billow generator with user-supplied source. Usually one would use this with or gradient noise with less dimensions, but 25 | /// some weird effects may be achieved with other generators. 26 | /// 27 | ///noise source 28 | public BillowNoise(Generator source) 29 | : base(source) 30 | { 31 | Persistence = 0.5f; 32 | } 33 | 34 | #region Overrides of FractalNoiseBase 35 | 36 | /// 37 | /// Returns new resulting noise value after source noise is sampled. 38 | /// 39 | /// Octave at which source is sampled (this always starts with 0 40 | /// Sampled value 41 | /// Resulting value from previous step 42 | /// Resulting value adjusted for this sample 43 | protected override float CombineOctave(int curOctave, float signal, float value) 44 | { 45 | if (curOctave == 0) 46 | m_CurPersistence = 1; 47 | value = value + (2 * Mathf.Abs(signal) - 1) * m_CurPersistence; 48 | m_CurPersistence *= Persistence; 49 | return value; 50 | } 51 | 52 | #endregion 53 | 54 | /// 55 | /// Persistence value determines how fast signal diminishes with frequency. i-th octave signal will be multiplied by presistence to the i-th power. 56 | /// Note that persistence values >1 are possible, but will not produce interesting noise (lower frequencies will just drown out) 57 | /// 58 | /// Default value is 0.5 59 | /// 60 | public float Persistence { get; set; } 61 | } 62 | } -------------------------------------------------------------------------------- /Assets/IslandGenerator/Dep/CoherentNoise/.svn/pristine/b9/b964d5695d2937c31e2f50097fa61ac8f830675f.svn-base: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | 4 | namespace CoherentNoise.Generation.Patterns 5 | { 6 | /// 7 | /// This generator does the opposite of texture generation. It takes a texture and returns its red channel as a noise value. 8 | /// Use it to incorporate hand-created patterns in your generation. 9 | /// 10 | public class TexturePattern : Generator 11 | { 12 | private readonly Color[] m_Colors; 13 | private readonly int m_Width; 14 | private readonly int m_Height; 15 | private readonly TextureWrapMode m_WrapMode; 16 | 17 | /// 18 | /// Create new texture generator 19 | /// 20 | ///Texture to use. It must be readable. The texture is read in constructor, so any later changes to it will not affect this generator 21 | ///Wrapping mode 22 | public TexturePattern(Texture2D texture, TextureWrapMode wrapMode) 23 | { 24 | m_Colors = texture.GetPixels(); 25 | m_Width = texture.width; 26 | m_Height = texture.height; 27 | 28 | m_WrapMode = wrapMode; 29 | } 30 | 31 | #region Overrides of Noise 32 | 33 | /// 34 | /// Returns noise value at given point. 35 | /// 36 | /// X coordinate 37 | /// Y coordinate 38 | /// Z coordinateNoise value 39 | public override float GetValue(float x, float y, float z) 40 | { 41 | int ix = Mathf.FloorToInt(x * m_Width); 42 | int iy = Mathf.FloorToInt(y * m_Height); 43 | ix = Wrap(ix, m_Width); 44 | iy = Wrap(iy, m_Height); 45 | var c = m_Colors[iy*m_Width + ix]; 46 | return c.r*2 - 1; 47 | } 48 | 49 | private int Wrap(int i, int size) 50 | { 51 | switch (m_WrapMode) 52 | { 53 | case TextureWrapMode.Repeat: 54 | return i >= 0 ? i%size : (i%size+size); 55 | case TextureWrapMode.Clamp: 56 | return i < 0 ? 0 : i > size ? size - 1 : i; 57 | default: 58 | throw new ArgumentOutOfRangeException(); 59 | } 60 | } 61 | 62 | #endregion 63 | } 64 | } -------------------------------------------------------------------------------- /Assets/IslandGenerator/Dep/CoherentNoise/.svn/pristine/bb/bb551e81df39115b1b9517c02bb36ced506391f3.svn-base: -------------------------------------------------------------------------------- 1 | 2 | namespace CoherentNoise.Generation 3 | { 4 | /// 5 | /// This generator returns its source unchanged. However, it caches last returned value, and does not recalculate it if called several times for the same point. 6 | /// This is handy if you use same noise generator in different places. 7 | /// 8 | /// Note that displacement, fractal and Voronoi generators call GetValue at different points for their respective source generators. 9 | /// This wil trash the Cache and negate any performance benefit, so there's no point in using Cache with these generators. 10 | /// 11 | public class Cache: Generator 12 | { 13 | private float m_X; 14 | private float m_Y; 15 | private float m_Z; 16 | private float m_Cached; 17 | private readonly Generator m_Source; 18 | 19 | /// 20 | ///Create new caching generator 21 | /// 22 | ///Source generator 23 | public Cache(Generator source) 24 | { 25 | m_Source = source; 26 | } 27 | 28 | #region Overrides of Noise 29 | 30 | /// 31 | /// Returns noise value at given point. 32 | /// 33 | /// X coordinate 34 | /// Y coordinate 35 | /// Z coordinateNoise value 36 | public override float GetValue(float x, float y, float z) 37 | { 38 | if (x == m_X && y == m_Y && z == m_Z) 39 | { 40 | return m_Cached; 41 | } 42 | else 43 | { 44 | m_X = x; 45 | m_Y = y; 46 | m_Z = z; 47 | return m_Cached = m_Source.GetValue(x, y, z); 48 | } 49 | } 50 | 51 | #endregion 52 | } 53 | } -------------------------------------------------------------------------------- /Assets/IslandGenerator/Dep/CoherentNoise/.svn/pristine/bc/bc3e6d325121bc917d652971f208bb1528ac6684.svn-base: -------------------------------------------------------------------------------- 1 | using CoherentNoise.Generation.Displacement; 2 | using UnityEngine; 3 | 4 | namespace CoherentNoise.Generation.Voronoi 5 | { 6 | /// 7 | /// Base class for 2D Voronoi diagrams generators. Voronoi diagrams use a set of control points, that are somehow distributed, and for every point calculate distances to the closest control points. 8 | /// These distances are then combined to obtain final noise value. 9 | /// This generator distributes control points by randomly displacing points with integer coordinates. Thus, every unit-sized cube will have a single control point in it, 10 | /// randomly placed. 11 | /// 2D version is faster, but ignores Z coordinate. 12 | /// 13 | public abstract class VoronoiDiagramBase2D : Generator 14 | { 15 | private readonly LatticeNoise[] m_ControlPointSource; 16 | 17 | /// 18 | /// Create new Voronoi diagram using seed. Control points will be obtained using random displacment seeded by supplied value 19 | /// 20 | /// Seed value 21 | protected VoronoiDiagramBase2D(int seed) 22 | { 23 | Frequency = 1; 24 | m_ControlPointSource = new[] 25 | { 26 | new LatticeNoise(seed), new LatticeNoise(seed + 1), 27 | }; 28 | } 29 | 30 | /// 31 | /// Noise period. Used for repeating (seamless) noise. 32 | /// When Period >0 resulting noise pattern repeats exactly every Period, for all coordinates. 33 | /// 34 | public int Period 35 | { 36 | get; set; 37 | } 38 | 39 | 40 | #region Overrides of Noise 41 | 42 | /// 43 | /// Returns noise value at given point. 44 | /// 45 | /// X coordinate 46 | /// Y coordinate 47 | /// Z coordinate 48 | /// Noise value 49 | public override float GetValue(float x, float y, float z) 50 | { 51 | if (Period > 0) 52 | { 53 | // make periodic lattice. Repeat every Period cells 54 | x = x % Period; if (x < 0) x += Period; 55 | y = y % Period; if (y < 0) y += Period; 56 | } 57 | 58 | // stretch values to match desired frequency 59 | x *= Frequency; 60 | y *= Frequency; 61 | 62 | float min1 = float.MaxValue, min2 = float.MaxValue, min3 = float.MaxValue; 63 | 64 | int xc = Mathf.FloorToInt(x); 65 | int yc = Mathf.FloorToInt(y); 66 | 67 | var v = new Vector2(x, y); 68 | 69 | for (int ii = xc - 1; ii < xc + 2; ii++) 70 | { 71 | for (int jj = yc - 1; jj < yc + 2; jj++) 72 | { 73 | Vector2 displacement = new Vector2( 74 | m_ControlPointSource[0].GetValue(ii, jj, 0)*0.5f + 0.5f, 75 | m_ControlPointSource[1].GetValue(ii, jj, 0)*0.5f + 0.5f); 76 | 77 | Vector2 cp = new Vector2(ii, jj) + displacement; 78 | float distance = Vector2.SqrMagnitude(cp - v); 79 | 80 | if (distance < min1) 81 | { 82 | min3 = min2; 83 | min2 = min1; 84 | min1 = distance; 85 | } 86 | else if (distance < min2) 87 | { 88 | min3 = min2; 89 | min2 = distance; 90 | } 91 | else if (distance < min3) 92 | { 93 | min3 = distance; 94 | } 95 | } 96 | } 97 | 98 | return GetResult(Mathf.Sqrt(min1), Mathf.Sqrt(min2), Mathf.Sqrt(min3)); 99 | } 100 | 101 | /// 102 | /// Override this method to calculate final value using distances to closest control points. 103 | /// Note that distances that get passed to this function are adjusted for frequency (i.e. distances are scaled so that 104 | /// control points are in unit sized cubes) 105 | /// 106 | /// Distance to closest point 107 | /// Distance to second-closest point 108 | /// Distance to third-closest point 109 | /// 110 | protected abstract float GetResult(float min1, float min2, float min3); 111 | 112 | #endregion 113 | 114 | /// 115 | /// Frequency of control points. This has the same effect as applying transform to the generator, or placing control points closer together (for high frequency) or further apart (for low frequency) 116 | /// 117 | public float Frequency { get; set; } 118 | } 119 | } -------------------------------------------------------------------------------- /Assets/IslandGenerator/Dep/CoherentNoise/.svn/pristine/bc/bc87a2292b69c2bb2fc9fe53763f77a4cabcb3eb.svn-base: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Debug 5 | AnyCPU 6 | 8.0.30703 7 | 2.0 8 | {9564FDC1-37C4-4502-BEF0-766CED27E667} 9 | Library 10 | Properties 11 | CoherentNoise 12 | CoherentNoise 13 | v3.5 14 | 512 15 | 16 | 17 | 18 | true 19 | full 20 | false 21 | bin\Debug\ 22 | DEBUG;TRACE 23 | prompt 24 | 4 25 | true 26 | bin\Debug\CoherentNoise.XML 27 | Off 28 | 29 | 30 | pdbonly 31 | true 32 | bin\Release\ 33 | TRACE 34 | prompt 35 | 4 36 | true 37 | bin\Release\CoherentNoise.XML 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | ..\..\..\..\Program Files (x86)\Unity\Editor\Data\Managed\UnityEngine.dll 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 111 | -------------------------------------------------------------------------------- /Assets/IslandGenerator/Dep/CoherentNoise/.svn/pristine/bc/bce7698d3d05813701a7e14e202b69951b075da3.svn-base: -------------------------------------------------------------------------------- 1 | namespace CoherentNoise.Interpolation 2 | { 3 | /// 4 | /// Base class for all S-curves. S-curves determine the interpolation algorithm. Using different curves, quality-speed balance may be tweaked, 5 | /// as better algorithms tend to be slower. 6 | /// 7 | public abstract class SCurve 8 | { 9 | /// 10 | /// Maps a value between 0 and 1 to some S-shaped curve. 11 | /// Interpolated value equals to 0 when ==0 and to 1 when ==1 12 | /// Values outside of [0,1] range are illegal 13 | /// 14 | /// Good interpolation also has derivatives of result equal to 0 when is 0 or 1 (the higher order derivatives are zeroed, the better). 15 | /// 16 | /// Interpolation value (0 to 1) 17 | /// Mapped value 18 | public abstract float Interpolate(float t); 19 | 20 | /// 21 | /// Linear interpolator is the fastest and has the lowest quality, only ensuring continuity of noise values, not their derivatives. 22 | /// 23 | public static readonly SCurve Linear = new LinearSCurve(); 24 | /// 25 | /// Cubic interpolation is a good compromise between speed and quality. It's slower than linear, but ensures continuity of 1-st order derivatives, making noise smooth. 26 | /// 27 | public static readonly SCurve Cubic = new CubicSCurve(); 28 | /// 29 | /// Quintic interpolation is the most smooth, guarateeing continuinty of second-order derivatives. it is slow, however. 30 | /// 31 | public static readonly SCurve Quintic = new QuinticSCurve(); 32 | /// 33 | /// Cosine interpolation uses cosine function instead of power curve, resulting in somewhat smoother noise than cubic interpolation, but still only achieving first-order continuity. 34 | /// Depending on target machine, it may be faster than quintic interpolation. 35 | /// 36 | public static readonly SCurve Cosine = new CosineSCurve(); 37 | 38 | /// 39 | /// Default interpolator. Noise generators will use this one if you don't supply concrete interlpolator in the constructor. 40 | /// 41 | public static SCurve Default = Cubic; 42 | 43 | 44 | } 45 | } -------------------------------------------------------------------------------- /Assets/IslandGenerator/Dep/CoherentNoise/.svn/pristine/c1/c112ca40a76bc202c94f6b198829f61d5eb49242.svn-base: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaellasky/ManyLandsGenerator/932989d0dacb2dadeda5502fa2294990f7d378b7/Assets/IslandGenerator/Dep/CoherentNoise/.svn/pristine/c1/c112ca40a76bc202c94f6b198829f61d5eb49242.svn-base -------------------------------------------------------------------------------- /Assets/IslandGenerator/Dep/CoherentNoise/.svn/pristine/c4/c49b23a4c3d4588398444089f1e9c5da4d621383.svn-base: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace CoherentNoise.Generation.Patterns 4 | { 5 | internal class Helpers 6 | { 7 | /// 8 | /// Saw function that is equal to 1 in odd points and -1 at even points 9 | /// 10 | /// 11 | /// 12 | public static float Saw(float x) 13 | { 14 | var i = Mathf.FloorToInt(x); 15 | if (i % 2 == 0) 16 | { 17 | return 2 * (x - i) - 1; 18 | } 19 | else 20 | { 21 | return 2 * (1 - (x - i)) - 1; 22 | } 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /Assets/IslandGenerator/Dep/CoherentNoise/.svn/pristine/c8/c85eeaff337f053a4a8840719cab5426e2016e62.svn-base: -------------------------------------------------------------------------------- 1 | namespace CoherentNoise.Generation 2 | { 3 | /// 4 | /// Constant "noise". This generator returns constant value, ignoring input coordinates. Used for arithmetic operations on noise generators 5 | /// 6 | public class Constant: Generator 7 | { 8 | private readonly float m_Value; 9 | 10 | /// 11 | /// Create new constant generator 12 | /// 13 | ///Value returned by generator 14 | public Constant(float value) 15 | { 16 | m_Value = value; 17 | } 18 | 19 | #region Implementation of Noise 20 | 21 | /// 22 | /// Returns noise value at given point. 23 | /// 24 | /// X coordinate 25 | /// Y coordinate 26 | /// Z coordinate 27 | /// Noise value 28 | public override float GetValue(float x, float y, float z) 29 | { 30 | return m_Value; 31 | } 32 | 33 | #endregion 34 | } 35 | } -------------------------------------------------------------------------------- /Assets/IslandGenerator/Dep/CoherentNoise/.svn/pristine/cc/cc849d81450d848fc191169a64462fb153f0e3b2.svn-base: -------------------------------------------------------------------------------- 1 | using CoherentNoise.Generation.Displacement; 2 | using UnityEngine; 3 | 4 | namespace CoherentNoise.Generation.Voronoi 5 | { 6 | /// 7 | /// Base class for Voronoi diagrams generators. Voronoi diagrams use a set of control points, that are somehow distributed, and for every point calculate distances to the closest control points. 8 | /// These distances are then combined to obtain final noise value. 9 | /// This generator distributes control points by randomly displacing points with integer coordinates. Thus, every unit-sized cube will have a single control point in it, 10 | /// randomly placed. 11 | /// 12 | public abstract class VoronoiDiagramBase : Generator 13 | { 14 | private readonly LatticeNoise[] m_ControlPointSource; 15 | 16 | /// 17 | /// Create new Voronoi diagram using seed. Control points will be obtained using random displacment seeded by supplied value 18 | /// 19 | /// Seed value 20 | protected VoronoiDiagramBase(int seed) 21 | { 22 | Frequency = 1; 23 | m_ControlPointSource = new[] 24 | { 25 | new LatticeNoise(seed), new LatticeNoise(seed + 1), new LatticeNoise(seed + 2), 26 | }; 27 | } 28 | 29 | /// 30 | /// Noise period. Used for repeating (seamless) noise. 31 | /// When Period >0 resulting noise pattern repeats exactly every Period, for all coordinates. 32 | /// 33 | public int Period{get; set;} 34 | 35 | 36 | #region Overrides of Noise 37 | 38 | /// 39 | /// Returns noise value at given point. 40 | /// 41 | /// X coordinate 42 | /// Y coordinate 43 | /// Z coordinateNoise value 44 | public override float GetValue(float x, float y, float z) 45 | { 46 | if (Period > 0) 47 | { 48 | // make periodic lattice. Repeat every Period cells 49 | x = x % Period; if (x < 0) x += Period; 50 | y = y % Period; if (y < 0) y += Period; 51 | z = z % Period; if (z < 0) z += Period; 52 | } 53 | 54 | // stretch values to match desired frequency 55 | x *= Frequency; 56 | y *= Frequency; 57 | z *= Frequency; 58 | 59 | float min1 = float.MaxValue, min2 = float.MaxValue, min3 = float.MaxValue; 60 | 61 | int xc = Mathf.FloorToInt(x); 62 | int yc = Mathf.FloorToInt(y); 63 | int zc = Mathf.FloorToInt(z); 64 | 65 | var v = new Vector3(x, y, z); 66 | 67 | for (int ii = xc - 1; ii < xc + 2; ii++) 68 | { 69 | for (int jj = yc - 1; jj < yc + 2; jj++) 70 | { 71 | for (int kk = zc - 1; kk < zc + 2; kk++) 72 | { 73 | Vector3 displacement = new Vector3( 74 | m_ControlPointSource[0].GetValue(ii, jj, kk) * 0.5f + 0.5f, 75 | m_ControlPointSource[1].GetValue(ii, jj, kk) * 0.5f + 0.5f, 76 | m_ControlPointSource[2].GetValue(ii, jj, kk) * 0.5f + 0.5f); 77 | 78 | Vector3 cp = new Vector3(ii, jj, kk) + displacement; 79 | float distance = Vector3.SqrMagnitude(cp - v); 80 | 81 | if (distance < min1) 82 | { 83 | min3 = min2; 84 | min2 = min1; 85 | min1 = distance; 86 | } 87 | else if (distance < min2) 88 | { 89 | min3 = min2; 90 | min2 = distance; 91 | } 92 | else if (distance < min3) 93 | { 94 | min3 = distance; 95 | } 96 | } 97 | } 98 | } 99 | 100 | return GetResult(Mathf.Sqrt(min1), Mathf.Sqrt(min2), Mathf.Sqrt(min3)); 101 | } 102 | 103 | /// 104 | /// Override this method to calculate final value using distances to closest control points. 105 | /// Note that distances that get passed to this function are adjusted for frequency (i.e. distances are scaled so that 106 | /// control points are in unit sized cubes) 107 | /// 108 | /// Distance to closest point 109 | /// Distance to second-closest point 110 | /// Distance to third-closest point 111 | /// 112 | protected abstract float GetResult(float min1, float min2, float min3); 113 | 114 | #endregion 115 | 116 | /// 117 | /// Frequency of control points. This has the same effect as applying transform to the generator, or placing control points closer together (for high frequency) or further apart (for low frequency) 118 | /// 119 | public float Frequency { get; set; } 120 | } 121 | } -------------------------------------------------------------------------------- /Assets/IslandGenerator/Dep/CoherentNoise/.svn/pristine/d1/d11acbaa01070536138ad946d1dcb28f62789b01.svn-base: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace CoherentNoise.Generation.Modification 4 | { 5 | /// 6 | /// This generator modifies source noise by applying a curve transorm to it. Curves can be edited using Unity editor's CurveFields, or created procedurally. 7 | /// 8 | public class Curve : Generator 9 | { 10 | private Generator m_Source; 11 | private AnimationCurve m_Curve; 12 | 13 | /// 14 | /// Create a new curve generator 15 | /// 16 | ///Source generator 17 | ///Curve to use 18 | public Curve(Generator source, AnimationCurve curve) 19 | { 20 | m_Source = source; 21 | m_Curve = curve; 22 | } 23 | 24 | #region Overrides of NoiseGen 25 | 26 | /// 27 | /// Returns noise value at given point. 28 | /// 29 | /// X coordinate 30 | /// Y coordinate 31 | /// Z coordinateNoise value 32 | public override float GetValue(float x, float y, float z) 33 | { 34 | float v = m_Source.GetValue(x, y, z); 35 | return m_Curve.Evaluate(v); 36 | } 37 | 38 | #endregion 39 | } 40 | } -------------------------------------------------------------------------------- /Assets/IslandGenerator/Dep/CoherentNoise/.svn/pristine/e0/e060b57e92c47935a0d1c2fb56dc08ed8dca7610.svn-base: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | 4 | namespace CoherentNoise.Generation.Combination 5 | { 6 | /// 7 | /// This generator blends two noises together, using third as a blend weight. Note that blend weight's value is clamped to [0,1] range 8 | /// 9 | public class Blend : Generator 10 | { 11 | private readonly Generator m_A; 12 | private readonly Generator m_B; 13 | private readonly Generator m_Weight; 14 | 15 | /// 16 | /// Create new blend generator 17 | /// 18 | ///First generator to blend (this is returned if weight==0) 19 | ///Second generator to blend (this is returned if weight==1) 20 | ///Blend weight source 21 | public Blend(Generator a, Generator b, Generator weight) 22 | { 23 | m_A = a; 24 | m_Weight = weight; 25 | m_B = b; 26 | } 27 | 28 | #region Overrides of Noise 29 | 30 | /// 31 | /// Returns noise value at given point. 32 | /// 33 | /// X coordinate 34 | /// Y coordinate 35 | /// Z coordinateNoise value 36 | public override float GetValue(float x, float y, float z) 37 | { 38 | var w = Mathf.Clamp01(m_Weight.GetValue(x, y, z)); 39 | return m_A.GetValue(x, y, z) * (1 - w) + m_B.GetValue(x, y, z) * w; 40 | } 41 | 42 | #endregion 43 | } 44 | } -------------------------------------------------------------------------------- /Assets/IslandGenerator/Dep/CoherentNoise/.svn/pristine/ea/ea47d104e58cd13ddf33d7c834524e45063ed6b1.svn-base: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace CoherentNoise.Interpolation 4 | { 5 | internal class QuinticSCurve: SCurve 6 | { 7 | #region Overrides of Interpolator 8 | 9 | public override float Interpolate(float t) 10 | { 11 | var t3 = t * t * t; 12 | var t4 = t3 * t; 13 | var t5 = t4 * t; 14 | return 6 * t5 - 15 * t4 + 10 * t3; 15 | } 16 | 17 | #endregion 18 | } 19 | } -------------------------------------------------------------------------------- /Assets/IslandGenerator/Dep/CoherentNoise/.svn/pristine/ed/ed76bc5b8cb5003db7ff4a95be0ed4874d2bb0b6.svn-base: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 11.00 3 | # Visual Studio 2010 4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CoherentNoise", "CoherentNoise\CoherentNoise.csproj", "{9564FDC1-37C4-4502-BEF0-766CED27E667}" 5 | EndProject 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GraphMaker", "GraphMaker\GraphMaker.csproj", "{057A5BFD-86EF-4492-A6C8-385C2E999E13}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Debug|Mixed Platforms = Debug|Mixed Platforms 12 | Debug|x86 = Debug|x86 13 | Release|Any CPU = Release|Any CPU 14 | Release|Mixed Platforms = Release|Mixed Platforms 15 | Release|x86 = Release|x86 16 | EndGlobalSection 17 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 18 | {9564FDC1-37C4-4502-BEF0-766CED27E667}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 19 | {9564FDC1-37C4-4502-BEF0-766CED27E667}.Debug|Any CPU.Build.0 = Debug|Any CPU 20 | {9564FDC1-37C4-4502-BEF0-766CED27E667}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU 21 | {9564FDC1-37C4-4502-BEF0-766CED27E667}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU 22 | {9564FDC1-37C4-4502-BEF0-766CED27E667}.Debug|x86.ActiveCfg = Debug|Any CPU 23 | {9564FDC1-37C4-4502-BEF0-766CED27E667}.Release|Any CPU.ActiveCfg = Release|Any CPU 24 | {9564FDC1-37C4-4502-BEF0-766CED27E667}.Release|Any CPU.Build.0 = Release|Any CPU 25 | {9564FDC1-37C4-4502-BEF0-766CED27E667}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU 26 | {9564FDC1-37C4-4502-BEF0-766CED27E667}.Release|Mixed Platforms.Build.0 = Release|Any CPU 27 | {9564FDC1-37C4-4502-BEF0-766CED27E667}.Release|x86.ActiveCfg = Release|Any CPU 28 | {057A5BFD-86EF-4492-A6C8-385C2E999E13}.Debug|Any CPU.ActiveCfg = Debug|x86 29 | {057A5BFD-86EF-4492-A6C8-385C2E999E13}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 30 | {057A5BFD-86EF-4492-A6C8-385C2E999E13}.Debug|Mixed Platforms.Build.0 = Debug|x86 31 | {057A5BFD-86EF-4492-A6C8-385C2E999E13}.Debug|x86.ActiveCfg = Debug|x86 32 | {057A5BFD-86EF-4492-A6C8-385C2E999E13}.Debug|x86.Build.0 = Debug|x86 33 | {057A5BFD-86EF-4492-A6C8-385C2E999E13}.Release|Any CPU.ActiveCfg = Release|x86 34 | {057A5BFD-86EF-4492-A6C8-385C2E999E13}.Release|Mixed Platforms.ActiveCfg = Release|x86 35 | {057A5BFD-86EF-4492-A6C8-385C2E999E13}.Release|Mixed Platforms.Build.0 = Release|x86 36 | {057A5BFD-86EF-4492-A6C8-385C2E999E13}.Release|x86.ActiveCfg = Release|x86 37 | {057A5BFD-86EF-4492-A6C8-385C2E999E13}.Release|x86.Build.0 = Release|x86 38 | EndGlobalSection 39 | GlobalSection(SolutionProperties) = preSolution 40 | HideSolutionNode = FALSE 41 | EndGlobalSection 42 | EndGlobal 43 | -------------------------------------------------------------------------------- /Assets/IslandGenerator/Dep/CoherentNoise/.svn/pristine/f3/f3ef5f77c441dcd5960a5615e8164bca3e139124.svn-base: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace CoherentNoise.Generation.Voronoi 4 | { 5 | /// 6 | /// This generator creates a "pits" Voronoi diargam, that simply returns distance to closest control point. Resulting noise has value 0 at control points (forming pits) and higher values away from control points. 7 | /// 8 | public class VoronoiPits:VoronoiDiagramBase 9 | { 10 | /// 11 | /// Create new Voronoi diagram using seed. Control points will be obtained using random displacment seeded by supplied value 12 | /// 13 | /// Seed value 14 | public VoronoiPits(int seed) : base(seed) 15 | { 16 | } 17 | 18 | #region Overrides of VoronoiDiagramBase 19 | 20 | /// 21 | /// Override this method to calculate final value using distances to closest control points. 22 | /// Note that distances that get passed to this function are adjusted for frequency (i.e. distances are scaled so that 23 | /// control points are in unit sized cubes) 24 | /// 25 | /// Distance to closest point 26 | /// Distance to second-closest point 27 | /// Distance to third-closest point 28 | /// 29 | protected override float GetResult(float min1, float min2, float min3) 30 | { 31 | return min1; 32 | } 33 | 34 | #endregion 35 | } 36 | } -------------------------------------------------------------------------------- /Assets/IslandGenerator/Dep/CoherentNoise/.svn/pristine/f5/f5f6376ad25fcc272709ef9659ed7fbf771bf4f5.svn-base: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace CoherentNoise.Generation.Modification 4 | { 5 | /// 6 | /// Bias generator is used to "shift" mean value of source noise. Source is assumed to have values between -1 and 1; after Bias is applied, 7 | /// the result is still between -1 and 1, but the points that were equal to 0 are shifted by bias value. 8 | /// 9 | public class Bias: Generator 10 | { 11 | private readonly float m_Bias; 12 | private readonly Generator m_Source; 13 | 14 | /// 15 | /// Create new generator 16 | /// 17 | ///Source generator 18 | ///Bias value 19 | public Bias(Generator source, float bias) 20 | { 21 | if (m_Bias <= -1 || m_Bias >= 1) 22 | throw new ArgumentException("Bias must be between -1 and 1"); 23 | 24 | m_Source = source; 25 | m_Bias = bias/(1f+bias); 26 | } 27 | 28 | #region Overrides of Noise 29 | 30 | /// 31 | /// Returns noise value at given point. 32 | /// 33 | /// X coordinate 34 | /// Y coordinate 35 | /// Z coordinateNoise value 36 | public override float GetValue(float x, float y, float z) 37 | { 38 | var f = m_Source.GetValue(x, y, z); 39 | // clamp f to [-1,1] so that we don't ever get a division by 0 error 40 | if (f < -1) 41 | f = -1; 42 | if (f > 1) 43 | f = 1; 44 | return (f + 1.0f)/(1.0f - m_Bias*(1.0f - f)*0.5f) - 1.0f; 45 | } 46 | 47 | #endregion 48 | } 49 | } -------------------------------------------------------------------------------- /Assets/IslandGenerator/Dep/CoherentNoise/.svn/pristine/f7/f752b380e3f153bc03d42f30e9e6a83727a54849.svn-base: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | 4 | namespace CoherentNoise.Generation.Displacement 5 | { 6 | /// 7 | /// This generator perturbs its source, using a user-supplied function to obtain displacement values. In other words, nonuniformly displaces each value of 8 | /// its source. 9 | /// 10 | public class Perturb: Generator 11 | { 12 | private readonly Generator m_Source; 13 | private readonly Func m_DisplacementSource; 14 | 15 | /// 16 | /// Create new perturb generator 17 | /// 18 | ///Source generator 19 | ///Displacement generator 20 | public Perturb(Generator source, Func displacementSource) 21 | { 22 | m_Source = source; 23 | m_DisplacementSource = displacementSource; 24 | } 25 | 26 | #region Overrides of Noise 27 | 28 | /// 29 | /// Returns noise value at given point. 30 | /// 31 | /// X coordinate 32 | /// Y coordinate 33 | /// Z coordinateNoise value 34 | public override float GetValue(float x, float y, float z) 35 | { 36 | Vector3 displacement = m_DisplacementSource(new Vector3(x, y, z)); 37 | return m_Source.GetValue(x + displacement.x, y + displacement.y, z + displacement.z); 38 | } 39 | 40 | #endregion 41 | } 42 | } -------------------------------------------------------------------------------- /Assets/IslandGenerator/Dep/CoherentNoise/.svn/wc.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaellasky/ManyLandsGenerator/932989d0dacb2dadeda5502fa2294990f7d378b7/Assets/IslandGenerator/Dep/CoherentNoise/.svn/wc.db -------------------------------------------------------------------------------- /Assets/IslandGenerator/Dep/CoherentNoise/CoherentNoise.XML.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3f667b535a38aa04b8cd9f6fa0d7282f 3 | TextScriptImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/IslandGenerator/Dep/CoherentNoise/CoherentNoise.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaellasky/ManyLandsGenerator/932989d0dacb2dadeda5502fa2294990f7d378b7/Assets/IslandGenerator/Dep/CoherentNoise/CoherentNoise.dll -------------------------------------------------------------------------------- /Assets/IslandGenerator/Dep/CoherentNoise/CoherentNoise.dll.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2a964cd656c03e14c93520958b64722a 3 | MonoAssemblyImporter: 4 | serializedVersion: 1 5 | iconMap: {} 6 | executionOrder: {} 7 | userData: 8 | -------------------------------------------------------------------------------- /Assets/IslandGenerator/Dep/CoherentNoise/Demo.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ec98fcf6413e84143a131f093650265a 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/IslandGenerator/Dep/CoherentNoise/Demo/Grass.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaellasky/ManyLandsGenerator/932989d0dacb2dadeda5502fa2294990f7d378b7/Assets/IslandGenerator/Dep/CoherentNoise/Demo/Grass.psd -------------------------------------------------------------------------------- /Assets/IslandGenerator/Dep/CoherentNoise/Demo/Grass.psd.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2c528fec5d95e4ac28cf46399b887662 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | serializedVersion: 2 6 | mipmaps: 7 | mipMapMode: 0 8 | enableMipMap: 1 9 | linearTexture: 0 10 | correctGamma: 0 11 | fadeOut: 0 12 | borderMipMap: 0 13 | mipMapFadeDistanceStart: 2 14 | mipMapFadeDistanceEnd: 3 15 | bumpmap: 16 | convertToNormalMap: 0 17 | externalNormalMap: 0 18 | heightScale: .25 19 | normalMapFilter: 0 20 | isReadable: 0 21 | grayScaleToAlpha: 0 22 | generateCubemap: 0 23 | seamlessCubemap: 0 24 | textureFormat: -1 25 | maxTextureSize: 1024 26 | textureSettings: 27 | filterMode: 1 28 | aniso: 1 29 | mipBias: 0 30 | wrapMode: 1 31 | nPOTScale: 0 32 | lightmap: 0 33 | compressionQuality: 50 34 | spriteMode: 0 35 | spriteExtrude: 1 36 | spriteMeshType: 1 37 | alignment: 0 38 | spritePivot: {x: .5, y: .5} 39 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 40 | spritePixelsToUnits: 100 41 | alphaIsTransparency: 0 42 | textureType: -1 43 | buildTargetSettings: [] 44 | spriteSheet: 45 | sprites: [] 46 | spritePackingTag: 47 | userData: 48 | -------------------------------------------------------------------------------- /Assets/IslandGenerator/Dep/CoherentNoise/Demo/New Terrain 1.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaellasky/ManyLandsGenerator/932989d0dacb2dadeda5502fa2294990f7d378b7/Assets/IslandGenerator/Dep/CoherentNoise/Demo/New Terrain 1.asset -------------------------------------------------------------------------------- /Assets/IslandGenerator/Dep/CoherentNoise/Demo/New Terrain 1.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 76ec8ffda97c6394895e7692836262b8 3 | NativeFormatImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/IslandGenerator/Dep/CoherentNoise/Demo/New Terrain.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaellasky/ManyLandsGenerator/932989d0dacb2dadeda5502fa2294990f7d378b7/Assets/IslandGenerator/Dep/CoherentNoise/Demo/New Terrain.asset -------------------------------------------------------------------------------- /Assets/IslandGenerator/Dep/CoherentNoise/Demo/New Terrain.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c6b9fe1b56b2ff540a2020e7acfaef85 3 | NativeFormatImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/IslandGenerator/Dep/CoherentNoise/Demo/Skybox.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4d7fadc5eb2a95b49b73ff4544043b68 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/IslandGenerator/Dep/CoherentNoise/Demo/Skybox/Textures.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 394c54d4f80bf524db2c210bec9486b5 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/IslandGenerator/Dep/CoherentNoise/Demo/Terrain Textures.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cba4562cece794697b418ce8e7c04b3c 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/IslandGenerator/Dep/CoherentNoise/Demo/Terrain Textures/GoodDirt.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaellasky/ManyLandsGenerator/932989d0dacb2dadeda5502fa2294990f7d378b7/Assets/IslandGenerator/Dep/CoherentNoise/Demo/Terrain Textures/GoodDirt.psd -------------------------------------------------------------------------------- /Assets/IslandGenerator/Dep/CoherentNoise/Demo/Terrain Textures/GoodDirt.psd.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bfd675cc0db1d4656b75dc6d6ba91142 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | serializedVersion: 2 6 | mipmaps: 7 | mipMapMode: 0 8 | enableMipMap: 1 9 | linearTexture: 0 10 | correctGamma: 0 11 | fadeOut: 0 12 | borderMipMap: 0 13 | mipMapFadeDistanceStart: 2 14 | mipMapFadeDistanceEnd: 3 15 | bumpmap: 16 | convertToNormalMap: 0 17 | externalNormalMap: 0 18 | heightScale: .25 19 | normalMapFilter: 0 20 | isReadable: 0 21 | grayScaleToAlpha: 0 22 | generateCubemap: 0 23 | seamlessCubemap: 0 24 | textureFormat: -1 25 | maxTextureSize: 1024 26 | textureSettings: 27 | filterMode: 1 28 | aniso: 1 29 | mipBias: 0 30 | wrapMode: 0 31 | nPOTScale: 0 32 | lightmap: 0 33 | compressionQuality: 50 34 | spriteMode: 0 35 | spriteExtrude: 1 36 | spriteMeshType: 1 37 | alignment: 0 38 | spritePivot: {x: .5, y: .5} 39 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 40 | spritePixelsToUnits: 100 41 | alphaIsTransparency: 0 42 | textureType: -1 43 | buildTargetSettings: [] 44 | spriteSheet: 45 | sprites: [] 46 | spritePackingTag: 47 | userData: 48 | -------------------------------------------------------------------------------- /Assets/IslandGenerator/Dep/CoherentNoise/Demo/Terrain Textures/Grass (Hill).psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaellasky/ManyLandsGenerator/932989d0dacb2dadeda5502fa2294990f7d378b7/Assets/IslandGenerator/Dep/CoherentNoise/Demo/Terrain Textures/Grass (Hill).psd -------------------------------------------------------------------------------- /Assets/IslandGenerator/Dep/CoherentNoise/Demo/Terrain Textures/Grass (Hill).psd.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c6e0767b1f8c34890ac245217f4b9731 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | serializedVersion: 2 6 | mipmaps: 7 | mipMapMode: 0 8 | enableMipMap: 1 9 | linearTexture: 0 10 | correctGamma: 0 11 | fadeOut: 0 12 | borderMipMap: 0 13 | mipMapFadeDistanceStart: 2 14 | mipMapFadeDistanceEnd: 3 15 | bumpmap: 16 | convertToNormalMap: 0 17 | externalNormalMap: 0 18 | heightScale: .25 19 | normalMapFilter: 0 20 | isReadable: 0 21 | grayScaleToAlpha: 0 22 | generateCubemap: 0 23 | seamlessCubemap: 0 24 | textureFormat: 10 25 | maxTextureSize: 512 26 | textureSettings: 27 | filterMode: 1 28 | aniso: 1 29 | mipBias: 0 30 | wrapMode: 0 31 | nPOTScale: 0 32 | lightmap: 0 33 | compressionQuality: 50 34 | spriteMode: 0 35 | spriteExtrude: 1 36 | spriteMeshType: 1 37 | alignment: 0 38 | spritePivot: {x: .5, y: .5} 39 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 40 | spritePixelsToUnits: 100 41 | alphaIsTransparency: 0 42 | textureType: -1 43 | buildTargetSettings: [] 44 | spriteSheet: 45 | sprites: [] 46 | spritePackingTag: 47 | userData: 48 | -------------------------------------------------------------------------------- /Assets/IslandGenerator/Dep/CoherentNoise/Demo/TerrainDemo.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bfb6b7f8cdcd13a479ca7fc6ba357960 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: 6 | - Terrain1: {instanceID: 0} 7 | - Terrain2: {instanceID: 0} 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | -------------------------------------------------------------------------------- /Assets/IslandGenerator/Dep/CoherentNoise/Demo/demo.unity: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaellasky/ManyLandsGenerator/932989d0dacb2dadeda5502fa2294990f7d378b7/Assets/IslandGenerator/Dep/CoherentNoise/Demo/demo.unity -------------------------------------------------------------------------------- /Assets/IslandGenerator/Dep/CoherentNoise/Demo/demo.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 87e560b487324204db4824152765151f 3 | DefaultImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/IslandGenerator/Dep/CoherentNoise/Manual.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaellasky/ManyLandsGenerator/932989d0dacb2dadeda5502fa2294990f7d378b7/Assets/IslandGenerator/Dep/CoherentNoise/Manual.pdf -------------------------------------------------------------------------------- /Assets/IslandGenerator/Dep/CoherentNoise/Manual.pdf.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 73f4b73ecc3677d44a703fe784102645 3 | DefaultImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/IslandGenerator/Dep/CoherentNoise/readme.txt: -------------------------------------------------------------------------------- 1 | CoherentNoise is a comprehensive noise-generation library for Unity3D, inspired by libnoise open-source library. Read the included manual to understand how it works, and/or check out demo scene in the corresponding folder. 2 | 3 | Files included: 4 | CoherentNoise.dll - The library itself 5 | manual.pdf - Usage manual 6 | CoherentNoise.xml - Comments file for MonoDevelop/Visual Studio. 7 | readme.txt - This file 8 | Demo - folder with demo scene and assets. -------------------------------------------------------------------------------- /Assets/IslandGenerator/Dep/CoherentNoise/readme.txt.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 400b4bce948837c4083f83b72b05cf16 3 | TextScriptImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/IslandGenerator/Dep/FortuneVoronoi.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4fe89c687c0f7ec4b8d13542653da01c 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/IslandGenerator/Dep/FortuneVoronoi/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | 4 | // 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | // 9 | [assembly: AssemblyTitle("FortuneVoronoi")] 10 | [assembly: AssemblyDescription("A C# implementation of the Fortune algorithm to compute a Voronoi graph")] 11 | [assembly: AssemblyConfiguration("")] 12 | [assembly: AssemblyCompany("")] 13 | [assembly: AssemblyProduct("")] 14 | [assembly: AssemblyCopyright("")] 15 | [assembly: AssemblyTrademark("")] 16 | [assembly: AssemblyCulture("")] 17 | 18 | // 19 | // Version information for an assembly consists of the following four values: 20 | // 21 | // Major Version 22 | // Minor Version 23 | // Build Number 24 | // Revision 25 | // 26 | // You can specify all the values or you can default the Revision and Build Numbers 27 | // by using the '*' as shown below: 28 | 29 | [assembly: AssemblyVersion("1.0.*")] 30 | 31 | // 32 | // In order to sign your assembly you must specify a key to use. Refer to the 33 | // Microsoft .NET Framework documentation for more information on assembly signing. 34 | // 35 | // Use the attributes below to control which key is used for signing. 36 | // 37 | // Notes: 38 | // (*) If no key is specified, the assembly is not signed. 39 | // (*) KeyName refers to a key that has been installed in the Crypto Service 40 | // Provider (CSP) on your machine. KeyFile refers to a file which contains 41 | // a key. 42 | // (*) If the KeyFile and the KeyName values are both specified, the 43 | // following processing occurs: 44 | // (1) If the KeyName can be found in the CSP, that key is used. 45 | // (2) If the KeyName does not exist and the KeyFile does exist, the key 46 | // in the KeyFile is installed into the CSP and used. 47 | // (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility. 48 | // When specifying the KeyFile, the location of the KeyFile should be 49 | // relative to the project output directory which is 50 | // %Project Directory%\obj\. For example, if your KeyFile is 51 | // located in the project directory, you would specify the AssemblyKeyFile 52 | // attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")] 53 | // (*) Delay Signing is an advanced option - see the Microsoft .NET Framework 54 | // documentation for more information on this. 55 | // 56 | [assembly: AssemblyDelaySign(false)] 57 | [assembly: AssemblyKeyFile("")] 58 | [assembly: AssemblyKeyName("")] 59 | -------------------------------------------------------------------------------- /Assets/IslandGenerator/Dep/FortuneVoronoi/AssemblyInfo.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 40cc2815e95d84806987b3c8f50eefb0 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/IslandGenerator/Dep/FortuneVoronoi/FortuneVoronoi.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaellasky/ManyLandsGenerator/932989d0dacb2dadeda5502fa2294990f7d378b7/Assets/IslandGenerator/Dep/FortuneVoronoi/FortuneVoronoi.cs -------------------------------------------------------------------------------- /Assets/IslandGenerator/Dep/FortuneVoronoi/FortuneVoronoi.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0594530d53c7d4ee9af1c398c2ad563e 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/IslandGenerator/Dep/FortuneVoronoi/LICENCE: -------------------------------------------------------------------------------- 1 | This Source Code Form is subject to the 2 | terms of the Mozilla Public License, v. 3 | 2.0. If a copy of the MPL was not 4 | distributed with this file, You can 5 | obtain one at http://mozilla.org/MPL/2.0/. -------------------------------------------------------------------------------- /Assets/IslandGenerator/Dep/FortuneVoronoi/LICENCE.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4ee445c591620424b9a816c7e007ec6f 3 | DefaultImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/IslandGenerator/Dep/FortuneVoronoi/PriorityQueue.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | 4 | namespace BenTools.Data 5 | { 6 | public interface IPriorityQueue : ICollection, ICloneable, IList 7 | { 8 | int Push(object O); 9 | object Pop(); 10 | object Peek(); 11 | void Update(int i); 12 | } 13 | public class BinaryPriorityQueue : IPriorityQueue, ICollection, ICloneable, IList 14 | { 15 | protected ArrayList InnerList = new ArrayList(); 16 | protected IComparer Comparer; 17 | 18 | #region contructors 19 | public BinaryPriorityQueue() : this(System.Collections.Comparer.Default) 20 | {} 21 | public BinaryPriorityQueue(IComparer c) 22 | { 23 | Comparer = c; 24 | } 25 | public BinaryPriorityQueue(int C) : this(System.Collections.Comparer.Default,C) 26 | {} 27 | public BinaryPriorityQueue(IComparer c, int Capacity) 28 | { 29 | Comparer = c; 30 | InnerList.Capacity = Capacity; 31 | } 32 | 33 | protected BinaryPriorityQueue(ArrayList Core, IComparer Comp, bool Copy) 34 | { 35 | if(Copy) 36 | InnerList = Core.Clone() as ArrayList; 37 | else 38 | InnerList = Core; 39 | Comparer = Comp; 40 | } 41 | 42 | #endregion 43 | protected void SwitchElements(int i, int j) 44 | { 45 | object h = InnerList[i]; 46 | InnerList[i] = InnerList[j]; 47 | InnerList[j] = h; 48 | } 49 | 50 | protected virtual int OnCompare(int i, int j) 51 | { 52 | return Comparer.Compare(InnerList[i],InnerList[j]); 53 | } 54 | 55 | #region public methods 56 | /// 57 | /// Push an object onto the PQ 58 | /// 59 | /// The new object 60 | /// The index in the list where the object is _now_. This will change when objects are taken from or put onto the PQ. 61 | public int Push(object O) 62 | { 63 | int p = InnerList.Count,p2; 64 | InnerList.Add(O); // E[p] = O 65 | do 66 | { 67 | if(p==0) 68 | break; 69 | p2 = (p-1)/2; 70 | if(OnCompare(p,p2)<0) 71 | { 72 | SwitchElements(p,p2); 73 | p = p2; 74 | } 75 | else 76 | break; 77 | }while(true); 78 | return p; 79 | } 80 | 81 | /// 82 | /// Get the smallest object and remove it. 83 | /// 84 | /// The smallest object 85 | public object Pop() 86 | { 87 | object result = InnerList[0]; 88 | int p = 0,p1,p2,pn; 89 | InnerList[0] = InnerList[InnerList.Count-1]; 90 | InnerList.RemoveAt(InnerList.Count-1); 91 | do 92 | { 93 | pn = p; 94 | p1 = 2*p+1; 95 | p2 = 2*p+2; 96 | if(InnerList.Count>p1 && OnCompare(p,p1)>0) // links kleiner 97 | p = p1; 98 | if(InnerList.Count>p2 && OnCompare(p,p2)>0) // rechts noch kleiner 99 | p = p2; 100 | 101 | if(p==pn) 102 | break; 103 | SwitchElements(p,pn); 104 | }while(true); 105 | return result; 106 | } 107 | 108 | /// 109 | /// Notify the PQ that the object at position i has changed 110 | /// and the PQ needs to restore order. 111 | /// Since you dont have access to any indexes (except by using the 112 | /// explicit IList.this) you should not call this function without knowing exactly 113 | /// what you do. 114 | /// 115 | /// The index of the changed object. 116 | public void Update(int i) 117 | { 118 | int p = i,pn; 119 | int p1,p2; 120 | do // aufsteigen 121 | { 122 | if(p==0) 123 | break; 124 | p2 = (p-1)/2; 125 | if(OnCompare(p,p2)<0) 126 | { 127 | SwitchElements(p,p2); 128 | p = p2; 129 | } 130 | else 131 | break; 132 | }while(true); 133 | if(pp1 && OnCompare(p,p1)>0) // links kleiner 141 | p = p1; 142 | if(InnerList.Count>p2 && OnCompare(p,p2)>0) // rechts noch kleiner 143 | p = p2; 144 | 145 | if(p==pn) 146 | break; 147 | SwitchElements(p,pn); 148 | }while(true); 149 | } 150 | 151 | /// 152 | /// Get the smallest object without removing it. 153 | /// 154 | /// The smallest object 155 | public object Peek() 156 | { 157 | if(InnerList.Count>0) 158 | return InnerList[0]; 159 | return null; 160 | } 161 | 162 | public bool Contains(object value) 163 | { 164 | return InnerList.Contains(value); 165 | } 166 | 167 | public void Clear() 168 | { 169 | InnerList.Clear(); 170 | } 171 | 172 | public int Count 173 | { 174 | get 175 | { 176 | return InnerList.Count; 177 | } 178 | } 179 | IEnumerator IEnumerable.GetEnumerator() 180 | { 181 | return InnerList.GetEnumerator(); 182 | } 183 | 184 | public void CopyTo(Array array, int index) 185 | { 186 | InnerList.CopyTo(array,index); 187 | } 188 | 189 | public object Clone() 190 | { 191 | return new BinaryPriorityQueue(InnerList,Comparer,true); 192 | } 193 | 194 | public bool IsSynchronized 195 | { 196 | get 197 | { 198 | return InnerList.IsSynchronized; 199 | } 200 | } 201 | 202 | public object SyncRoot 203 | { 204 | get 205 | { 206 | return this; 207 | } 208 | } 209 | #endregion 210 | #region explicit implementation 211 | bool IList.IsReadOnly 212 | { 213 | get 214 | { 215 | return false; 216 | } 217 | } 218 | 219 | object IList.this[int index] 220 | { 221 | get 222 | { 223 | return InnerList[index]; 224 | } 225 | set 226 | { 227 | InnerList[index] = value; 228 | Update(index); 229 | } 230 | } 231 | 232 | int IList.Add(object o) 233 | { 234 | return Push(o); 235 | } 236 | 237 | void IList.RemoveAt(int index) 238 | { 239 | throw new NotSupportedException(); 240 | } 241 | 242 | void IList.Insert(int index, object value) 243 | { 244 | throw new NotSupportedException(); 245 | } 246 | 247 | void IList.Remove(object value) 248 | { 249 | throw new NotSupportedException(); 250 | } 251 | 252 | int IList.IndexOf(object value) 253 | { 254 | throw new NotSupportedException(); 255 | } 256 | 257 | bool IList.IsFixedSize 258 | { 259 | get 260 | { 261 | return false; 262 | } 263 | } 264 | 265 | public static BinaryPriorityQueue Syncronized(BinaryPriorityQueue P) 266 | { 267 | return new BinaryPriorityQueue(ArrayList.Synchronized(P.InnerList),P.Comparer,false); 268 | } 269 | public static BinaryPriorityQueue ReadOnly(BinaryPriorityQueue P) 270 | { 271 | return new BinaryPriorityQueue(ArrayList.ReadOnly(P.InnerList),P.Comparer,false); 272 | } 273 | #endregion 274 | } 275 | } 276 | -------------------------------------------------------------------------------- /Assets/IslandGenerator/Dep/FortuneVoronoi/PriorityQueue.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a03f165e61dd94ca29eee58bc8c21d2a 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/IslandGenerator/Dep/FortuneVoronoi/ToolBox.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaellasky/ManyLandsGenerator/932989d0dacb2dadeda5502fa2294990f7d378b7/Assets/IslandGenerator/Dep/FortuneVoronoi/ToolBox.cs -------------------------------------------------------------------------------- /Assets/IslandGenerator/Dep/FortuneVoronoi/ToolBox.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 72809c9625d9e4919ad7b86961039986 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/IslandGenerator/Dep/FortuneVoronoi/Vector.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a854f51e4feec4f4eb04499390f88b1d 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/IslandGenerator/Materials.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 32e752fc2f23f1b448357a18c48c3de7 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/IslandGenerator/Materials/IslandMaterial.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaellasky/ManyLandsGenerator/932989d0dacb2dadeda5502fa2294990f7d378b7/Assets/IslandGenerator/Materials/IslandMaterial.mat -------------------------------------------------------------------------------- /Assets/IslandGenerator/Materials/IslandMaterial.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 460fcb4878258944d87bcef9739ddeaa 3 | NativeFormatImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/IslandGenerator/Materials/IslandPineGroup.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaellasky/ManyLandsGenerator/932989d0dacb2dadeda5502fa2294990f7d378b7/Assets/IslandGenerator/Materials/IslandPineGroup.mat -------------------------------------------------------------------------------- /Assets/IslandGenerator/Materials/IslandPineGroup.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cedd9e43b5500df4eaf483272397c7dc 3 | NativeFormatImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/IslandGenerator/Materials/IslandPlant.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaellasky/ManyLandsGenerator/932989d0dacb2dadeda5502fa2294990f7d378b7/Assets/IslandGenerator/Materials/IslandPlant.mat -------------------------------------------------------------------------------- /Assets/IslandGenerator/Materials/IslandPlant.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4ec7a140b361a824a9683f5b0f86e2ae 3 | NativeFormatImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/IslandGenerator/Materials/WaterPlane.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaellasky/ManyLandsGenerator/932989d0dacb2dadeda5502fa2294990f7d378b7/Assets/IslandGenerator/Materials/WaterPlane.mat -------------------------------------------------------------------------------- /Assets/IslandGenerator/Materials/WaterPlane.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 36b28e35074e26043a6c66e29595e93e 3 | NativeFormatImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/IslandGenerator/Prefabs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b52b3e3287f144b45b106414f0346742 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/IslandGenerator/Prefabs/Island.prefab: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaellasky/ManyLandsGenerator/932989d0dacb2dadeda5502fa2294990f7d378b7/Assets/IslandGenerator/Prefabs/Island.prefab -------------------------------------------------------------------------------- /Assets/IslandGenerator/Prefabs/Island.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 88f18f8c58205dc488af9ac6d45d5c47 3 | NativeFormatImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/IslandGenerator/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 993325106324375488cd238b12714ab9 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/IslandGenerator/Scripts/IslandGenerator.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4000b3e11fcd0854c8905a5ddaa86a2c 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/IslandGenerator/Scripts/IslandGenerator/Island.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0cf7269a6c67e7f4f9b9f91d215cd20d 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/IslandGenerator/Scripts/IslandGenerator/IslandDemo.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | 4 | public class IslandDemo : MonoBehaviour { 5 | 6 | public GameObject islandPrefab; 7 | 8 | private GameObject currentIsland; 9 | 10 | void Start () 11 | { 12 | SpawnIsland (); 13 | } 14 | 15 | void SpawnIsland () 16 | { 17 | if (currentIsland != null) { Destroy (currentIsland); } 18 | 19 | currentIsland = (GameObject) GameObject.Instantiate (islandPrefab, Vector3.zero, Quaternion.identity); 20 | 21 | Island isl = currentIsland.GetComponent(); 22 | isl.islandPosition = new Vector3 (Random.Range (0, 10000), Random.Range (0, 10000), Random.Range (0, 10000)); 23 | isl.Regenerate(true); 24 | } 25 | 26 | void OnGUI () 27 | { 28 | if (GUI.Button (new Rect (10, 70, 500, 30), "Generate New Island")) 29 | { 30 | SpawnIsland(); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Assets/IslandGenerator/Scripts/IslandGenerator/IslandDemo.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8adf0fde809085744a75524b728f7426 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/IslandGenerator/Scripts/IslandGenerator/IslandTile.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4558ab23e039fe34ea9d65038d3ecac4 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/IslandGenerator/Scripts/IslandGenerator/IslandTileCorner.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | using BenTools.Mathematics; 5 | using BenTools.Data; 6 | 7 | public class IslandTileCorner 8 | { 9 | public HashSet adjacent; // Corners connected by edges 10 | public HashSet protrudes; // Edges touching this corner 11 | public HashSet touches; // Tiles connected by this corner 12 | public Vector position; 13 | public float elevation; 14 | public int inlandDistance = 1; 15 | public float moistureFlowRate = 0.95f; 16 | 17 | public IslandTileCorner DownSlopeCorner 18 | { 19 | get 20 | { 21 | if (downSlopeCorner == null) 22 | { 23 | downSlopeCorner = GetDownSlopeCorner(this); 24 | } 25 | 26 | return downSlopeCorner; 27 | } 28 | } 29 | 30 | public float Elevation 31 | { 32 | get 33 | { 34 | if (IsWater) { return 0; } 35 | return elevation; 36 | } 37 | } 38 | 39 | public float Moisture 40 | { 41 | get 42 | { 43 | if (!calcedMoisture) { moisture = CalcMoisture(); } 44 | return moisture; 45 | } 46 | } 47 | 48 | public Vector3 ElevatedPosition 49 | { 50 | get 51 | { 52 | return Island.ElevateVec(IslandTile.VToV3(position), elevation); 53 | } 54 | } 55 | 56 | public bool IsWater 57 | { 58 | get 59 | { 60 | if (!calcedWater) { CalcWater(); } 61 | return isWater || elevation <= 0; 62 | } 63 | } 64 | 65 | public bool IsShore 66 | { 67 | get 68 | { 69 | if (!calcedShore) { CalcShore(); } 70 | return isShore; 71 | } 72 | } 73 | 74 | public static Dictionary 75 | Index = new Dictionary(); 76 | 77 | private IslandTileCorner downSlopeCorner; 78 | 79 | private bool isWater = false; 80 | private bool calcedWater = false; 81 | private bool calcedMoisture = false; 82 | private bool isShore = false; 83 | private bool calcedShore = false; 84 | private float moisture; 85 | 86 | public IslandTileCorner (Vector p) 87 | { 88 | adjacent = new HashSet(); 89 | protrudes = new HashSet(); 90 | touches = new HashSet(); 91 | position = p; 92 | elevation = Mathf.Infinity; 93 | 94 | Index[p] = this; 95 | } 96 | 97 | public static IslandTileCorner GetDownSlopeCorner(IslandTileCorner corner) 98 | { 99 | float lowestY = corner.ElevatedPosition.y; 100 | IslandTileCorner downCorner = corner; 101 | 102 | foreach (IslandTileCorner c in corner.adjacent) 103 | { 104 | float cornerY = c.ElevatedPosition.y; 105 | if (cornerY < lowestY) 106 | { 107 | downCorner = c; 108 | lowestY = cornerY; 109 | } 110 | } 111 | 112 | return downCorner; 113 | } 114 | 115 | private void CalcWater () 116 | { 117 | isWater = false; 118 | foreach (IslandTile t in touches) 119 | { 120 | if (t.IsWater) { isWater = true; } 121 | } 122 | calcedWater = true; 123 | } 124 | 125 | private void CalcShore () 126 | { 127 | bool hasWater = false; 128 | bool hasLand = false; 129 | foreach (IslandTile t in touches) 130 | { 131 | if (t.IsWater) { hasWater = true; } 132 | else { hasLand = true; } 133 | } 134 | 135 | isShore = hasWater && hasLand; 136 | calcedShore = true; 137 | } 138 | 139 | private float CalcMoisture () 140 | { 141 | moisture = 0; 142 | foreach (IslandTile t in touches) 143 | { 144 | moisture += (t.BaseMoisture / t.corners.Count); 145 | } 146 | 147 | foreach (IslandTileCorner c in adjacent) 148 | { 149 | if (c.DownSlopeCorner == this) 150 | { 151 | moisture += c.moisture * moistureFlowRate; 152 | } 153 | } 154 | 155 | calcedMoisture = true; 156 | return moisture; 157 | } 158 | } -------------------------------------------------------------------------------- /Assets/IslandGenerator/Scripts/IslandGenerator/IslandTileCorner.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 00a93cb5af1c07c4aa24a22296dad8fb 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/IslandGenerator/Scripts/IslandGenerator/IslandTileEdge.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | using BenTools.Mathematics; 5 | using BenTools.Data; 6 | 7 | public class IslandTileEdge 8 | { 9 | public HashSet neighbors = new HashSet(); 10 | public VoronoiEdge edge; 11 | 12 | public IslandTileCorner cornerA; 13 | public IslandTileCorner cornerB; 14 | 15 | public IslandTileEdge (VoronoiEdge e) 16 | { 17 | edge = e; 18 | 19 | // Corner Index are assumed to be populated from IslandTile 20 | cornerA = IslandTileCorner.Index[e.VVertexA]; 21 | cornerB = IslandTileCorner.Index[e.VVertexB]; 22 | } 23 | } -------------------------------------------------------------------------------- /Assets/IslandGenerator/Scripts/IslandGenerator/IslandTileEdge.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9918e5478b650cf4ab9f9b70da10fd2c 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/IslandGenerator/Scripts/IslandGenerator/IslandVegetation.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | 5 | public class IslandVegetation : MonoBehaviour 6 | { 7 | public Material vegetationMaterial; 8 | public float density = 0.65f; 9 | public string vegetationName; 10 | public float scale = 0.1f; 11 | public float maxParticles = 3000; 12 | public float minSlope = 0.2f; 13 | 14 | public AnimationCurve moistureTolerance; 15 | public AnimationCurve altitudeTolerance; 16 | 17 | private ParticleRenderer particleRenderer; 18 | private ParticleEmitter pEmitter; 19 | private MeshFilter meshFilter; 20 | 21 | private Island island; 22 | private Transform t; 23 | private float lifetime = 100000; 24 | 25 | void Awake () 26 | { 27 | t = gameObject.GetComponent(); 28 | island = (Island) gameObject.GetComponent(); 29 | } 30 | 31 | public void SpawnVegetation () 32 | { 33 | CreateParticleSystem(); 34 | EmitParticles(); 35 | } 36 | 37 | void CreateParticleSystem () 38 | { 39 | GameObject pSysGo = new GameObject(vegetationName); 40 | string emitterType = "MeshParticleEmitter"; 41 | 42 | pSysGo.GetComponent().parent = t; 43 | 44 | meshFilter = pSysGo.AddComponent(); 45 | meshFilter.mesh = island.IslandMesh; 46 | 47 | pEmitter = (ParticleEmitter) pSysGo.AddComponent(emitterType); 48 | particleRenderer = pSysGo.AddComponent(); 49 | 50 | particleRenderer.renderer.sharedMaterial = vegetationMaterial; 51 | particleRenderer.maxParticleSize = 0.01f; 52 | particleRenderer.particleRenderMode = ParticleRenderMode.VerticalBillboard; 53 | 54 | pEmitter.maxEmission = maxParticles; 55 | 56 | pEmitter.emit = false; 57 | } 58 | 59 | void EmitParticles () 60 | { 61 | foreach (IslandTile tile in island.GetLargestIsland()) 62 | { 63 | // Too Steep? 64 | if (Mathf.Abs(tile.Normal.y) < minSlope) { continue; } 65 | 66 | float baseMoisture = tile.BaseMoisture; 67 | float alt = tile.Elevation / island.Scale; 68 | float altitudeModifier = altitudeTolerance.Evaluate(alt); 69 | float moistureModifier = moistureTolerance.Evaluate(baseMoisture); 70 | float comfortModifier = density * 71 | Random.value * 72 | moistureModifier * 73 | altitudeModifier; 74 | 75 | int numLoops = (int) (100 * comfortModifier); 76 | 77 | for (int i = 0; i < numLoops; i++) 78 | { 79 | Vector3 position = tile.RandomFacePosition(); 80 | 81 | pEmitter.Emit ( position, 82 | Vector3.zero, 83 | scale * Random.value, 84 | lifetime, 85 | Color.white); 86 | } 87 | } 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /Assets/IslandGenerator/Scripts/IslandGenerator/IslandVegetation.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c35d6d819d7fe73428a24d84728b13e4 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/IslandGenerator/Scripts/Meta.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9a709c3c576e1ff46b8be91f6f8526a9 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/IslandGenerator/Scripts/Meta/World.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System; 3 | using System.Collections; 4 | using CoherentNoise; 5 | using CoherentNoise.Generation; 6 | using CoherentNoise.Generation.Displacement; 7 | using CoherentNoise.Generation.Fractal; 8 | using CoherentNoise.Generation.Modification; 9 | using CoherentNoise.Generation.Patterns; 10 | using CoherentNoise.Texturing; 11 | using Random = UnityEngine.Random; 12 | 13 | public class World : MonoBehaviour 14 | { 15 | 16 | public static int worldSeed; 17 | 18 | private static World instance; 19 | private Generator worldNoise; 20 | 21 | void Awake () 22 | { 23 | instance = this; 24 | worldSeed = (int) (Random.value * System.DateTime.Now.Ticks); 25 | Random.seed = worldSeed; 26 | Time.timeScale = 1f; 27 | GenerateWorld (); 28 | } 29 | 30 | public void GenerateWorld () 31 | { 32 | worldNoise = new RidgeNoise(worldSeed) + new BillowNoise(worldSeed); 33 | } 34 | 35 | public Generator GetNoiseAt (Vector3 pos) 36 | { 37 | return new Translate(worldNoise, pos); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /Assets/IslandGenerator/Scripts/Meta/World.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1d5f80cc840b142cf98f6ed237822485 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/IslandGenerator/Shaders.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 05aa3fc8015d6b54f9d6d4dbdd8a6145 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/IslandGenerator/Shaders/IslandShader.sgraph.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3f31b661ebc0c4a4c9d5ae1dd7890a65 3 | DefaultImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/IslandGenerator/Shaders/IslandShader.shader: -------------------------------------------------------------------------------- 1 | Shader "IslandShader" 2 | { 3 | Properties 4 | { 5 | _Ramp("_Ramp", 2D) = "black" {} 6 | _ZeroPos("_ZeroPos", Vector) = (0,0,0,0) 7 | _CliffColor("_CliffColor", Color) = (1,1,1,1) 8 | _Scale("_Scale", Float) = 1 9 | 10 | } 11 | 12 | SubShader 13 | { 14 | Tags 15 | { 16 | "Queue"="Geometry" 17 | "IgnoreProjector"="False" 18 | "RenderType"="Opaque" 19 | 20 | } 21 | 22 | 23 | Cull Back 24 | ZWrite On 25 | ZTest LEqual 26 | ColorMask RGBA 27 | LOD 100 28 | Fog{ 29 | } 30 | 31 | 32 | CGPROGRAM 33 | #pragma surface surf BlinnPhongEditor vertex:vert 34 | #pragma target 2.0 35 | 36 | 37 | sampler2D _Ramp; 38 | float4 _ZeroPos; 39 | float4 _CliffColor; 40 | float _Scale; 41 | 42 | struct EditorSurfaceOutput { 43 | half3 Albedo; 44 | half3 Normal; 45 | half3 Emission; 46 | half3 Gloss; 47 | half Specular; 48 | half Alpha; 49 | half4 Custom; 50 | }; 51 | 52 | inline half4 LightingBlinnPhongEditor_PrePass (EditorSurfaceOutput s, half4 light) 53 | { 54 | half3 spec = light.a * s.Gloss; 55 | half4 c; 56 | c.rgb = (s.Albedo * light.rgb + light.rgb * spec); 57 | c.a = s.Alpha; 58 | return c; 59 | 60 | } 61 | 62 | inline half4 LightingBlinnPhongEditor (EditorSurfaceOutput s, half3 lightDir, half3 viewDir, half atten) 63 | { 64 | half3 h = normalize (lightDir + viewDir); 65 | 66 | half diff = max (0, dot ( lightDir, s.Normal )); 67 | 68 | float nh = max (0, dot (s.Normal, h)); 69 | float spec = pow (nh, s.Specular*128.0); 70 | 71 | half4 res; 72 | res.rgb = _LightColor0.rgb * diff; 73 | res.w = spec * Luminance (_LightColor0.rgb); 74 | res *= atten * 2.0; 75 | 76 | return LightingBlinnPhongEditor_PrePass( s, res ); 77 | } 78 | 79 | struct Input { 80 | float3 sWorldNormal; 81 | float3 worldPos; 82 | float4 fullMeshUV2; 83 | 84 | }; 85 | 86 | void vert (inout appdata_full v, out Input o) { 87 | UNITY_INITIALIZE_OUTPUT(Input,o); 88 | float4 VertexOutputMaster0_0_NoInput = float4(0,0,0,0); 89 | float4 VertexOutputMaster0_1_NoInput = float4(0,0,0,0); 90 | float4 VertexOutputMaster0_2_NoInput = float4(0,0,0,0); 91 | float4 VertexOutputMaster0_3_NoInput = float4(0,0,0,0); 92 | 93 | o.sWorldNormal = mul((float3x3)_Object2World, SCALED_NORMAL); 94 | o.fullMeshUV2 = v.texcoord1; 95 | 96 | } 97 | 98 | 99 | void surf (Input IN, inout EditorSurfaceOutput o) { 100 | o.Normal = float3(0.0,0.0,1.0); 101 | o.Alpha = 1.0; 102 | o.Albedo = 0.0; 103 | o.Emission = 0.0; 104 | o.Gloss = 0.0; 105 | o.Specular = 0.0; 106 | o.Custom = 0.0; 107 | 108 | float4 Swizzle1=float4(float4( IN.sWorldNormal.x, IN.sWorldNormal.y,IN.sWorldNormal.z,1.0 ).y, float4( IN.sWorldNormal.x, IN.sWorldNormal.y,IN.sWorldNormal.z,1.0 ).y, float4( IN.sWorldNormal.x, IN.sWorldNormal.y,IN.sWorldNormal.z,1.0 ).y, float4( IN.sWorldNormal.x, IN.sWorldNormal.y,IN.sWorldNormal.z,1.0 ).y); 109 | float4 Subtract1=float4( 1.0, 1.0, 1.0, 1.0 ) - Swizzle1; 110 | float4 Multiply1=Subtract1 * _CliffColor; 111 | float4 Divide0=float4( 1.0, 1.0, 1.0, 1.0 ) / _Scale.xxxx; 112 | float4 Multiply3=float4( 10,10,10,10 ) * Divide0; 113 | float4 Subtract0=float4( IN.worldPos.x, IN.worldPos.y,IN.worldPos.z,1.0 ) - _ZeroPos; 114 | float4 Swizzle0=float4(Subtract0.y, Subtract0.y, Subtract0.y, Subtract0.y); 115 | float4 Multiply0=Multiply3 * Swizzle0; 116 | float4 Swizzle3=float4((IN.fullMeshUV2).x, (IN.fullMeshUV2).x, (IN.fullMeshUV2).x, (IN.fullMeshUV2).x); 117 | float4 Multiply4=float4( 0.05,0.05,0.05,0.05 ) * Swizzle3; 118 | float4 Add1=Multiply0 + Multiply4; 119 | float4 Swizzle2=float4((IN.fullMeshUV2).y, (IN.fullMeshUV2).y, (IN.fullMeshUV2).y, (IN.fullMeshUV2).y); 120 | float4 Assemble0_2_NoInput = float4(0,0,0,0); 121 | float4 Assemble0_3_NoInput = float4(0,0,0,0); 122 | float4 Assemble0=float4(Add1.x, Swizzle2.y, Assemble0_2_NoInput.z, Assemble0_3_NoInput.w); 123 | float4 Tex2D0=tex2D(_Ramp,Assemble0.xy); 124 | float4 Multiply2=Swizzle1 * Tex2D0; 125 | float4 Add0=Multiply1 + Multiply2; 126 | float4 Master0_1_NoInput = float4(0,0,1,1); 127 | float4 Master0_2_NoInput = float4(0,0,0,0); 128 | float4 Master0_3_NoInput = float4(0,0,0,0); 129 | float4 Master0_4_NoInput = float4(0,0,0,0); 130 | float4 Master0_5_NoInput = float4(1,1,1,1); 131 | float4 Master0_7_NoInput = float4(0,0,0,0); 132 | float4 Master0_6_NoInput = float4(1,1,1,1); 133 | o.Albedo = Add0; 134 | 135 | o.Normal = normalize(o.Normal); 136 | } 137 | ENDCG 138 | } 139 | Fallback "Diffuse" 140 | } -------------------------------------------------------------------------------- /Assets/IslandGenerator/Shaders/IslandShader.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dd6c0ddbb946a46268144cb96f844c08 3 | ShaderImporter: 4 | defaultTextures: 5 | - _Ramp: {fileID: 2800000, guid: 2fa488d2d99d27c4a80d8eefdc0916b3, type: 3} 6 | userData: 7 | -------------------------------------------------------------------------------- /Assets/IslandGenerator/Textures.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c05e9055a02f70548a935165e9ddfa9a 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/IslandGenerator/Textures/IslandRamp.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaellasky/ManyLandsGenerator/932989d0dacb2dadeda5502fa2294990f7d378b7/Assets/IslandGenerator/Textures/IslandRamp.psd -------------------------------------------------------------------------------- /Assets/IslandGenerator/Textures/IslandRamp.psd.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2fa488d2d99d27c4a80d8eefdc0916b3 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | serializedVersion: 2 6 | mipmaps: 7 | mipMapMode: 0 8 | enableMipMap: 1 9 | linearTexture: 0 10 | correctGamma: 0 11 | fadeOut: 0 12 | borderMipMap: 0 13 | mipMapFadeDistanceStart: 1 14 | mipMapFadeDistanceEnd: 3 15 | bumpmap: 16 | convertToNormalMap: 0 17 | externalNormalMap: 0 18 | heightScale: .25 19 | normalMapFilter: 0 20 | isReadable: 0 21 | grayScaleToAlpha: 0 22 | generateCubemap: 0 23 | seamlessCubemap: 0 24 | textureFormat: -1 25 | maxTextureSize: 1024 26 | textureSettings: 27 | filterMode: -1 28 | aniso: -1 29 | mipBias: -1 30 | wrapMode: 1 31 | nPOTScale: 1 32 | lightmap: 0 33 | compressionQuality: 50 34 | spriteMode: 0 35 | spriteExtrude: 1 36 | spriteMeshType: 1 37 | alignment: 0 38 | spritePivot: {x: .5, y: .5} 39 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 40 | spritePixelsToUnits: 100 41 | alphaIsTransparency: 0 42 | textureType: -1 43 | buildTargetSettings: [] 44 | spriteSheet: 45 | sprites: [] 46 | spritePackingTag: 47 | userData: 48 | -------------------------------------------------------------------------------- /Assets/IslandGenerator/Textures/pine_group_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaellasky/ManyLandsGenerator/932989d0dacb2dadeda5502fa2294990f7d378b7/Assets/IslandGenerator/Textures/pine_group_1.png -------------------------------------------------------------------------------- /Assets/IslandGenerator/Textures/pine_group_1.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d41267b0f76a23745af1a3b40e01814d 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | serializedVersion: 2 6 | mipmaps: 7 | mipMapMode: 0 8 | enableMipMap: 1 9 | linearTexture: 0 10 | correctGamma: 0 11 | fadeOut: 0 12 | borderMipMap: 0 13 | mipMapFadeDistanceStart: 1 14 | mipMapFadeDistanceEnd: 3 15 | bumpmap: 16 | convertToNormalMap: 0 17 | externalNormalMap: 0 18 | heightScale: .25 19 | normalMapFilter: 0 20 | isReadable: 0 21 | grayScaleToAlpha: 0 22 | generateCubemap: 0 23 | seamlessCubemap: 0 24 | textureFormat: -1 25 | maxTextureSize: 1024 26 | textureSettings: 27 | filterMode: -1 28 | aniso: -1 29 | mipBias: -1 30 | wrapMode: -1 31 | nPOTScale: 1 32 | lightmap: 0 33 | compressionQuality: 50 34 | spriteMode: 0 35 | spriteExtrude: 1 36 | spriteMeshType: 1 37 | alignment: 0 38 | spritePivot: {x: .5, y: .5} 39 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 40 | spritePixelsToUnits: 100 41 | alphaIsTransparency: 1 42 | textureType: -1 43 | buildTargetSettings: [] 44 | spriteSheet: 45 | sprites: [] 46 | spritePackingTag: 47 | userData: 48 | -------------------------------------------------------------------------------- /Assets/IslandGenerator/Textures/trop_plant_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaellasky/ManyLandsGenerator/932989d0dacb2dadeda5502fa2294990f7d378b7/Assets/IslandGenerator/Textures/trop_plant_1.png -------------------------------------------------------------------------------- /Assets/IslandGenerator/Textures/trop_plant_1.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1c9ddadb58b1f0d43918c4c6770a2e8e 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | serializedVersion: 2 6 | mipmaps: 7 | mipMapMode: 0 8 | enableMipMap: 1 9 | linearTexture: 0 10 | correctGamma: 0 11 | fadeOut: 0 12 | borderMipMap: 0 13 | mipMapFadeDistanceStart: 1 14 | mipMapFadeDistanceEnd: 3 15 | bumpmap: 16 | convertToNormalMap: 0 17 | externalNormalMap: 0 18 | heightScale: .25 19 | normalMapFilter: 0 20 | isReadable: 0 21 | grayScaleToAlpha: 0 22 | generateCubemap: 0 23 | seamlessCubemap: 0 24 | textureFormat: -1 25 | maxTextureSize: 1024 26 | textureSettings: 27 | filterMode: -1 28 | aniso: -1 29 | mipBias: -1 30 | wrapMode: -1 31 | nPOTScale: 1 32 | lightmap: 0 33 | compressionQuality: 50 34 | spriteMode: 0 35 | spriteExtrude: 1 36 | spriteMeshType: 1 37 | alignment: 0 38 | spritePivot: {x: .5, y: .5} 39 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 40 | spritePixelsToUnits: 100 41 | alphaIsTransparency: 1 42 | textureType: -1 43 | buildTargetSettings: [] 44 | spriteSheet: 45 | sprites: [] 46 | spritePackingTag: 47 | userData: 48 | -------------------------------------------------------------------------------- /Assets/Standard Assets.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ceaf343b9c4de974c8091a580d4a5610 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3cadc5c144b6941fd9b94e6f6cbaa3cc 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Scripts/Camera Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6685d213dcd37451eaa7643f63089046 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Scripts/Camera Scripts/MouseOrbit.js: -------------------------------------------------------------------------------- 1 | var target : Transform; 2 | var distance = 10.0; 3 | 4 | var xSpeed = 250.0; 5 | var ySpeed = 120.0; 6 | 7 | var yMinLimit = -20; 8 | var yMaxLimit = 80; 9 | 10 | private var x = 0.0; 11 | private var y = 0.0; 12 | 13 | @script AddComponentMenu("Camera-Control/Mouse Orbit") 14 | 15 | function Start () { 16 | var angles = transform.eulerAngles; 17 | x = angles.y; 18 | y = angles.x; 19 | 20 | // Make the rigid body not change rotation 21 | if (GetComponent.()) 22 | GetComponent.().freezeRotation = true; 23 | } 24 | 25 | function LateUpdate () { 26 | if (target) { 27 | x += Input.GetAxis("Mouse X") * xSpeed * 0.02; 28 | y -= Input.GetAxis("Mouse Y") * ySpeed * 0.02; 29 | 30 | y = ClampAngle(y, yMinLimit, yMaxLimit); 31 | 32 | var rotation = Quaternion.Euler(y, x, 0); 33 | var position = rotation * Vector3(0.0, 0.0, -distance) + target.position; 34 | 35 | transform.rotation = rotation; 36 | transform.position = position; 37 | } 38 | } 39 | 40 | static function ClampAngle (angle : float, min : float, max : float) { 41 | if (angle < -360) 42 | angle += 360; 43 | if (angle > 360) 44 | angle -= 360; 45 | return Mathf.Clamp (angle, min, max); 46 | } -------------------------------------------------------------------------------- /Assets/Standard Assets/Scripts/Camera Scripts/MouseOrbit.js.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 27acebc9ad1110f6d00074c88d76c639 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Scripts/Camera Scripts/SmoothFollow.js: -------------------------------------------------------------------------------- 1 | /* 2 | This camera smoothes out rotation around the y-axis and height. 3 | Horizontal Distance to the target is always fixed. 4 | 5 | There are many different ways to smooth the rotation but doing it this way gives you a lot of control over how the camera behaves. 6 | 7 | For every of those smoothed values we calculate the wanted value and the current value. 8 | Then we smooth it using the Lerp function. 9 | Then we apply the smoothed values to the transform's position. 10 | */ 11 | 12 | // The target we are following 13 | var target : Transform; 14 | // The distance in the x-z plane to the target 15 | var distance = 10.0; 16 | // the height we want the camera to be above the target 17 | var height = 5.0; 18 | // How much we 19 | var heightDamping = 2.0; 20 | var rotationDamping = 3.0; 21 | 22 | // Place the script in the Camera-Control group in the component menu 23 | @script AddComponentMenu("Camera-Control/Smooth Follow") 24 | 25 | 26 | function LateUpdate () { 27 | // Early out if we don't have a target 28 | if (!target) 29 | return; 30 | 31 | // Calculate the current rotation angles 32 | var wantedRotationAngle = target.eulerAngles.y; 33 | var wantedHeight = target.position.y + height; 34 | 35 | var currentRotationAngle = transform.eulerAngles.y; 36 | var currentHeight = transform.position.y; 37 | 38 | // Damp the rotation around the y-axis 39 | currentRotationAngle = Mathf.LerpAngle (currentRotationAngle, wantedRotationAngle, rotationDamping * Time.deltaTime); 40 | 41 | // Damp the height 42 | currentHeight = Mathf.Lerp (currentHeight, wantedHeight, heightDamping * Time.deltaTime); 43 | 44 | // Convert the angle into a rotation 45 | var currentRotation = Quaternion.Euler (0, currentRotationAngle, 0); 46 | 47 | // Set the position of the camera on the x-z plane to: 48 | // distance meters behind the target 49 | transform.position = target.position; 50 | transform.position -= currentRotation * Vector3.forward * distance; 51 | 52 | // Set the height of the camera 53 | transform.position.y = currentHeight; 54 | 55 | // Always look at the target 56 | transform.LookAt (target); 57 | } -------------------------------------------------------------------------------- /Assets/Standard Assets/Scripts/Camera Scripts/SmoothFollow.js.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 885b1972ad11a921d000d37b8d76c639 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Scripts/Camera Scripts/SmoothLookAt.js: -------------------------------------------------------------------------------- 1 | var target : Transform; 2 | var damping = 6.0; 3 | var smooth = true; 4 | 5 | @script AddComponentMenu("Camera-Control/Smooth Look At") 6 | 7 | function LateUpdate () { 8 | if (target) { 9 | if (smooth) 10 | { 11 | // Look at and dampen the rotation 12 | var rotation = Quaternion.LookRotation(target.position - transform.position); 13 | transform.rotation = Quaternion.Slerp(transform.rotation, rotation, Time.deltaTime * damping); 14 | } 15 | else 16 | { 17 | // Just lookat 18 | transform.LookAt(target); 19 | } 20 | } 21 | } 22 | 23 | function Start () { 24 | // Make the rigid body not change rotation 25 | if (GetComponent.()) 26 | GetComponent.().freezeRotation = true; 27 | } -------------------------------------------------------------------------------- /Assets/Standard Assets/Scripts/Camera Scripts/SmoothLookAt.js.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8a4debc9ad1110f6d00074c88d76c639 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Scripts/General Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8636e662e0f7d440fa257e9dce592504 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Scripts/General Scripts/ActivateTrigger.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | public class ActivateTrigger : MonoBehaviour { 4 | public enum Mode { 5 | Trigger = 0, // Just broadcast the action on to the target 6 | Replace = 1, // replace target with source 7 | Activate = 2, // Activate the target GameObject 8 | Enable = 3, // Enable a component 9 | Animate = 4, // Start animation on target 10 | Deactivate= 5 // Decativate target GameObject 11 | } 12 | 13 | /// The action to accomplish 14 | public Mode action = Mode.Activate; 15 | 16 | /// The game object to affect. If none, the trigger work on this game object 17 | public Object target; 18 | public GameObject source; 19 | public int triggerCount = 1;/// 20 | public bool repeatTrigger = false; 21 | 22 | void DoActivateTrigger () { 23 | triggerCount--; 24 | 25 | if (triggerCount == 0 || repeatTrigger) { 26 | Object currentTarget = target != null ? target : gameObject; 27 | Behaviour targetBehaviour = currentTarget as Behaviour; 28 | GameObject targetGameObject = currentTarget as GameObject; 29 | if (targetBehaviour != null) 30 | targetGameObject = targetBehaviour.gameObject; 31 | 32 | switch (action) { 33 | case Mode.Trigger: 34 | targetGameObject.BroadcastMessage ("DoActivateTrigger"); 35 | break; 36 | case Mode.Replace: 37 | if (source != null) { 38 | Object.Instantiate (source, targetGameObject.transform.position, targetGameObject.transform.rotation); 39 | DestroyObject (targetGameObject); 40 | } 41 | break; 42 | case Mode.Activate: 43 | targetGameObject.SetActive(true); 44 | break; 45 | case Mode.Enable: 46 | if (targetBehaviour != null) 47 | targetBehaviour.enabled = true; 48 | break; 49 | case Mode.Animate: 50 | targetGameObject.GetComponent().Play (); 51 | break; 52 | case Mode.Deactivate: 53 | targetGameObject.SetActive(false); 54 | break; 55 | } 56 | } 57 | } 58 | 59 | void OnTriggerEnter (Collider other) { 60 | DoActivateTrigger (); 61 | } 62 | } -------------------------------------------------------------------------------- /Assets/Standard Assets/Scripts/General Scripts/ActivateTrigger.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c8634e062924929664361c08745211fb 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Scripts/General Scripts/DragRigidbody.js: -------------------------------------------------------------------------------- 1 | var spring = 50.0; 2 | var damper = 5.0; 3 | var drag = 10.0; 4 | var angularDrag = 5.0; 5 | var distance = 0.2; 6 | var attachToCenterOfMass = false; 7 | 8 | private var springJoint : SpringJoint; 9 | 10 | function Update () 11 | { 12 | // Make sure the user pressed the mouse down 13 | if (!Input.GetMouseButtonDown (0)) 14 | return; 15 | 16 | var mainCamera = FindCamera(); 17 | 18 | // We need to actually hit an object 19 | var hit : RaycastHit; 20 | if (!Physics.Raycast(mainCamera.ScreenPointToRay(Input.mousePosition), hit, 100)) 21 | return; 22 | // We need to hit a rigidbody that is not kinematic 23 | if (!hit.rigidbody || hit.rigidbody.isKinematic) 24 | return; 25 | 26 | if (!springJoint) 27 | { 28 | var go = new GameObject("Rigidbody dragger"); 29 | var body : Rigidbody = go.AddComponent ("Rigidbody") as Rigidbody; 30 | springJoint = go.AddComponent ("SpringJoint"); 31 | body.isKinematic = true; 32 | } 33 | 34 | springJoint.transform.position = hit.point; 35 | if (attachToCenterOfMass) 36 | { 37 | var anchor = transform.TransformDirection(hit.rigidbody.centerOfMass) + hit.rigidbody.transform.position; 38 | anchor = springJoint.transform.InverseTransformPoint(anchor); 39 | springJoint.anchor = anchor; 40 | } 41 | else 42 | { 43 | springJoint.anchor = Vector3.zero; 44 | } 45 | 46 | springJoint.spring = spring; 47 | springJoint.damper = damper; 48 | springJoint.maxDistance = distance; 49 | springJoint.connectedBody = hit.rigidbody; 50 | 51 | StartCoroutine ("DragObject", hit.distance); 52 | } 53 | 54 | function DragObject (distance : float) 55 | { 56 | var oldDrag = springJoint.connectedBody.drag; 57 | var oldAngularDrag = springJoint.connectedBody.angularDrag; 58 | springJoint.connectedBody.drag = drag; 59 | springJoint.connectedBody.angularDrag = angularDrag; 60 | var mainCamera = FindCamera(); 61 | while (Input.GetMouseButton (0)) 62 | { 63 | var ray = mainCamera.ScreenPointToRay (Input.mousePosition); 64 | springJoint.transform.position = ray.GetPoint(distance); 65 | yield; 66 | } 67 | if (springJoint.connectedBody) 68 | { 69 | springJoint.connectedBody.drag = oldDrag; 70 | springJoint.connectedBody.angularDrag = oldAngularDrag; 71 | springJoint.connectedBody = null; 72 | } 73 | } 74 | 75 | function FindCamera () 76 | { 77 | if (GetComponent.()) 78 | return GetComponent.(); 79 | else 80 | return Camera.main; 81 | } -------------------------------------------------------------------------------- /Assets/Standard Assets/Scripts/General Scripts/DragRigidbody.js.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cae09c86ad1122e5d0006ac98d76c639 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/StrumpyShaderEditor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8a5e81b3b38bc754d9a71b5e4896fab3 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/StrumpyShaderEditor/Documentation.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 30211f30285d04e249ff32a40f8b454e 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/StrumpyShaderEditor/Documentation/KeyBindings.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaellasky/ManyLandsGenerator/932989d0dacb2dadeda5502fa2294990f7d378b7/Assets/StrumpyShaderEditor/Documentation/KeyBindings.pdf -------------------------------------------------------------------------------- /Assets/StrumpyShaderEditor/Documentation/KeyBindings.pdf.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6fdba7514452d48be84228e2e11a9d7d 3 | DefaultImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/StrumpyShaderEditor/Documentation/ShaderEditorDoc.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaellasky/ManyLandsGenerator/932989d0dacb2dadeda5502fa2294990f7d378b7/Assets/StrumpyShaderEditor/Documentation/ShaderEditorDoc.pdf -------------------------------------------------------------------------------- /Assets/StrumpyShaderEditor/Documentation/ShaderEditorDoc.pdf.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 61f80d97a3249450985da4b5182f6f95 3 | DefaultImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/StrumpyShaderEditor/Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8315ce109aa6d4bdd8e31f258822c598 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/StrumpyShaderEditor/Editor/Resources.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 63a6181c3bb7047a0b237ac68ef26946 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/StrumpyShaderEditor/Editor/Resources/Internal.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2b7667388f84d46ac8b6b1a7f237709b 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/StrumpyShaderEditor/Editor/Resources/Internal/1x2AA.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaellasky/ManyLandsGenerator/932989d0dacb2dadeda5502fa2294990f7d378b7/Assets/StrumpyShaderEditor/Editor/Resources/Internal/1x2AA.png -------------------------------------------------------------------------------- /Assets/StrumpyShaderEditor/Editor/Resources/Internal/1x2AA.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 64635199e4c2840a582ec04a83c45950 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | serializedVersion: 2 6 | mipmaps: 7 | mipMapMode: 0 8 | enableMipMap: 1 9 | linearTexture: 0 10 | correctGamma: 0 11 | fadeOut: 0 12 | borderMipMap: 0 13 | mipMapFadeDistanceStart: 1 14 | mipMapFadeDistanceEnd: 3 15 | bumpmap: 16 | convertToNormalMap: 0 17 | externalNormalMap: 0 18 | heightScale: .25 19 | normalMapFilter: 0 20 | isReadable: 0 21 | grayScaleToAlpha: 0 22 | generateCubemap: 0 23 | seamlessCubemap: 0 24 | textureFormat: -1 25 | maxTextureSize: 1024 26 | textureSettings: 27 | filterMode: 1 28 | aniso: 1 29 | mipBias: -1 30 | wrapMode: 0 31 | nPOTScale: 1 32 | lightmap: 0 33 | compressionQuality: 50 34 | spriteMode: 0 35 | spriteExtrude: 1 36 | spriteMeshType: 1 37 | alignment: 0 38 | spritePivot: {x: .5, y: .5} 39 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 40 | spritePixelsToUnits: 100 41 | alphaIsTransparency: 0 42 | textureType: 0 43 | buildTargetSettings: [] 44 | spriteSheet: 45 | sprites: [] 46 | spritePackingTag: 47 | userData: 48 | -------------------------------------------------------------------------------- /Assets/StrumpyShaderEditor/Editor/Resources/Internal/Checker.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaellasky/ManyLandsGenerator/932989d0dacb2dadeda5502fa2294990f7d378b7/Assets/StrumpyShaderEditor/Editor/Resources/Internal/Checker.mat -------------------------------------------------------------------------------- /Assets/StrumpyShaderEditor/Editor/Resources/Internal/Checker.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 43440e364853049b59b577dcb1305aad 3 | NativeFormatImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/StrumpyShaderEditor/Editor/Resources/Internal/Delete.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaellasky/ManyLandsGenerator/932989d0dacb2dadeda5502fa2294990f7d378b7/Assets/StrumpyShaderEditor/Editor/Resources/Internal/Delete.tga -------------------------------------------------------------------------------- /Assets/StrumpyShaderEditor/Editor/Resources/Internal/Delete.tga.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ae5b84fae418147b29f33453688905cd 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | serializedVersion: 2 6 | mipmaps: 7 | mipMapMode: 0 8 | enableMipMap: 0 9 | linearTexture: 1 10 | correctGamma: 0 11 | fadeOut: 0 12 | borderMipMap: 0 13 | mipMapFadeDistanceStart: 1 14 | mipMapFadeDistanceEnd: 3 15 | bumpmap: 16 | convertToNormalMap: 0 17 | externalNormalMap: 0 18 | heightScale: .25 19 | normalMapFilter: 0 20 | isReadable: 0 21 | grayScaleToAlpha: 0 22 | generateCubemap: 0 23 | seamlessCubemap: 0 24 | textureFormat: -1 25 | maxTextureSize: 1024 26 | textureSettings: 27 | filterMode: -1 28 | aniso: 1 29 | mipBias: -1 30 | wrapMode: 1 31 | nPOTScale: 0 32 | lightmap: 0 33 | compressionQuality: 50 34 | spriteMode: 0 35 | spriteExtrude: 1 36 | spriteMeshType: 1 37 | alignment: 0 38 | spritePivot: {x: .5, y: .5} 39 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 40 | spritePixelsToUnits: 100 41 | alphaIsTransparency: 1 42 | textureType: 2 43 | buildTargetSettings: [] 44 | spriteSheet: 45 | sprites: [] 46 | spritePackingTag: 47 | userData: 48 | -------------------------------------------------------------------------------- /Assets/StrumpyShaderEditor/Editor/Resources/Internal/Down.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaellasky/ManyLandsGenerator/932989d0dacb2dadeda5502fa2294990f7d378b7/Assets/StrumpyShaderEditor/Editor/Resources/Internal/Down.tga -------------------------------------------------------------------------------- /Assets/StrumpyShaderEditor/Editor/Resources/Internal/Down.tga.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8e665c7a02fcb46dda3f6d5fb2a9567e 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | serializedVersion: 2 6 | mipmaps: 7 | mipMapMode: 0 8 | enableMipMap: 0 9 | linearTexture: 1 10 | correctGamma: 0 11 | fadeOut: 0 12 | borderMipMap: 0 13 | mipMapFadeDistanceStart: 1 14 | mipMapFadeDistanceEnd: 3 15 | bumpmap: 16 | convertToNormalMap: 0 17 | externalNormalMap: 0 18 | heightScale: .25 19 | normalMapFilter: 0 20 | isReadable: 0 21 | grayScaleToAlpha: 0 22 | generateCubemap: 0 23 | seamlessCubemap: 0 24 | textureFormat: -1 25 | maxTextureSize: 1024 26 | textureSettings: 27 | filterMode: -1 28 | aniso: 1 29 | mipBias: -1 30 | wrapMode: 1 31 | nPOTScale: 0 32 | lightmap: 0 33 | compressionQuality: 50 34 | spriteMode: 0 35 | spriteExtrude: 1 36 | spriteMeshType: 1 37 | alignment: 0 38 | spritePivot: {x: .5, y: .5} 39 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 40 | spritePixelsToUnits: 100 41 | alphaIsTransparency: 1 42 | textureType: 2 43 | buildTargetSettings: [] 44 | spriteSheet: 45 | sprites: [] 46 | spritePackingTag: 47 | userData: 48 | -------------------------------------------------------------------------------- /Assets/StrumpyShaderEditor/Editor/Resources/Internal/ShaderTemplate.template: -------------------------------------------------------------------------------- 1 | Shader "${ShaderName}" 2 | { 3 | Properties 4 | { 5 | ${ShaderProperties} 6 | } 7 | 8 | SubShader 9 | { 10 | Tags 11 | { 12 | ${Tags} 13 | } 14 | ${GrabPass} 15 | 16 | ${Options} 17 | 18 | CGPROGRAM 19 | #pragma surface surf BlinnPhongEditor ${SurfaceFlags} 20 | ${ShaderPragma} 21 | 22 | 23 | ${ShaderVariableNames} 24 | struct EditorSurfaceOutput { 25 | half3 Albedo; 26 | half3 Normal; 27 | half3 Emission; 28 | half3 Gloss; 29 | half Specular; 30 | half Alpha; 31 | half4 Custom; 32 | }; 33 | 34 | inline half4 LightingBlinnPhongEditor_PrePass (EditorSurfaceOutput s, half4 light) 35 | { 36 | ${LightingFunctionPrePass} 37 | } 38 | 39 | inline half4 LightingBlinnPhongEditor (EditorSurfaceOutput s, half3 lightDir, half3 viewDir, half atten) 40 | { 41 | half3 h = normalize (lightDir + viewDir); 42 | 43 | half diff = max (0, dot ( lightDir, s.Normal )); 44 | 45 | float nh = max (0, dot (s.Normal, h)); 46 | float spec = pow (nh, s.Specular*128.0); 47 | 48 | half4 res; 49 | res.rgb = _LightColor0.rgb * diff; 50 | res.w = spec * Luminance (_LightColor0.rgb); 51 | res *= atten * 2.0; 52 | 53 | return LightingBlinnPhongEditor_PrePass( s, res ); 54 | } 55 | 56 | struct Input { 57 | ${StructInputs} 58 | }; 59 | 60 | void vert (inout appdata_full v, out Input o) { 61 | ${VertexShader} 62 | ${VertexShaderMods} 63 | } 64 | 65 | 66 | void surf (Input IN, inout EditorSurfaceOutput o) { 67 | o.Normal = float3(0.0,0.0,1.0); 68 | o.Alpha = 1.0; 69 | o.Albedo = 0.0; 70 | o.Emission = 0.0; 71 | o.Gloss = 0.0; 72 | o.Specular = 0.0; 73 | o.Custom = 0.0; 74 | 75 | ${SurfaceShader} 76 | o.Normal = normalize(o.Normal); 77 | } 78 | ENDCG 79 | } 80 | Fallback "${Fallback}" 81 | } -------------------------------------------------------------------------------- /Assets/StrumpyShaderEditor/Editor/Resources/Internal/ShaderTemplate.template.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2d63daa7838db4c1d82232ad9d31b398 3 | DefaultImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/StrumpyShaderEditor/Editor/Resources/Internal/Temp.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 36f72a19ce761487d9f0362bef92ef09 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/StrumpyShaderEditor/Editor/Resources/Internal/TextureCopy.shader: -------------------------------------------------------------------------------- 1 | // Upgrade NOTE: replaced 'glstate.matrix.texture[0]' with 'UNITY_MATRIX_TEXTURE0' 2 | 3 | Shader "Hidden/TextureCopy" 4 | { 5 | Properties 6 | { 7 | _MainTex("Main Texture", 2D) = "white" {} 8 | } 9 | 10 | SubShader 11 | { 12 | Tags 13 | { 14 | "Queue"="Background-999" 15 | } 16 | Pass 17 | { 18 | ZTest Always 19 | Cull Off 20 | ZWrite Off 21 | Fog { Mode off } 22 | Blend Off 23 | 24 | CGPROGRAM 25 | #pragma vertex vert 26 | #pragma fragment frag 27 | #pragma fragmentoption ARB_precision_hint_fastest 28 | #include "UnityCG.cginc" 29 | 30 | uniform float4 _MainTex_TexelSize; 31 | v2f_img vert(appdata_img v) 32 | { 33 | v2f_img o; 34 | o.pos = v.vertex; 35 | o.uv = MultiplyUV (UNITY_MATRIX_TEXTURE0, v.texcoord); 36 | return o; 37 | } 38 | 39 | uniform sampler2D _MainTex; 40 | float4 frag (v2f_img i) : COLOR 41 | { 42 | return tex2D(_MainTex, i.uv); 43 | } 44 | ENDCG 45 | } 46 | } 47 | 48 | Fallback off 49 | } -------------------------------------------------------------------------------- /Assets/StrumpyShaderEditor/Editor/Resources/Internal/TextureCopy.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9c6a22ef42de64ace9154bf4ad808de6 3 | ShaderImporter: 4 | defaultTextures: [] 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/StrumpyShaderEditor/Editor/Resources/Internal/Up.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaellasky/ManyLandsGenerator/932989d0dacb2dadeda5502fa2294990f7d378b7/Assets/StrumpyShaderEditor/Editor/Resources/Internal/Up.tga -------------------------------------------------------------------------------- /Assets/StrumpyShaderEditor/Editor/Resources/Internal/Up.tga.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8f33ac809461e4fa681f1eb0d253ff3a 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | serializedVersion: 2 6 | mipmaps: 7 | mipMapMode: 0 8 | enableMipMap: 0 9 | linearTexture: 1 10 | correctGamma: 0 11 | fadeOut: 0 12 | borderMipMap: 0 13 | mipMapFadeDistanceStart: 1 14 | mipMapFadeDistanceEnd: 3 15 | bumpmap: 16 | convertToNormalMap: 0 17 | externalNormalMap: 0 18 | heightScale: .25 19 | normalMapFilter: 0 20 | isReadable: 0 21 | grayScaleToAlpha: 0 22 | generateCubemap: 0 23 | seamlessCubemap: 0 24 | textureFormat: -1 25 | maxTextureSize: 1024 26 | textureSettings: 27 | filterMode: -1 28 | aniso: 1 29 | mipBias: -1 30 | wrapMode: 1 31 | nPOTScale: 0 32 | lightmap: 0 33 | compressionQuality: 50 34 | spriteMode: 0 35 | spriteExtrude: 1 36 | spriteMeshType: 1 37 | alignment: 0 38 | spritePivot: {x: .5, y: .5} 39 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 40 | spritePixelsToUnits: 100 41 | alphaIsTransparency: 1 42 | textureType: 2 43 | buildTargetSettings: [] 44 | spriteSheet: 45 | sprites: [] 46 | spritePackingTag: 47 | userData: 48 | -------------------------------------------------------------------------------- /Assets/StrumpyShaderEditor/Editor/Resources/Internal/checker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaellasky/ManyLandsGenerator/932989d0dacb2dadeda5502fa2294990f7d378b7/Assets/StrumpyShaderEditor/Editor/Resources/Internal/checker.png -------------------------------------------------------------------------------- /Assets/StrumpyShaderEditor/Editor/Resources/Internal/checker.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8226b8aa8a70843c1982f3fd7b498c03 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | serializedVersion: 2 6 | mipmaps: 7 | mipMapMode: 0 8 | enableMipMap: 1 9 | linearTexture: 0 10 | correctGamma: 0 11 | fadeOut: 0 12 | borderMipMap: 0 13 | mipMapFadeDistanceStart: 1 14 | mipMapFadeDistanceEnd: 3 15 | bumpmap: 16 | convertToNormalMap: 0 17 | externalNormalMap: 0 18 | heightScale: .25 19 | normalMapFilter: 0 20 | isReadable: 0 21 | grayScaleToAlpha: 0 22 | generateCubemap: 0 23 | seamlessCubemap: 0 24 | textureFormat: -1 25 | maxTextureSize: 1024 26 | textureSettings: 27 | filterMode: -1 28 | aniso: -1 29 | mipBias: -1 30 | wrapMode: -1 31 | nPOTScale: 1 32 | lightmap: 0 33 | compressionQuality: 50 34 | spriteMode: 0 35 | spriteExtrude: 1 36 | spriteMeshType: 1 37 | alignment: 0 38 | spritePivot: {x: .5, y: .5} 39 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 40 | spritePixelsToUnits: 100 41 | alphaIsTransparency: 0 42 | textureType: -1 43 | buildTargetSettings: [] 44 | spriteSheet: 45 | sprites: [] 46 | spritePackingTag: 47 | userData: 48 | -------------------------------------------------------------------------------- /Assets/StrumpyShaderEditor/Editor/Resources/Public.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2a38bd577b70449f89ee78e906f48352 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/StrumpyShaderEditor/Editor/Resources/Public/Graphs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 736bddf9c30074506a0466a120477030 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/StrumpyShaderEditor/Editor/Resources/Public/Graphs/Distortion.sgraph.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a8c399322fc8d4ab69e37bb9009d63fd 3 | DefaultImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/StrumpyShaderEditor/Editor/Resources/Public/Graphs/NormalMap.sgraph.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d7cb046fa59a44e75b0f9518aa39fcd4 3 | DefaultImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/StrumpyShaderEditor/Editor/Resources/Public/Graphs/RampLighting.sgraph.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e8589c498e87e413b9530c0fa5e9b0d0 3 | DefaultImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/StrumpyShaderEditor/Editor/Resources/Public/Graphs/RimLighting.sgraph.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 179e1c74d5aeb426f8e0a07412f82295 3 | DefaultImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/StrumpyShaderEditor/Editor/Resources/Public/Graphs/VertexModification.sgraph.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f231e688a256a496ebe6ccc68aef4f54 3 | DefaultImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/StrumpyShaderEditor/Editor/Resources/Public/Graphs/clip.sgraph.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 90785c4ac1513458a84036cf8736ab36 3 | DefaultImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/StrumpyShaderEditor/Editor/Resources/Public/Graphs/defaultlighting.sgraph.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 96e169b5d8f514d32899a8bdc88a6619 3 | DefaultImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/StrumpyShaderEditor/Editor/Resources/Public/Graphs/depthBiasedAlpha.sgraph: -------------------------------------------------------------------------------- 1 | Pixel-132-38.5<_reloadSelectedList xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" />03910030510239100305102<_comment><_stringValue><_inputId><_intValue>0<_rgba>0RGBA03910067730939100677309<_comment><_stringValue><_inputId><_intValue>1<_value>0[0,1]03910367323239103673232<_comment><_stringValue><_depth>0Difference03913630828839136308288<_comment><_stringValue>Use the scene depth difference to bias the alpha that is returnedUse the scene depth difference to bias the alpha that is returned<_arg1>0Arg10Pow00000<_result>0Result06013651525360136515253<_comment><_stringValue><_arg1>0Arg10ScreenDepthDiff00000<_arg2>1Arg20Range00000<_result>0Result0165100142161165100142161<_comment><_stringValue><_albedo>0Albedo0Color00000<_alpha>5Alpha0Saturate01111<_clip>6Clip1111<_emission>2Emission0000<_gloss>4Specular0000<_normal>1Normal1001<_specular>3Gloss0000<_shaderProperties>true<_propertyId>0<_propertyName>_Color<_color>100.62686570.109591842false<_propertyId>1<_propertyName>_Bias<_value><_floatValue>0.5<_max>1<_min>0<_addShadow><_enabled>true<_approxview><_enabled>false<_blending>Default<_colorMaskA><_enabled>true<_colorMaskB><_enabled>true<_colorMaskG><_enabled>true<_colorMaskR><_enabled>true<_cullMode>Back<_dstBlend>Zero<_dualForward><_enabled>false<_excludePath>None<_fogColor>1111<_fogColorOverride><_enabled>false<_fogDensity><_floatValue>0.5<_fogDensityOverride><_enabled>false<_fogFarLinear><_floatValue>1<_fogMode>Global<_fogModeOverride><_enabled>false<_fogNearLinear><_floatValue>0<_fullForwardShadows><_enabled>false<_halfasview><_enabled>false<_ignoreProjectors><_enabled>false<_noAmbient><_enabled>false<_noForwardAdd><_enabled>false<_noLightmap><_enabled>false<_queue>Transparent<_queueAdjust><_intValue>0<_renderType>Transparent<_renderTypeCustom><_stringValue><_shaderName><_stringValue>DepthBiasAlphaDepthBiasAlpha<_shaderTarget>Two<_softVegetation><_enabled>false<_srcBlend>Zero<_zTest>LEqual<_zWrite>Off082.5<_reloadSelectedList xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" />0391321040391321040<_comment><_stringValue><_lighting>0Lighting0000082.5<_reloadSelectedList xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" />03030104030301040<_comment i:nil="true" /><_color>1Color0000<_normal>2Normal0000<_position>0Position0000<_tangent>3Tangent0000 -------------------------------------------------------------------------------- /Assets/StrumpyShaderEditor/Editor/Resources/Public/Graphs/depthBiasedAlpha.sgraph.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4ec6d1e8a76764fcabcb2427f6248bfc 3 | DefaultImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/StrumpyShaderEditor/Editor/Resources/Public/Graphs/hypnotic.sgraph.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 363c834ed41f34fd4a0b52c99cdbc39e 3 | DefaultImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/StrumpyShaderEditor/Editor/Resources/Public/Graphs/lerpcube.sgraph.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 69e85aa1b450643e585074af72ea634f 3 | DefaultImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/StrumpyShaderEditor/Editor/Resources/Public/Graphs/movinggradient.sgraph.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b88ae0539374045ec8d9cd0c858ab028 3 | DefaultImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/StrumpyShaderEditor/Editor/Resources/Public/Graphs/uvpan.sgraph: -------------------------------------------------------------------------------- 1 | Pixel-182144<_reloadSelectedList xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" />060130735946013073594<_comment><_stringValue><_inputId><_intValue>0<_sampler>0Sampler2d<_uv>1UV06013636513860136365138<_comment><_stringValue><_a>1A<_rgba>0RGBA<_sampler>0Sampler0Sampler2D0<_uv>1UV0UV_Pan0000006013653718260136537182<_comment><_stringValue><_inputAddChannel><_gridValues xmlns:d6p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">xyzw<_guiRowElementsNum>4<_selected>0<_result>0Result<_time>1Time0Time00000<_uv>0UV1Sampler2D00000<_wPan><_enabled>false<_xPan><_enabled>true<_yPan><_enabled>false<_zPan><_enabled>false03910073820339100738203<_comment><_stringValue><_value>0Value01651001929516510019295<_comment><_stringValue><_albedo>0Albedo0Tex2D00000<_alpha>5Alpha1Tex2D01111<_clip>6Clip1111<_emission>2Emission0000<_gloss>4Specular0000<_normal>1Normal1001<_specular>3Gloss0000<_shaderProperties>true<_propertyId>0<_propertyName>_Sampler<_defaultTexture>Black<_addShadow><_enabled>false<_approxview><_enabled>false<_blending>Custom<_colorMaskA><_enabled>true<_colorMaskB><_enabled>true<_colorMaskG><_enabled>true<_colorMaskR><_enabled>true<_cullMode>Back<_dstBlend>OneMinusSrcAlpha<_dualForward><_enabled>false<_excludePath>None<_fogColor>1111<_fogColorOverride><_enabled>false<_fogDensity><_floatValue>0.5<_fogDensityOverride><_enabled>false<_fogFarLinear><_floatValue>1<_fogMode>Global<_fogModeOverride><_enabled>false<_fogNearLinear><_floatValue>0<_fullForwardShadows><_enabled>false<_halfasview><_enabled>false<_ignoreProjectors><_enabled>false<_noAmbient><_enabled>false<_noForwardAdd><_enabled>false<_noLightmap><_enabled>false<_queue>Transparent<_queueAdjust><_intValue>0<_renderType>Transparent<_renderTypeCustom><_stringValue><_shaderName><_stringValue>TexurePanTexurePan<_shaderTarget>Two<_softVegetation><_enabled>false<_srcBlend>SrcAlpha<_zTest>LEqual<_zWrite>Off0199<_reloadSelectedList xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" />03030104030301040<_comment i:nil="true" /><_lighting>0Lighting00000199<_reloadSelectedList xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" />03030104030301040<_comment i:nil="true" /><_color>1Color0000<_normal>2Normal0000<_position>0Position0000<_tangent>3Tangent0000 -------------------------------------------------------------------------------- /Assets/StrumpyShaderEditor/Editor/Resources/Public/Graphs/uvpan.sgraph.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4de071be183734402abe0aee07b0cd0b 3 | DefaultImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/StrumpyShaderEditor/Editor/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3728833bf15b0474bb25d67b514ed69a 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/StrumpyShaderEditor/Editor/Scripts/NodeEditorWindow.cs: -------------------------------------------------------------------------------- 1 | using UnityEditor; 2 | using UnityEngine; 3 | using StrumpyShaderEditor; 4 | 5 | public class NodeEditorWindow : NodeEditor { 6 | [MenuItem("Shader Editor/Strumpy Shader Editor")] 7 | public static void Init () 8 | { 9 | var window = GetWindow (typeof(NodeEditorWindow)) as NodeEditorWindow; 10 | window.wantsMouseMove = true; 11 | 12 | Object.DontDestroyOnLoad( window ); 13 | } 14 | 15 | [MenuItem("Shader Editor/Donate")] 16 | public static void Donate () 17 | { 18 | Application.OpenURL("https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=59CS4BHGRLWDS&lc=AU&item_name=http%3a%2f%2fwww%2estrumpy%2enet&item_number=Strumpy%20Shader%20Editor¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHostedGuest"); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Assets/StrumpyShaderEditor/Editor/Scripts/NodeEditorWindow.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2c81c5819edf248ac87e8c53666a3420 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/StrumpyShaderEditor/Editor/Scripts/StrumpyPreviewWindow.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEditor; 3 | using System.Collections; 4 | using StrumpyShaderEditor; 5 | 6 | public class StrumpyPreviewWindow : PreviewWindowInternal { 7 | } 8 | -------------------------------------------------------------------------------- /Assets/StrumpyShaderEditor/Editor/Scripts/StrumpyPreviewWindow.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a905a1965ef2546aa9d8d177d6e411d4 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/StrumpyShaderEditor/Editor/StrumpyShaderEditor.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaellasky/ManyLandsGenerator/932989d0dacb2dadeda5502fa2294990f7d378b7/Assets/StrumpyShaderEditor/Editor/StrumpyShaderEditor.dll -------------------------------------------------------------------------------- /Assets/StrumpyShaderEditor/Editor/StrumpyShaderEditor.dll.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e197861e7ae1a4d02ab02af8ff4afe74 3 | MonoAssemblyImporter: 4 | serializedVersion: 1 5 | iconMap: {} 6 | executionOrder: {} 7 | userData: 8 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 NuclearHorseStudios 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /ProjectSettings/AudioManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaellasky/ManyLandsGenerator/932989d0dacb2dadeda5502fa2294990f7d378b7/ProjectSettings/AudioManager.asset -------------------------------------------------------------------------------- /ProjectSettings/DynamicsManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaellasky/ManyLandsGenerator/932989d0dacb2dadeda5502fa2294990f7d378b7/ProjectSettings/DynamicsManager.asset -------------------------------------------------------------------------------- /ProjectSettings/EditorBuildSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaellasky/ManyLandsGenerator/932989d0dacb2dadeda5502fa2294990f7d378b7/ProjectSettings/EditorBuildSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/EditorSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaellasky/ManyLandsGenerator/932989d0dacb2dadeda5502fa2294990f7d378b7/ProjectSettings/EditorSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/GraphicsSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaellasky/ManyLandsGenerator/932989d0dacb2dadeda5502fa2294990f7d378b7/ProjectSettings/GraphicsSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/InputManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaellasky/ManyLandsGenerator/932989d0dacb2dadeda5502fa2294990f7d378b7/ProjectSettings/InputManager.asset -------------------------------------------------------------------------------- /ProjectSettings/NavMeshLayers.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaellasky/ManyLandsGenerator/932989d0dacb2dadeda5502fa2294990f7d378b7/ProjectSettings/NavMeshLayers.asset -------------------------------------------------------------------------------- /ProjectSettings/NetworkManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaellasky/ManyLandsGenerator/932989d0dacb2dadeda5502fa2294990f7d378b7/ProjectSettings/NetworkManager.asset -------------------------------------------------------------------------------- /ProjectSettings/Physics2DSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaellasky/ManyLandsGenerator/932989d0dacb2dadeda5502fa2294990f7d378b7/ProjectSettings/Physics2DSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/ProjectSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaellasky/ManyLandsGenerator/932989d0dacb2dadeda5502fa2294990f7d378b7/ProjectSettings/ProjectSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/QualitySettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaellasky/ManyLandsGenerator/932989d0dacb2dadeda5502fa2294990f7d378b7/ProjectSettings/QualitySettings.asset -------------------------------------------------------------------------------- /ProjectSettings/TagManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaellasky/ManyLandsGenerator/932989d0dacb2dadeda5502fa2294990f7d378b7/ProjectSettings/TagManager.asset -------------------------------------------------------------------------------- /ProjectSettings/TimeManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaellasky/ManyLandsGenerator/932989d0dacb2dadeda5502fa2294990f7d378b7/ProjectSettings/TimeManager.asset -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ManyLandsGenerator 2 | ================== 3 | 4 | The Random Island Generator being developed for use in The Rogue Sea. 5 | --------------------------------------------------------------------------------