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
|
|
@ -0,0 +1,36 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
[CreateAssetMenu (menuName = "Celestial Body/Shapes/Shattered")]
|
||||
public class ShatteredShape : CelestialBodyShape {
|
||||
|
||||
[Header ("Noise settings")]
|
||||
public float plateauHeight;
|
||||
public float plateauSmoothing;
|
||||
public SimpleNoiseSettings continentNoise;
|
||||
public SimpleNoiseSettings warpNoise;
|
||||
public RidgeNoiseSettings ridgeNoise;
|
||||
public RidgeNoiseSettings ridgeNoise2;
|
||||
public CraterSettings craterSettings;
|
||||
public Vector4 testParams;
|
||||
|
||||
protected override void SetShapeData () {
|
||||
var prng = new PRNG (seed);
|
||||
continentNoise.SetComputeValues (heightMapCompute, prng, "_continents");
|
||||
ridgeNoise.SetComputeValues (heightMapCompute, prng, "_mountains");
|
||||
ridgeNoise2.SetComputeValues (heightMapCompute, prng, "_mountains2");
|
||||
warpNoise.SetComputeValues (heightMapCompute, prng, "_warp");
|
||||
craterSettings.SetComputeValues (heightMapCompute, seed);
|
||||
|
||||
heightMapCompute.SetFloat ("plateauHeight", plateauHeight);
|
||||
heightMapCompute.SetFloat ("plateauSmoothing", plateauSmoothing);
|
||||
heightMapCompute.SetVector ("params", testParams);
|
||||
}
|
||||
|
||||
public override void ReleaseBuffers () {
|
||||
base.ReleaseBuffers ();
|
||||
craterSettings.ReleaseBuffers ();
|
||||
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue