Initial commit

This commit is contained in:
2026-02-18 00:08:49 +02:00
commit 5105b6b060
1270 changed files with 513010 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 7364d5683c506814a95972476673bd1c
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,88 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &-8700850809280554319
MonoBehaviour:
m_ObjectHideFlags: 11
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
m_Name:
m_EditorClassIdentifier:
version: 7
--- !u!21 &2100000
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: AsteroidMat 5
m_Shader: {fileID: -6465566751694194690, guid: a1d463b76c38bc544a5315d6fde55353, type: 3}
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- unity_Lightmaps:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_LightmapsInd:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_ShadowMasks:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _BaseGeom_RND: 12.7
- _BigNoiseGeom_RND_0_3_5: 0.25
- _BigNoise_Geom_RND_0_3_5: 1.99
- _Color2Tiling_RND_0_10: 4
- _Color2_Coverage: 0.2
- _Color2_Strenght: 0.22
- _Color_1_2_Balance: 102.6
- _CraterAngle_RND_5_10: 7.31
- _CraterDensity_RND_0_7: 4.47
- _CraterDensity_RND_1_10: 3
- _Crater_Density_RND: 10
- _Crater_Density_RND_1_10: 1.89
- _Crater_angle_RND: 9.64
- _Crater_angle_RND_5_10: 9.95
- _FilanBtightness: 0.3
- _LongNoise_RND: 0.07
- _Metallic: 0.351
- _ObjScaleY_RND_1_3: 1
- _ObjScaleY_RND_1_5: 1
- _QueueControl: 0
- _QueueOffset: 0
- _Smooth: 0.505
- _SubGeom_RND: 34.1
- _SubtractCratersFromVertex: 0.039
- _VoronNoiseGeom_RND_0_2: 0.78
- _VoronNoiseGeom_RND_0_25_2: 1.43
- _WaveNoise2Geom_RND_10_70: 26.6
- _WaveNoiseGeom_RND_2_30: 2
- _Wave_Noise2_Geom_RND_10_70: 10
- _Wave_Noise_Geom_RND_2_30: 2
m_Colors:
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _Color2_TXT_3: {r: 0.7924528, g: 0.68777674, b: 0.27212527, a: 0}
- _Color2_TXT_4: {r: 0.14382343, g: 0.17319894, b: 0.3773585, a: 0}
- _Color_Crater_1: {r: 0.8050313, g: 0.7304395, b: 0, a: 0}
- _Color_Crater_2: {r: 0, g: 0.04838729, b: 1, a: 0}
- _Color_TXT_1: {r: 0.19496846, g: 0.19496846, b: 0.19496846, a: 0}
- _Color_TXT_2: {r: 1, g: 1, b: 1, a: 0}
m_BuildTextureStacks: []

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: b8199889691e755419fa99d38b3ced00
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 816b7cc21bb0a154baa8cec779148314
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,132 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &5202983862988789535
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3517244163959225648}
- component: {fileID: 1611915326698360542}
- component: {fileID: 7850365289175320514}
- component: {fileID: 5837800701027178446}
- component: {fileID: 5887941494365812808}
- component: {fileID: 3808722624830241339}
m_Layer: 0
m_Name: AsteroidURP
m_TagString: Asteroid
m_Icon: {fileID: 5132851093641282708, guid: 0000000000000000d000000000000000, type: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 2147483647
m_IsActive: 1
--- !u!4 &3517244163959225648
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5202983862988789535}
m_LocalRotation: {x: 0.6056736, y: -0.30763647, z: 0.71324205, w: -0.17264122}
m_LocalPosition: {x: -180, y: 12.721, z: -125}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 13.28, y: 445.46, z: 579.489}
--- !u!33 &1611915326698360542
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5202983862988789535}
m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0}
--- !u!23 &7850365289175320514
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5202983862988789535}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RayTraceProcedural: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: b8199889691e755419fa99d38b3ced00, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!135 &5837800701027178446
SphereCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5202983862988789535}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 0
serializedVersion: 2
m_Radius: 0.7
m_Center: {x: 0, y: 0, z: 0}
--- !u!114 &5887941494365812808
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5202983862988789535}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 0bb01c93b29e2f44a8c44a16a05ddff4, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &3808722624830241339
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5202983862988789535}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 789d4802d97488a4299d22f0a9d20204, type: 3}
m_Name:
m_EditorClassIdentifier:
sun: {fileID: 0}
orbitSpeed: 1
minRotationSpeed: 3
maxRotationSpeed: 20
checkCollisions: 1
additionalOrbitSpeedRange: 0.1
dustBlustPrefab: {fileID: 3818898858223268657, guid: c6e429c52ed66f543829b1afbc5f3856, type: 3}

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: a66945968ede3b84888f24a2f89d253a
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: f45a5c341a01d25488961d956ac5dcee
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,96 @@
using UnityEngine;
#if UNITY_EDITOR
using UnityEditor;
#endif
namespace Asteroids
{
public class AsteroidOrbitSpawner : MonoBehaviour
{
[Header("References")]
public Transform sun;
public GameObject asteroidPrefab;
[Header("Orbit Settings")]
public float baseRadius = 4200f;
public float beltWidth = 950f;
public float beltHeight = 400f;
[Header("Asteroids")]
public int asteroidCount = 1000;
public float minSize = 5f;
public float maxSize = 7f;
[Header("Belt Rotation")]
public float orbitSpeed = 5f;
[Header("Editor Optimization")]
public bool hideInSceneViewDuringPlay = true;
private Transform _beltParent;
void Start()
{
if (sun == null || asteroidPrefab == null)
{
Debug.LogError("Sun or Asteroid Prefab is missing.");
return;
}
CreateBeltParent();
SpawnAsteroids();
}
void Update()
{
if (_beltParent == null) return;
_beltParent.Rotate(Vector3.up, orbitSpeed * Time.deltaTime);
}
void CreateBeltParent()
{
GameObject belt = new GameObject("Asteroid Belt");
_beltParent = belt.transform;
_beltParent.position = sun.position;
}
void SpawnAsteroids()
{
for (int i = 0; i < asteroidCount; i++)
{
float angle = Random.Range(0f, 360f);
float radialOffset = Random.Range(0f, beltWidth);
float heightOffset = Random.Range(
-beltHeight * 0.5f,
beltHeight * 0.5f);
float finalRadius = baseRadius + radialOffset;
Vector3 position =
sun.position +
Quaternion.Euler(0f, angle, 0f) *
new Vector3(finalRadius, 0f, 0f) +
new Vector3(0f, heightOffset, 0f);
GameObject asteroid =
Instantiate(
asteroidPrefab,
position,
Quaternion.identity,
_beltParent);
float size = Random.Range(minSize, maxSize);
asteroid.transform.localScale = Vector3.one * size;
#if UNITY_EDITOR
if (hideInSceneViewDuringPlay && Application.isPlaying)
{
SceneVisibilityManager.instance.Hide(asteroid, true);
}
#endif
}
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: cc8f6eadc406e6d4b91beb5f7216e334
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,26 @@
using UnityEngine;
using System.Collections;
namespace Asteroids
{
public class AsteroidsRotate : MonoBehaviour
{
public float minRotationSpeed = 10f;
public float maxRotationSpeed = 50f;
private Vector3 _selfRotationSpeed;
void Start()
{
_selfRotationSpeed = new Vector3(
Random.Range(minRotationSpeed, maxRotationSpeed),
Random.Range(minRotationSpeed, maxRotationSpeed),
Random.Range(minRotationSpeed, maxRotationSpeed));
}
void Update()
{
transform.Rotate(
_selfRotationSpeed * Time.deltaTime);
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 789d4802d97488a4299d22f0a9d20204
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,49 @@
using UnityEngine;
using System.Text.RegularExpressions;
namespace Asteroids
{
public class RND_sliders_random : MonoBehaviour
{
void Start()
{
Renderer renderer = GetComponent<Renderer>();
if (renderer == null) return;
Material material = renderer.material;
Regex rangeRegex =
new Regex(@"_RND_(-?\d+(\.\d+)?)_(-?\d+(\.\d+)?)");
for (int i = 0;
i < material.shader.GetPropertyCount();
i++)
{
string propertyName =
material.shader.GetPropertyName(i);
if (!propertyName.Contains("_RND"))
continue;
Match match =
rangeRegex.Match(propertyName);
if (!match.Success || match.Groups.Count < 4)
continue;
float minValue =
float.Parse(match.Groups[1].Value);
float maxValue =
float.Parse(match.Groups[3].Value);
float randomValue =
Random.Range(minValue, maxValue);
material.SetFloat(propertyName,
randomValue);
}
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 0bb01c93b29e2f44a8c44a16a05ddff4
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,186 @@
#if ENABLE_INPUT_SYSTEM && ENABLE_INPUT_SYSTEM_PACKAGE
#define USE_INPUT_SYSTEM
using UnityEngine.InputSystem;
using UnityEngine.InputSystem.Controls;//
#endif
using UnityEngine; //
namespace UnityTemplateProjects
{
public class SimpleCameraController : MonoBehaviour
{
class CameraState
{
public float yaw;
public float pitch;
public float roll;
public float x;
public float y;
public float z;
public void SetFromTransform(Transform t)
{
pitch = t.eulerAngles.x;
yaw = t.eulerAngles.y;
roll = t.eulerAngles.z;
x = t.position.x;
y = t.position.y;
z = t.position.z;
}
public void Translate(Vector3 translation)
{
Vector3 rotatedTranslation = Quaternion.Euler(pitch, yaw, roll) * translation;
x += rotatedTranslation.x;
y += rotatedTranslation.y;
z += rotatedTranslation.z;
}
public void LerpTowards(CameraState target, float positionLerpPct, float rotationLerpPct)
{
yaw = Mathf.Lerp(yaw, target.yaw, rotationLerpPct);
pitch = Mathf.Lerp(pitch, target.pitch, rotationLerpPct);
roll = Mathf.Lerp(roll, target.roll, rotationLerpPct);
x = Mathf.Lerp(x, target.x, positionLerpPct);
y = Mathf.Lerp(y, target.y, positionLerpPct);
z = Mathf.Lerp(z, target.z, positionLerpPct);
}
public void UpdateTransform(Transform t)
{
t.eulerAngles = new Vector3(pitch, yaw, roll);
t.position = new Vector3(x, y, z);
}
}
CameraState m_TargetCameraState = new CameraState();
CameraState m_InterpolatingCameraState = new CameraState();
[Header("Movement Settings")]
[Tooltip("Exponential boost factor on translation, controllable by mouse wheel.")]
public float boost = 3.5f;
[Tooltip("Time it takes to interpolate camera position 99% of the way to the target."), Range(0.001f, 1f)]
public float positionLerpTime = 0.2f;
[Header("Rotation Settings")]
[Tooltip("X = Change in mouse position.\nY = Multiplicative factor for camera rotation.")]
public AnimationCurve mouseSensitivityCurve = new AnimationCurve(new Keyframe(0f, 0.5f, 0f, 5f), new Keyframe(1f, 2.5f, 0f, 0f));
[Tooltip("Time it takes to interpolate camera rotation 99% of the way to the target."), Range(0.001f, 1f)]
public float rotationLerpTime = 0.01f;
[Tooltip("Overall speed of camera movement."), Range(0.01f, 1f)]
public float movementSpeed = 10f; // New movement speed variable with a slider from 1 to 20
[Tooltip("Whether or not to invert our Y axis for mouse input to rotation.")]
public bool invertY = false;
void OnEnable()
{
m_TargetCameraState.SetFromTransform(transform);
m_InterpolatingCameraState.SetFromTransform(transform);
}
Vector3 GetInputTranslationDirection()
{
Vector3 direction = new Vector3();
if (Input.GetKey(KeyCode.W))
{
direction += Vector3.forward;
}
if (Input.GetKey(KeyCode.S))
{
direction += Vector3.back;
}
if (Input.GetKey(KeyCode.A))
{
direction += Vector3.left;
}
if (Input.GetKey(KeyCode.D))
{
direction += Vector3.right;
}
if (Input.GetKey(KeyCode.Q))
{
direction += Vector3.down;
}
if (Input.GetKey(KeyCode.E))
{
direction += Vector3.up;
}
return direction;
}
void Update()
{
Vector3 translation = Vector3.zero;
#if ENABLE_LEGACY_INPUT_MANAGER
// Exit Sample
if (Input.GetKey(KeyCode.Escape))
{
Application.Quit();
#if UNITY_EDITOR
UnityEditor.EditorApplication.isPlaying = false;
#endif
}
// Hide and lock cursor when right mouse button pressed
if (Input.GetMouseButtonDown(1))
{
Cursor.lockState = CursorLockMode.Locked;
}
// Unlock and show cursor when right mouse button released
if (Input.GetMouseButtonUp(1))
{
Cursor.visible = false;
Cursor.lockState = CursorLockMode.None;
}
// Rotation
if (Input.GetMouseButton(1))
{
var mouseMovement = new Vector2(Input.GetAxis("Mouse X"), Input.GetAxis("Mouse Y") * (invertY ? 1 : -1));
var mouseSensitivityFactor = mouseSensitivityCurve.Evaluate(mouseMovement.magnitude);
m_TargetCameraState.yaw += mouseMovement.x * mouseSensitivityFactor;
m_TargetCameraState.pitch += mouseMovement.y * mouseSensitivityFactor;
}
// Translation
translation = GetInputTranslationDirection() * Time.deltaTime;
// Speed up movement when shift key held
if (Input.GetKey(KeyCode.LeftShift))
{
translation *= 10.0f;
}
// Modify movement by a boost factor (defined in Inspector and modified in play mode through the mouse scroll wheel)
boost += Input.mouseScrollDelta.y * 0.2f;
translation *= Mathf.Pow(2.0f, boost) * movementSpeed;
#elif USE_INPUT_SYSTEM
// TODO: make the new input system work
#endif
m_TargetCameraState.Translate(translation);
// Framerate-independent interpolation
// Calculate the lerp amount, such that we get 99% of the way to our target in the specified time
var positionLerpPct = 1f - Mathf.Exp((Mathf.Log(1f - 0.99f) / positionLerpTime) * Time.deltaTime);
var rotationLerpPct = 1f - Mathf.Exp((Mathf.Log(1f - 0.99f) / rotationLerpTime) * Time.deltaTime);
m_InterpolatingCameraState.LerpTowards(m_TargetCameraState, positionLerpPct, rotationLerpPct);
m_InterpolatingCameraState.UpdateTransform(transform);
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: b82a54ac813800f43ad86cfe2dd1384e
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: b61127e390c1a4d41a9316e3ae867821
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: a1d463b76c38bc544a5315d6fde55353
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 625f186215c104763be7675aa2d941aa, type: 3}

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 53fb23fbf5cb2a04e826a363809e9dfd
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,441 @@
//Based on noises pack https://github.com/JimmyCushnie/Noisy-Nodes
float4 mod(float4 x, float4 y)
{
return x - y * floor(x / y);
}
float3 mod(float3 x, float3 y)
{
return x - y * floor(x / y);
}
float2 mod289(float2 x)
{
return x - floor(x / 289.0) * 289.0;
}
float3 mod289(float3 x)
{
return x - floor(x / 289.0) * 289.0;
}
float4 mod289(float4 x)
{
return x - floor(x / 289.0) * 289.0;
}
float4 permute(float4 x)
{
return mod289(((x*34.0)+1.0)*x);
}
float3 permute(float3 x)
{
return mod289((x * 34.0 + 1.0) * x);
}
float4 taylorInvSqrt(float4 r)
{
return (float4)1.79284291400159 - r * 0.85373472095314;
}
float3 taylorInvSqrt(float3 r)
{
return 1.79284291400159 - 0.85373472095314 * r;
}
float3 fade(float3 t) {
return t*t*t*(t*(t*6.0-15.0)+10.0);
}
float2 fade(float2 t) {
return t*t*t*(t*(t*6.0-15.0)+10.0);
}
float rand3dTo1d(float3 value, float3 dotDir = float3(12.9898, 78.233, 37.719)){
//make value smaller to avoid artefacts
float3 smallValue = sin(value);
//get scalar value from 3d vector
float random = dot(smallValue, dotDir);
//make value more random by making it bigger and then taking the factional part
random = frac(sin(random) * 143758.5453);
return random;
}
float rand2dTo1d(float2 value, float2 dotDir = float2(12.9898, 78.233)){
float2 smallValue = sin(value);
float random = dot(smallValue, dotDir);
random = frac(sin(random) * 143758.5453);
return random;
}
float rand1dTo1d(float3 value, float mutator = 0.546){
float random = frac(sin(value.x + mutator) * 143758.5453);
return random;
}
//to 2d functions
float2 rand3dTo2d(float3 value){
return float2(
rand3dTo1d(value, float3(12.989, 78.233, 37.719)),
rand3dTo1d(value, float3(39.346, 11.135, 83.155))
);
}
float2 rand2dTo2d(float2 value){
return float2(
rand2dTo1d(value, float2(12.989, 78.233)),
rand2dTo1d(value, float2(39.346, 11.135))
);
}
float2 rand1dTo2d(float value){
return float2(
rand2dTo1d(value, 3.9812),
rand2dTo1d(value, 7.1536)
);
}
//to 3d functions
float3 rand3dTo3d(float3 value){
return float3(
rand3dTo1d(value, float3(12.989, 78.233, 37.719)),
rand3dTo1d(value, float3(39.346, 11.135, 83.155)),
rand3dTo1d(value, float3(73.156, 52.235, 09.151))
);
}
float3 rand2dTo3d(float2 value){
return float3(
rand2dTo1d(value, float2(12.989, 78.233)),
rand2dTo1d(value, float2(39.346, 11.135)),
rand2dTo1d(value, float2(73.156, 52.235))
);
}
float3 rand1dTo3d(float value){
return float3(
rand1dTo1d(value, 3.9812),
rand1dTo1d(value, 7.1536),
rand1dTo1d(value, 5.7241)
);
}
inline float3 voronoi_noise_randomVector (float3 UV, float offset){
float3x3 m = float3x3(15.27, 47.63, 99.41, 89.98, 95.07, 38.39, 33.83, 51.06, 60.77);
UV = frac(sin(mul(UV, m)) * 46839.32);
return float3(sin(UV.y*+offset)*0.5+0.5, cos(UV.x*offset)*0.5+0.5, sin(UV.z*offset)*0.5+0.5);
}
void VoronoiPrecise3D_float(float3 UV, float AngleOffset, float CellDensity, out float Out, out float Cells) {
float3 g = floor(UV * CellDensity);
float3 f = frac(UV * CellDensity);
float2 res = float2(8.0, 8.0);
float3 ml = float3(0,0,0);
float3 mv = float3(0,0,0);
for(int y=-1; y<=1; y++){
for(int x=-1; x<=1; x++){
for(int z=-1; z<=1; z++){
float3 lattice = float3(x, y, z);
float3 offset = voronoi_noise_randomVector(g + lattice, AngleOffset);
float3 v = lattice + offset - f;
float d = dot(v, v);
if(d < res.x){
res.x = d;
res.y = offset.x;
mv = v;
ml = lattice;
}
}
}
}
Cells = res.y;
res = float2(8.0, 8.0);
for(int y1=-2; y1<=2; y1++){
for(int x1=-2; x1<=2; x1++){
for(int z1=-2; z1<=2; z1++){
float3 lattice = ml + float3(x1, y1, z1);
float3 offset = voronoi_noise_randomVector(g + lattice, AngleOffset);
float3 v = lattice + offset - f;
float3 cellDifference = abs(ml - lattice);
if (cellDifference.x + cellDifference.y + cellDifference.z > 0.1){
float d = dot(0.5*(mv+v), normalize(v-mv));
res.x = min(res.x, d);
}
}
}
}
Out = res.x;
}
void Voronoi3D_float(float3 UV, float AngleOffset, float CellDensity, out float Out, out float Cells) {
float3 g = floor(UV * CellDensity);
float3 f = frac(UV * CellDensity);
float3 res = float3(8.0, 8.0, 8.0);
for(int y=-1; y<=1; y++){
for(int x=-1; x<=1; x++){
for(int z=-1; z<=1; z++){
float3 lattice = float3(x, y, z);
float3 offset = voronoi_noise_randomVector(g + lattice, AngleOffset);
float3 v = lattice + offset - f;
float d = dot(v, v);
if(d < res.x){
res.y = res.x;
res.x = d;
res.z = offset.x;
}else if (d < res.y){
res.y = d;
}
}
}
}
Out = res.x;
Cells = res.z;
}
// Classic Perlin noise
float cnoise(float3 P)
{
float3 Pi0 = floor(P); // Integer part for indexing
float3 Pi1 = Pi0 + (float3)1.0; // Integer part + 1
Pi0 = mod289(Pi0);
Pi1 = mod289(Pi1);
float3 Pf0 = frac(P); // Fractional part for interpolation
float3 Pf1 = Pf0 - (float3)1.0; // Fractional part - 1.0
float4 ix = float4(Pi0.x, Pi1.x, Pi0.x, Pi1.x);
float4 iy = float4(Pi0.y, Pi0.y, Pi1.y, Pi1.y);
float4 iz0 = (float4)Pi0.z;
float4 iz1 = (float4)Pi1.z;
float4 ixy = permute(permute(ix) + iy);
float4 ixy0 = permute(ixy + iz0);
float4 ixy1 = permute(ixy + iz1);
float4 gx0 = ixy0 / 7.0;
float4 gy0 = frac(floor(gx0) / 7.0) - 0.5;
gx0 = frac(gx0);
float4 gz0 = (float4)0.5 - abs(gx0) - abs(gy0);
float4 sz0 = step(gz0, (float4)0.0);
gx0 -= sz0 * (step((float4)0.0, gx0) - 0.5);
gy0 -= sz0 * (step((float4)0.0, gy0) - 0.5);
float4 gx1 = ixy1 / 7.0;
float4 gy1 = frac(floor(gx1) / 7.0) - 0.5;
gx1 = frac(gx1);
float4 gz1 = (float4)0.5 - abs(gx1) - abs(gy1);
float4 sz1 = step(gz1, (float4)0.0);
gx1 -= sz1 * (step((float4)0.0, gx1) - 0.5);
gy1 -= sz1 * (step((float4)0.0, gy1) - 0.5);
float3 g000 = float3(gx0.x,gy0.x,gz0.x);
float3 g100 = float3(gx0.y,gy0.y,gz0.y);
float3 g010 = float3(gx0.z,gy0.z,gz0.z);
float3 g110 = float3(gx0.w,gy0.w,gz0.w);
float3 g001 = float3(gx1.x,gy1.x,gz1.x);
float3 g101 = float3(gx1.y,gy1.y,gz1.y);
float3 g011 = float3(gx1.z,gy1.z,gz1.z);
float3 g111 = float3(gx1.w,gy1.w,gz1.w);
float4 norm0 = taylorInvSqrt(float4(dot(g000, g000), dot(g010, g010), dot(g100, g100), dot(g110, g110)));
g000 *= norm0.x;
g010 *= norm0.y;
g100 *= norm0.z;
g110 *= norm0.w;
float4 norm1 = taylorInvSqrt(float4(dot(g001, g001), dot(g011, g011), dot(g101, g101), dot(g111, g111)));
g001 *= norm1.x;
g011 *= norm1.y;
g101 *= norm1.z;
g111 *= norm1.w;
float n000 = dot(g000, Pf0);
float n100 = dot(g100, float3(Pf1.x, Pf0.y, Pf0.z));
float n010 = dot(g010, float3(Pf0.x, Pf1.y, Pf0.z));
float n110 = dot(g110, float3(Pf1.x, Pf1.y, Pf0.z));
float n001 = dot(g001, float3(Pf0.x, Pf0.y, Pf1.z));
float n101 = dot(g101, float3(Pf1.x, Pf0.y, Pf1.z));
float n011 = dot(g011, float3(Pf0.x, Pf1.y, Pf1.z));
float n111 = dot(g111, Pf1);
float3 fade_xyz = fade(Pf0);
float4 n_z = lerp(float4(n000, n100, n010, n110), float4(n001, n101, n011, n111), fade_xyz.z);
float2 n_yz = lerp(n_z.xy, n_z.zw, fade_xyz.y);
float n_xyz = lerp(n_yz.x, n_yz.y, fade_xyz.x);
return 2.2 * n_xyz;
}
// Classic Perlin noise, periodic variant
float pnoise(float3 P, float3 rep)
{
float3 Pi0 = mod(floor(P), rep); // Integer part, modulo period
float3 Pi1 = mod(Pi0 + (float3)1.0, rep); // Integer part + 1, mod period
Pi0 = mod289(Pi0);
Pi1 = mod289(Pi1);
float3 Pf0 = frac(P); // Fractional part for interpolation
float3 Pf1 = Pf0 - (float3)1.0; // Fractional part - 1.0
float4 ix = float4(Pi0.x, Pi1.x, Pi0.x, Pi1.x);
float4 iy = float4(Pi0.y, Pi0.y, Pi1.y, Pi1.y);
float4 iz0 = (float4)Pi0.z;
float4 iz1 = (float4)Pi1.z;
float4 ixy = permute(permute(ix) + iy);
float4 ixy0 = permute(ixy + iz0);
float4 ixy1 = permute(ixy + iz1);
float4 gx0 = ixy0 / 7.0;
float4 gy0 = frac(floor(gx0) / 7.0) - 0.5;
gx0 = frac(gx0);
float4 gz0 = (float4)0.5 - abs(gx0) - abs(gy0);
float4 sz0 = step(gz0, (float4)0.0);
gx0 -= sz0 * (step((float4)0.0, gx0) - 0.5);
gy0 -= sz0 * (step((float4)0.0, gy0) - 0.5);
float4 gx1 = ixy1 / 7.0;
float4 gy1 = frac(floor(gx1) / 7.0) - 0.5;
gx1 = frac(gx1);
float4 gz1 = (float4)0.5 - abs(gx1) - abs(gy1);
float4 sz1 = step(gz1, (float4)0.0);
gx1 -= sz1 * (step((float4)0.0, gx1) - 0.5);
gy1 -= sz1 * (step((float4)0.0, gy1) - 0.5);
float3 g000 = float3(gx0.x,gy0.x,gz0.x);
float3 g100 = float3(gx0.y,gy0.y,gz0.y);
float3 g010 = float3(gx0.z,gy0.z,gz0.z);
float3 g110 = float3(gx0.w,gy0.w,gz0.w);
float3 g001 = float3(gx1.x,gy1.x,gz1.x);
float3 g101 = float3(gx1.y,gy1.y,gz1.y);
float3 g011 = float3(gx1.z,gy1.z,gz1.z);
float3 g111 = float3(gx1.w,gy1.w,gz1.w);
float4 norm0 = taylorInvSqrt(float4(dot(g000, g000), dot(g010, g010), dot(g100, g100), dot(g110, g110)));
g000 *= norm0.x;
g010 *= norm0.y;
g100 *= norm0.z;
g110 *= norm0.w;
float4 norm1 = taylorInvSqrt(float4(dot(g001, g001), dot(g011, g011), dot(g101, g101), dot(g111, g111)));
g001 *= norm1.x;
g011 *= norm1.y;
g101 *= norm1.z;
g111 *= norm1.w;
float n000 = dot(g000, Pf0);
float n100 = dot(g100, float3(Pf1.x, Pf0.y, Pf0.z));
float n010 = dot(g010, float3(Pf0.x, Pf1.y, Pf0.z));
float n110 = dot(g110, float3(Pf1.x, Pf1.y, Pf0.z));
float n001 = dot(g001, float3(Pf0.x, Pf0.y, Pf1.z));
float n101 = dot(g101, float3(Pf1.x, Pf0.y, Pf1.z));
float n011 = dot(g011, float3(Pf0.x, Pf1.y, Pf1.z));
float n111 = dot(g111, Pf1);
float3 fade_xyz = fade(Pf0);
float4 n_z = lerp(float4(n000, n100, n010, n110), float4(n001, n101, n011, n111), fade_xyz.z);
float2 n_yz = lerp(n_z.xy, n_z.zw, fade_xyz.y);
float n_xyz = lerp(n_yz.x, n_yz.y, fade_xyz.x);
return 2.2 * n_xyz;
}
void PerlinNoise3D_float(float3 input, out float Out)
{
Out = cnoise(input);
}
void PerlinNoise3DPeriodic_float(float3 input, float3 period, out float Out)
{
Out = pnoise(input, period);
}
// Perlin noise function 3D with octaves
void PerlinNoise3DOctaves_float(float3 P, int octaves, float persistence, float lacunarity, float size, out float Out) {
// Limit the number of octaves to the range from 1 to 6
octaves = clamp(octaves, 1, 6);
float amplitude = 1.0; // Initial amplitude
float frequency = size; // Initial frequency controlled by the size parameter
float total = 0.0; // Total noise result
float maxValue = 0.0; // Maximum possible value (for normalization)
// Loop through the number of octaves
for (int i = 0; i < octaves; i++) {
// Add the value of the current octave
total += cnoise(P * frequency) * amplitude;
// Update amplitude and frequency for the next octave
maxValue += amplitude; // Sum the amplitudes of all octaves
amplitude *= persistence; // Decrease amplitude by the persistence coefficient
frequency *= lacunarity; // Increase frequency by the lacunarity coefficient
}
// Normalize the total result to keep it in the range [0, 1]
Out = total / maxValue;
}
// Function to generate a hash based on an index to create additional branching
float gradientHash(int index) {
return frac(sin(float(index) * 12.9898) * 43758.5453);
}
// Perlin noise with erosion effect
void PerlinNoiseWithErosion_float(float3 P, float size, float erosionStrength, float erosionIterations, out float Out) {
// Initial Perlin noise with the given size (frequency)
float height = cnoise(P * size);
// Variable for accumulating height with erosion applied
float accumulatedHeight = height;
// Repeat erosion to enhance branching effect and deepen channels
for (int i = 0; i < erosionIterations; ++i) {
// Calculate heights at neighboring points
float hL = cnoise((P + float3(-1.0, 0.0, 0.0)) * size); // Height to the left
float hR = cnoise((P + float3(1.0, 0.0, 0.0)) * size); // Height to the right
float hD = cnoise((P + float3(0.0, -1.0, 0.0)) * size); // Height below
float hU = cnoise((P + float3(0.0, 1.0, 0.0)) * size); // Height above
// Calculate gradients for "flow" direction
float deltaL = accumulatedHeight - hL;
float deltaR = accumulatedHeight - hR;
float deltaD = accumulatedHeight - hD;
float deltaU = accumulatedHeight - hU;
// Determine the largest drop for further deepening
float erosionDelta = max(0.0, max(deltaL, max(deltaR, max(deltaD, deltaU))));
// Deepen the main point to simulate downward slope flow
accumulatedHeight -= erosionStrength * erosionDelta * 0.5;
// Add brightness to create the appearance of sharp edges
float edgeHighlight = clamp(erosionDelta * erosionStrength * 0.5, 0.0, 1.0);
// Add additional branching for increased detail
float branchEffect = cnoise((P + float3(gradientHash(i), gradientHash(i+1), gradientHash(i+2))) * size * 0.5) * erosionStrength * 0.1;
// Transfer some material to low areas to simulate accumulation
accumulatedHeight += erosionStrength * 0.15 * erosionDelta;
// Influence the final height value, accounting for brightness and branching
accumulatedHeight += edgeHighlight + branchEffect;
}
// Clamp the final height to the range [0, 1] for normalization
Out = saturate(accumulatedHeight);
}

View File

@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 0d4ad62e2ebc11a408c53c5a9e80c499
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 92fee2d36b994df47980fb1fd04cd931
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,633 @@
{
"m_SGVersion": 3,
"m_Type": "UnityEditor.ShaderGraph.GraphData",
"m_ObjectId": "fe69b1d988854065abbe68d19e3fc333",
"m_Properties": [
{
"m_Id": "ef3edadd060e8480a911e001181869a9"
},
{
"m_Id": "3e3ea2295356ce8da94d290f4deffb25"
},
{
"m_Id": "a0767c5198fc768a95c6ab1eeb7d7f8e"
}
],
"m_Keywords": [],
"m_Dropdowns": [],
"m_CategoryData": [
{
"m_Id": "adb7b5ef8c6f4865bb2e48061e659b6c"
}
],
"m_Nodes": [
{
"m_Id": "be9287e0e35def808c7e013815d3fff5"
},
{
"m_Id": "f3778cac851e5b82b5979141914b8445"
},
{
"m_Id": "1d30cf63fc420f8f99a0cbe60bb88392"
},
{
"m_Id": "c0874fd2920f9c8baf4b91be875c7ebb"
},
{
"m_Id": "01df2bf4a6ebe48c8c34049cb8b5c130"
}
],
"m_GroupDatas": [],
"m_StickyNoteDatas": [],
"m_Edges": [
{
"m_OutputSlot": {
"m_Node": {
"m_Id": "01df2bf4a6ebe48c8c34049cb8b5c130"
},
"m_SlotId": 0
},
"m_InputSlot": {
"m_Node": {
"m_Id": "f3778cac851e5b82b5979141914b8445"
},
"m_SlotId": 2
}
},
{
"m_OutputSlot": {
"m_Node": {
"m_Id": "1d30cf63fc420f8f99a0cbe60bb88392"
},
"m_SlotId": 0
},
"m_InputSlot": {
"m_Node": {
"m_Id": "f3778cac851e5b82b5979141914b8445"
},
"m_SlotId": 1
}
},
{
"m_OutputSlot": {
"m_Node": {
"m_Id": "c0874fd2920f9c8baf4b91be875c7ebb"
},
"m_SlotId": 0
},
"m_InputSlot": {
"m_Node": {
"m_Id": "f3778cac851e5b82b5979141914b8445"
},
"m_SlotId": 0
}
},
{
"m_OutputSlot": {
"m_Node": {
"m_Id": "f3778cac851e5b82b5979141914b8445"
},
"m_SlotId": 3
},
"m_InputSlot": {
"m_Node": {
"m_Id": "be9287e0e35def808c7e013815d3fff5"
},
"m_SlotId": 1
}
},
{
"m_OutputSlot": {
"m_Node": {
"m_Id": "f3778cac851e5b82b5979141914b8445"
},
"m_SlotId": 4
},
"m_InputSlot": {
"m_Node": {
"m_Id": "be9287e0e35def808c7e013815d3fff5"
},
"m_SlotId": 2
}
}
],
"m_VertexContext": {
"m_Position": {
"x": -1.7143586874008179,
"y": -54.28572463989258
},
"m_Blocks": []
},
"m_FragmentContext": {
"m_Position": {
"x": -1.7143586874008179,
"y": 145.7142791748047
},
"m_Blocks": []
},
"m_PreviewData": {
"serializedMesh": {
"m_SerializedMesh": "{\"mesh\":{\"instanceID\":0}}",
"m_Guid": ""
},
"preventRotation": false
},
"m_Path": "Sub Graphs",
"m_GraphPrecision": 0,
"m_PreviewMode": 2,
"m_OutputNode": {
"m_Id": "be9287e0e35def808c7e013815d3fff5"
},
"m_SubDatas": [],
"m_ActiveTargets": []
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.PropertyNode",
"m_ObjectId": "01df2bf4a6ebe48c8c34049cb8b5c130",
"m_Group": {
"m_Id": ""
},
"m_Name": "Property",
"m_DrawState": {
"m_Expanded": true,
"m_Position": {
"serializedVersion": "2",
"x": -626.857177734375,
"y": 69.14286041259766,
"width": 138.85714721679688,
"height": 33.71428680419922
}
},
"m_Slots": [
{
"m_Id": "b2df31d5b3d69c8bacf93d6ac220f0ba"
}
],
"synonyms": [],
"m_Precision": 0,
"m_PreviewExpanded": true,
"m_DismissedVersion": 0,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
},
"m_Property": {
"m_Id": "a0767c5198fc768a95c6ab1eeb7d7f8e"
}
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.PropertyNode",
"m_ObjectId": "1d30cf63fc420f8f99a0cbe60bb88392",
"m_Group": {
"m_Id": ""
},
"m_Name": "Property",
"m_DrawState": {
"m_Expanded": true,
"m_Position": {
"serializedVersion": "2",
"x": -615.4285888671875,
"y": 3.428558349609375,
"width": 140.00001525878907,
"height": 33.71429443359375
}
},
"m_Slots": [
{
"m_Id": "a1ed8eb727465181a52210bce6d691d6"
}
],
"synonyms": [],
"m_Precision": 0,
"m_PreviewExpanded": true,
"m_DismissedVersion": 0,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
},
"m_Property": {
"m_Id": "3e3ea2295356ce8da94d290f4deffb25"
}
}
{
"m_SGVersion": 1,
"m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty",
"m_ObjectId": "3e3ea2295356ce8da94d290f4deffb25",
"m_Guid": {
"m_GuidSerialized": "079226b0-e3c8-4884-8aee-fea8d46fbf2c"
},
"m_Name": "Angle Offset",
"m_DefaultRefNameVersion": 0,
"m_RefNameGeneratedByDisplayName": "",
"m_DefaultReferenceName": "Vector1_B47BD908",
"m_OverrideReferenceName": "",
"m_GeneratePropertyBlock": true,
"m_UseCustomSlotLabel": false,
"m_CustomSlotLabel": "",
"m_DismissedVersion": 0,
"m_Precision": 0,
"overrideHLSLDeclaration": false,
"hlslDeclarationOverride": 0,
"m_Hidden": false,
"m_Value": 10.0,
"m_FloatType": 0,
"m_RangeValues": {
"x": 0.0,
"y": 1.0
}
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot",
"m_ObjectId": "5631c9191bca4180be09118ee2da94b9",
"m_Id": 0,
"m_DisplayName": "Input",
"m_SlotType": 0,
"m_Hidden": false,
"m_ShaderOutputName": "Input",
"m_StageCapability": 3,
"m_Value": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"m_DefaultValue": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"m_Labels": [
"X",
"Y",
"Z"
]
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot",
"m_ObjectId": "6a62a8f588975789951642009ee1c716",
"m_Id": 0,
"m_DisplayName": "Sampling Coordinates",
"m_SlotType": 1,
"m_Hidden": false,
"m_ShaderOutputName": "Out",
"m_StageCapability": 3,
"m_Value": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"m_DefaultValue": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"m_Labels": [
"X",
"Y",
"Z"
]
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
"m_ObjectId": "6aa64cbb1440ee82a72557ffb15bd420",
"m_Id": 1,
"m_DisplayName": "Value",
"m_SlotType": 0,
"m_Hidden": false,
"m_ShaderOutputName": "Value",
"m_StageCapability": 3,
"m_Value": 0.0,
"m_DefaultValue": 0.0,
"m_Labels": [
"X"
]
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
"m_ObjectId": "7f698b7c12996988ab1139d51b2cdd58",
"m_Id": 2,
"m_DisplayName": "Cell Density",
"m_SlotType": 0,
"m_Hidden": false,
"m_ShaderOutputName": "CellDensity",
"m_StageCapability": 3,
"m_Value": 0.0,
"m_DefaultValue": 0.0,
"m_Labels": [
"X"
]
}
{
"m_SGVersion": 1,
"m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty",
"m_ObjectId": "a0767c5198fc768a95c6ab1eeb7d7f8e",
"m_Guid": {
"m_GuidSerialized": "f254c6b2-6f49-4ec8-b3fd-28a3cfdd7be6"
},
"m_Name": "Cell Density",
"m_DefaultRefNameVersion": 0,
"m_RefNameGeneratedByDisplayName": "",
"m_DefaultReferenceName": "Vector1_AEE7F28E",
"m_OverrideReferenceName": "",
"m_GeneratePropertyBlock": true,
"m_UseCustomSlotLabel": false,
"m_CustomSlotLabel": "",
"m_DismissedVersion": 0,
"m_Precision": 0,
"overrideHLSLDeclaration": false,
"hlslDeclarationOverride": 0,
"m_Hidden": false,
"m_Value": 10.0,
"m_FloatType": 0,
"m_RangeValues": {
"x": 0.0,
"y": 1.0
}
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
"m_ObjectId": "a1ed8eb727465181a52210bce6d691d6",
"m_Id": 0,
"m_DisplayName": "Angle Offset",
"m_SlotType": 1,
"m_Hidden": false,
"m_ShaderOutputName": "Out",
"m_StageCapability": 3,
"m_Value": 0.0,
"m_DefaultValue": 0.0,
"m_Labels": [
"X"
]
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
"m_ObjectId": "a258b5dbc86fbe879ab925d1c17fc5cc",
"m_Id": 4,
"m_DisplayName": "Cells",
"m_SlotType": 1,
"m_Hidden": false,
"m_ShaderOutputName": "Cells",
"m_StageCapability": 3,
"m_Value": 0.0,
"m_DefaultValue": 0.0,
"m_Labels": [
"X"
]
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
"m_ObjectId": "a723ea9af1062c83bce622eda512d2b2",
"m_Id": 2,
"m_DisplayName": "Cells",
"m_SlotType": 0,
"m_Hidden": false,
"m_ShaderOutputName": "Cells",
"m_StageCapability": 3,
"m_Value": 0.0,
"m_DefaultValue": 0.0,
"m_Labels": [
"X"
]
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.CategoryData",
"m_ObjectId": "adb7b5ef8c6f4865bb2e48061e659b6c",
"m_Name": "",
"m_ChildObjectList": [
{
"m_Id": "ef3edadd060e8480a911e001181869a9"
},
{
"m_Id": "3e3ea2295356ce8da94d290f4deffb25"
},
{
"m_Id": "a0767c5198fc768a95c6ab1eeb7d7f8e"
}
]
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
"m_ObjectId": "af2df4c103154b87a64486b00ba8ac9b",
"m_Id": 1,
"m_DisplayName": "Angle Offset",
"m_SlotType": 0,
"m_Hidden": false,
"m_ShaderOutputName": "AngleOffset",
"m_StageCapability": 3,
"m_Value": 0.0,
"m_DefaultValue": 0.0,
"m_Labels": [
"X"
]
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
"m_ObjectId": "b2df31d5b3d69c8bacf93d6ac220f0ba",
"m_Id": 0,
"m_DisplayName": "Cell Density",
"m_SlotType": 1,
"m_Hidden": false,
"m_ShaderOutputName": "Out",
"m_StageCapability": 3,
"m_Value": 0.0,
"m_DefaultValue": 0.0,
"m_Labels": [
"X"
]
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.SubGraphOutputNode",
"m_ObjectId": "be9287e0e35def808c7e013815d3fff5",
"m_Group": {
"m_Id": ""
},
"m_Name": "Out_Vector4",
"m_DrawState": {
"m_Expanded": true,
"m_Position": {
"serializedVersion": "2",
"x": -1.7143586874008179,
"y": -54.28572463989258,
"width": 132.57142639160157,
"height": 101.14285278320313
}
},
"m_Slots": [
{
"m_Id": "6aa64cbb1440ee82a72557ffb15bd420"
},
{
"m_Id": "a723ea9af1062c83bce622eda512d2b2"
}
],
"synonyms": [],
"m_Precision": 0,
"m_PreviewExpanded": true,
"m_DismissedVersion": 0,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
},
"IsFirstSlotValid": true
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.PropertyNode",
"m_ObjectId": "c0874fd2920f9c8baf4b91be875c7ebb",
"m_Group": {
"m_Id": ""
},
"m_Name": "Property",
"m_DrawState": {
"m_Expanded": true,
"m_Position": {
"serializedVersion": "2",
"x": -673.7142333984375,
"y": -61.142852783203128,
"width": 193.71426391601563,
"height": 33.71428680419922
}
},
"m_Slots": [
{
"m_Id": "6a62a8f588975789951642009ee1c716"
}
],
"synonyms": [],
"m_Precision": 0,
"m_PreviewExpanded": true,
"m_DismissedVersion": 0,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
},
"m_Property": {
"m_Id": "ef3edadd060e8480a911e001181869a9"
}
}
{
"m_SGVersion": 1,
"m_Type": "UnityEditor.ShaderGraph.Internal.Vector3ShaderProperty",
"m_ObjectId": "ef3edadd060e8480a911e001181869a9",
"m_Guid": {
"m_GuidSerialized": "e736b5eb-839f-4cc0-b461-5b7759a86b56"
},
"m_Name": "Sampling Coordinates",
"m_DefaultRefNameVersion": 0,
"m_RefNameGeneratedByDisplayName": "",
"m_DefaultReferenceName": "Vector3_375394F7",
"m_OverrideReferenceName": "",
"m_GeneratePropertyBlock": true,
"m_UseCustomSlotLabel": false,
"m_CustomSlotLabel": "",
"m_DismissedVersion": 0,
"m_Precision": 0,
"overrideHLSLDeclaration": false,
"hlslDeclarationOverride": 0,
"m_Hidden": false,
"m_Value": {
"x": 0.0,
"y": 0.0,
"z": 0.0,
"w": 0.0
}
}
{
"m_SGVersion": 1,
"m_Type": "UnityEditor.ShaderGraph.CustomFunctionNode",
"m_ObjectId": "f3778cac851e5b82b5979141914b8445",
"m_Group": {
"m_Id": ""
},
"m_Name": "Voronoi3D (Custom Function)",
"m_DrawState": {
"m_Expanded": true,
"m_Position": {
"serializedVersion": "2",
"x": -304.0,
"y": -55.42858123779297,
"width": 208.0,
"height": 326.28570556640627
}
},
"m_Slots": [
{
"m_Id": "f6e0eac005703188804ddc94c4b66278"
},
{
"m_Id": "a258b5dbc86fbe879ab925d1c17fc5cc"
},
{
"m_Id": "5631c9191bca4180be09118ee2da94b9"
},
{
"m_Id": "af2df4c103154b87a64486b00ba8ac9b"
},
{
"m_Id": "7f698b7c12996988ab1139d51b2cdd58"
}
],
"synonyms": [
"code",
"HLSL"
],
"m_Precision": 0,
"m_PreviewExpanded": true,
"m_DismissedVersion": 0,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
},
"m_SourceType": 0,
"m_FunctionName": "Voronoi3D",
"m_FunctionSource": "0d4ad62e2ebc11a408c53c5a9e80c499",
"m_FunctionBody": "Enter function body here..."
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
"m_ObjectId": "f6e0eac005703188804ddc94c4b66278",
"m_Id": 3,
"m_DisplayName": "Value",
"m_SlotType": 1,
"m_Hidden": false,
"m_ShaderOutputName": "Value",
"m_StageCapability": 3,
"m_Value": 0.0,
"m_DefaultValue": 0.0,
"m_Labels": [
"X"
]
}

View File

@@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 92001a1a051ec8247a12e151ca32427b
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 60072b568d64c40a485e0fc55012dc9f, type: 3}