Procedural Planets
Integrated Sebastian Lague's Planet Generator Created Tour function in SectorRenderer which makes the camera follow each terrestrial planet in turn
This commit is contained in:
parent
f8165878e0
commit
53a91351b7
332 changed files with 11904 additions and 78 deletions
44
Assets/Plugins/Celestial Body/Scripts/Shape/MoatShape.cs
Normal file
44
Assets/Plugins/Celestial Body/Scripts/Shape/MoatShape.cs
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
[CreateAssetMenu (menuName = "Celestial Body/Moat/Moat Shape")]
|
||||
public class MoatShape : CelestialBodyShape {
|
||||
|
||||
[Header ("Continent settings")]
|
||||
public float shoreSteepness = 4;
|
||||
public float continentLevel = -0.05f;
|
||||
public float continentFlatness = 0.27f;
|
||||
|
||||
[Header ("Mountain settings")]
|
||||
public float mountainSmoothing = 1f; // Reduces excessive jaggedness of mountains in some regions
|
||||
public float mountainBlend = 1; // Determines how smoothly the base of mountains blends into the terrain
|
||||
public Vector2 maskMinMax = new Vector2 (0.35f, 0.5f);
|
||||
|
||||
[Header ("Noise settings")]
|
||||
public SimpleNoiseSettings continentNoise;
|
||||
public CraterSettings craterSettings;
|
||||
|
||||
public Vector4 testParams;
|
||||
|
||||
protected override void SetShapeData () {
|
||||
var prng = new PRNG (seed);
|
||||
continentNoise.SetComputeValues (heightMapCompute, prng, "_continents");
|
||||
craterSettings.SetComputeValues (heightMapCompute, seed);
|
||||
|
||||
heightMapCompute.SetFloat ("shoreSteepness", shoreSteepness);
|
||||
heightMapCompute.SetFloat ("continentFlatness", continentFlatness);
|
||||
heightMapCompute.SetFloat ("continentLevel", continentLevel);
|
||||
heightMapCompute.SetFloat ("mountainSmoothing", mountainSmoothing);
|
||||
heightMapCompute.SetFloat ("mountainBlend", mountainBlend);
|
||||
heightMapCompute.SetVector ("maskMinMax", maskMinMax);
|
||||
heightMapCompute.SetVector ("params", testParams);
|
||||
}
|
||||
|
||||
public override void ReleaseBuffers () {
|
||||
base.ReleaseBuffers ();
|
||||
craterSettings.ReleaseBuffers ();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Reference in a new issue