text:
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
  serializedVersion: 6
  m_ObjectHideFlags: 0
  m_CorrespondingSourceObject: {fileID: 0}
  m_PrefabInstance: {fileID: 0}
  m_PrefabAsset: {fileID: 0}
  m_Name: Backface
  m_Shader: {fileID: 4800000, guid: 6e4ae4064600d784cac1e41a9e6f2e59, type: 3}
  m_ShaderKeywords: _NORMALMAP_TANGENT_SPACE
  m_LightmapFlags: 4
  m_EnableInstancingVariants: 0
  m_DoubleSidedGI: 0
  m_CustomRenderQueue: -1
  stringTagMap: {}
  disabledShaderPasses:
  - DistortionVectors
  - MOTIONVECTORS
  - TransparentDepthPrepass
  - TransparentDepthPostpass
  - TransparentBackface
  m_SavedProperties:
    serializedVersion: 3
    m_TexEnvs:
    - _AnisotropyMap:
        m_Texture: {fileID: 0}
        m_Scale: {x: 1, y: 1}
        m_Offset: {x: 0, y: 0}
    - _BaseColorMap:
        m_Texture: {fileID: 0}
        m_Scale: {x: 1, y: 1}
        m_Offset: {x: 0, y: 0}
    - _BentNormalMap:
        m_Texture: {fileID: 0}
        m_Scale: {x: 1, y: 1}
        m_Offset: {x: 0, y: 0}
    - _BentNormalMapOS:
        m_Texture: {fileID: 0}
        m_Scale: {x: 1, y: 1}
        m_Offset: {x: 0, y: 0}
    - _CoatMaskMap:
        m_Texture: {fileID: 0}
        m_Scale: {x: 1, y: 1}
        m_Offset: {x: 0, y: 0}
    - _DetailMap:
        m_Texture: {fileID: 0}
        m_Scale: {x: 1, y: 1}
        m_Offset: {x: 0, y: 0}
    - _DistortionVectorMap:
        m_Texture: {fileID: 0}
        m_Scale: {x: 1, y: 1}
        m_Offset: {x: 0, y: 0}
    - _EmissiveColorMap:
        m_Texture: {fileID: 0}
        m_Scale: {x: 1, y: 1}
        m_Offset: {x: 0, y: 0}
    - _HeightMap:
        m_Texture: {fileID: 0}
        m_Scale: {x: 1, y: 1}
        m_Offset: {x: 0, y: 0}
    - _IridescenceMaskMap:
        m_Texture: {fileID: 0}
        m_Scale: {x: 1, y: 1}
        m_Offset: {x: 0, y: 0}
    - _IridescenceThicknessMap:
        m_Texture: {fileID: 0}
        m_Scale: {x: 1, y: 1}
        m_Offset: {x: 0, y: 0}
    - _MainTex:
        m_Texture: {fileID: 0}
        m_Scale: {x: 1, y: 1}
        m_Offset: {x: 0, y: 0}
    - _MaskMap:
        m_Texture: {fileID: 0}
        m_Scale: {x: 1, y: 1}
        m_Offset: {x: 0, y: 0}
    - _NormalMap:
        m_Texture: {fileID: 0}
        m_Scale: {x: 1, y: 1}
        m_Offset: {x: 0, y: 0}
    - _NormalMapOS:
        m_Texture: {fileID: 0}
        m_Scale: {x: 1, y: 1}
        m_Offset: {x: 0, y: 0}
    - _SpecularColorMap:
        m_Texture: {fileID: 0}
        m_Scale: {x: 1, y: 1}
        m_Offset: {x: 0, y: 0}
    - _SubsurfaceMaskMap:
        m_Texture: {fileID: 0}
        m_Scale: {x: 1, y: 1}
        m_Offset: {x: 0, y: 0}
    - _TangentMap:
        m_Texture: {fileID: 0}
        m_Scale: {x: 1, y: 1}
        m_Offset: {x: 0, y: 0}
    - _TangentMapOS:
        m_Texture: {fileID: 0}
        m_Scale: {x: 1, y: 1}
        m_Offset: {x: 0, y: 0}
    - _ThicknessMap:
        m_Texture: {fileID: 0}
        m_Scale: {x: 1, y: 1}
        m_Offset: {x: 0, y: 0}
    - _TransmittanceColorMap:
        m_Texture: {fileID: 0}
        m_Scale: {x: 1, y: 1}
        m_Offset: {x: 0, y: 0}
    m_Floats:
    - _AORemapMax: 1
    - _AORemapMin: 0
    - _ATDistance: 1
    - _AddPrecomputedVelocity: 0
    - _AlbedoAffectEmissive: 0
    - _AlphaCutoff: 0.5
    - _AlphaCutoffEnable: 0
    - _AlphaCutoffPostpass: 0.5
    - _AlphaCutoffPrepass: 0.5
    - _AlphaCutoffShadow: 0.5
    - _AlphaDstBlend: 0
    - _AlphaSrcBlend: 1
    - _Anisotropy: 0
    - _BlendMode: 0
    - _CoatMask: 0
    - _CullMode: 2
    - _CullModeForward: 2
    - _Cutoff: 0.5
    - _DepthOffsetEnable: 0
    - _DetailAlbedoScale: 1
    - _DetailNormalScale: 1
    - _DetailSmoothnessScale: 1
    - _DiffusionProfile: 0
    - _DiffusionProfileHash: 0
    - _DisplacementLockObjectScale: 1
    - _DisplacementLockTilingScale: 1
    - _DisplacementMode: 0
    - _DistortionBlendMode: 0
    - _DistortionBlurBlendMode: 0
    - _DistortionBlurDstBlend: 1
    - _DistortionBlurRemapMax: 1
    - _DistortionBlurRemapMin: 0
    - _DistortionBlurScale: 1
    - _DistortionBlurSrcBlend: 1
    - _DistortionDepthTest: 1
    - _DistortionDstBlend: 1
    - _DistortionEnable: 0
    - _DistortionScale: 1
    - _DistortionSrcBlend: 1
    - _DistortionVectorBias: -1
    - _DistortionVectorScale: 2
    - _DoubleSidedEnable: 0
    - _DoubleSidedNormalMode: 1
    - _DstBlend: 0
    - _EmissiveColorMode: 1
    - _EmissiveExposureWeight: 1
    - _EmissiveIntensity: 1
    - _EmissiveIntensityUnit: 0
    - _EnableBlendModePreserveSpecularLighting: 1
    - _EnableFogOnTransparent: 1
    - _EnableGeometricSpecularAA: 0
    - _EnergyConservingSpecularColor: 1
    - _HeightAmplitude: 0.02
    - _HeightCenter: 0.5
    - _HeightMapParametrization: 0
    - _HeightMax: 1
    - _HeightMin: -1
    - _HeightOffset: 0
    - _HeightPoMAmplitude: 2
    - _HeightTessAmplitude: 2
    - _HeightTessCenter: 0.5
    - _InvTilingScale: 1
    - _Ior: 1.5
    - _IridescenceMask: 1
    - _IridescenceThickness: 1
    - _LinkDetailsWithBase: 1
    - _MaterialID: 1
    - _Metallic: 0
    - _NormalMapSpace: 0
    - _NormalScale: 1
    - _PPDLodThreshold: 5
    - _PPDMaxSamples: 15
    - _PPDMinSamples: 5
    - _PPDPrimitiveLength: 1
    - _PPDPrimitiveWidth: 1
    - _ReceivesSSR: 1
    - _RefractionModel: 0
    - _SSRefractionProjectionModel: 0
    - _Smoothness: 0
    - _SmoothnessRemapMax: 1
    - _SmoothnessRemapMin: 0
    - _SpecularAAScreenSpaceVariance: 0.1
    - _SpecularAAThreshold: 0.2
    - _SpecularOcclusionMode: 1
    - _SrcBlend: 1
    - _StencilRef: 0
    - _StencilRefDepth: 8
    - _StencilRefDistortionVec: 4
    - _StencilRefGBuffer: 10
    - _StencilRefMV: 40
    - _StencilWriteMask: 6
    - _StencilWriteMaskDepth: 8
    - _StencilWriteMaskDistortionVec: 4
    - _StencilWriteMaskGBuffer: 14
    - _StencilWriteMaskMV: 40
    - _SubsurfaceMask: 1
    - _SupportDecals: 1
    - _SurfaceType: 0
    - _TexWorldScale: 1
    - _TexWorldScaleEmissive: 1
    - _Thickness: 1
    - _TransmissionEnable: 1
    - _TransparentBackfaceEnable: 0
    - _TransparentCullMode: 2
    - _TransparentDepthPostpassEnable: 0
    - _TransparentDepthPrepassEnable: 0
    - _TransparentSortPriority: 0
    - _TransparentWritingMotionVec: 0
    - _TransparentZWrite: 0
    - _UVBase: 0
    - _UVDetail: 0
    - _UVEmissive: 0
    - _UseEmissiveIntensity: 0
    - _UseShadowThreshold: 0
    - _ZTestDepthEqualForOpaque: 3
    - _ZTestGBuffer: 4
    - _ZTestModeDistortion: 4
    - _ZTestTransparent: 4
    - _ZWrite: 1
    m_Colors:
    - _BaseColor: {r: 0, g: 0, b: 0, a: 1}
    - _BaseColorMap_MipInfo: {r: 0, g: 0, b: 0, a: 0}
    - _Color: {r: 0, g: 0, b: 0, a: 1}
    - _DiffusionProfileAsset: {r: 0, g: 0, b: 0, a: 0}
    - _DoubleSidedConstants: {r: 1, g: 1, b: -1, a: 0}
    - _EmissionColor: {r: 1, g: 1, b: 1, a: 1}
    - _EmissiveColor: {r: 0, g: 0, b: 0, a: 1}
    - _EmissiveColorLDR: {r: 0, g: 0, b: 0, a: 1}
    - _InvPrimScale: {r: 1, g: 1, b: 0, a: 0}
    - _IridescenceThicknessRemap: {r: 0, g: 1, b: 0, a: 0}
    - _SpecularColor: {r: 1, g: 1, b: 1, a: 1}
    - _ThicknessRemap: {r: 0, g: 1, b: 0, a: 0}
    - _TransmittanceColor: {r: 1, g: 1, b: 1, a: 1}
    - _UVDetailsMappingMask: {r: 1, g: 0, b: 0, a: 0}
    - _UVMappingMask: {r: 1, g: 0, b: 0, a: 0}
    - _UVMappingMaskEmissive: {r: 1, g: 0, b: 0, a: 0}
--- !u!114 &4663154672378627698
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: da692e001514ec24dbc4cca1949ff7e8, type: 3}
  m_Name:
  m_EditorClassIdentifier:
  version: 2

repo_name: keijiro/Khoreo

repo_language: C#

mime_type: text/x-c++


text:
fileFormatVersion: 2
guid: 461c26cb7fbfff047a990fa397af7faf
folderAsset: yes
DefaultImporter:
  externalObjects: {}
  userData:
  assetBundleName:
  assetBundleVariant:


text:
fileFormatVersion: 2
guid: 9deab290ffbc3e84b8c7d9a8e90bcd84
folderAsset: yes
DefaultImporter:
  externalObjects: {}
  userData:
  assetBundleName:
  assetBundleVariant:


text:
fileFormatVersion: 2
guid: 23f6a495a337488478154d40235e1ed6
MonoImporter:
  externalObjects: {}
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:


text:
using UnityEngine;
using UnityEditor;

namespace Puppet
{
    [CanEditMultipleObjects]
    [CustomEditor(typeof(Dancer))]
    public class DancerEditor : Editor
    {
        SerializedProperty _footDistance;
        SerializedProperty _stepFrequency;
        SerializedProperty _stepHeight;
        SerializedProperty _stepAngle;
        SerializedProperty _maxDistance;

        SerializedProperty _hipHeight;
        SerializedProperty _hipPositionNoise;
        SerializedProperty _hipRotationNoise;

        SerializedProperty _spineBend;
        SerializedProperty _spineRotationNoise;

        SerializedProperty _handPosition;
        SerializedProperty _handPositionNoise;

        SerializedProperty _headMove;

        SerializedProperty _noiseFrequency;
        SerializedProperty _randomSeed;

        static class Styles
        {
            static public GUIContent bendAngle = new GUIContent("Bend Angle");
            static public GUIContent basePosition = new GUIContent("Base Position");
            static public GUIContent lookAtMove = new GUIContent("Look At Move");
            static public GUIContent noiseToPosition = new GUIContent("Position Noise");
            static public GUIContent noiseToRotation = new GUIContent("Rotation Noise");
        }

        void OnEnable()
        {
            _footDistance = serializedObject.FindProperty("_footDistance");
            _stepFrequency = serializedObject.FindProperty("_stepFrequency");
            _stepHeight = serializedObject.FindProperty("_stepHeight");
            _stepAngle = serializedObject.FindProperty("_stepAngle");
            _maxDistance = serializedObject.FindProperty("_maxDistance");

            _hipHeight = serializedObject.FindProperty("_hipHeight");
            _hipPositionNoise = serializedObject.FindProperty("_hipPositionNoise");
            _hipRotationNoise = serializedObject.FindProperty("_hipRotationNoise");

            _spineBend = serializedObject.FindProperty("_spineBend");
            _spineRotationNoise = serializedObject.FindProperty("_spineRotationNoise");

            _handPosition = serializedObject.FindProperty("_handPosition");
            _handPositionNoise = serializedObject.FindProperty("_handPositionNoise");

            _headMove = serializedObject.FindProperty("_headMove");

            _noiseFrequency = serializedObject.FindProperty("_noiseFrequency");
            _randomSeed = serializedObject.FindProperty("_randomSeed");
        }

        public override void OnInspectorGUI()
        {
            serializedObject.Update();

            EditorGUILayout.PropertyField(_randomSeed);
            EditorGUILayout.PropertyField(_noiseFrequency);

            EditorGUILayout.Space();

            EditorGUILayout.LabelField("Foot/Step", EditorStyles.boldLabel);
            EditorGUILayout.PropertyField(_footDistance);
            EditorGUILayout.PropertyField(_stepFrequency);
            EditorGUILayout.PropertyField(_stepHeight);
            EditorGUILayout.PropertyField(_stepAngle);
            EditorGUILayout.PropertyField(_maxDistance);

            EditorGUILayout.Space();

            EditorGUILayout.LabelField("Hip", EditorStyles.boldLabel);
            EditorGUILayout.PropertyField(_hipHeight);
            EditorGUILayout.PropertyField(_hipPositionNoise, Styles.noiseToPosition);
            EditorGUILayout.PropertyField(_hipRotationNoise, Styles.noiseToRotation);

            EditorGUILayout.Space();

            EditorGUILayout.LabelField("Spine", EditorStyles.boldLabel);
            EditorGUILayout.PropertyField(_spineBend, Styles.bendAngle);
            EditorGUILayout.PropertyField(_spineRotationNoise, Styles.noiseToRotation);

            EditorGUILayout.Space();

            EditorGUILayout.LabelField("Hand", EditorStyles.boldLabel);
            EditorGUILayout.PropertyField(_handPosition, Styles.basePosition);
            EditorGUILayout.PropertyField(_handPositionNoise, Styles.noiseToPosition);

            EditorGUILayout.Space();

            EditorGUILayout.LabelField("Head", EditorStyles.boldLabel);
            EditorGUILayout.PropertyField(_headMove, Styles.lookAtMove);

            serializedObject.ApplyModifiedProperties();
        }
    }
}


text:
fileFormatVersion: 2
guid: 62f6c92add0da7e4ab1909222c7352c1
MonoImporter:
  externalObjects: {}
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:


text:
using UnityEngine;
using Unity.Mathematics;
using Klak.Math;
using Noise = Klak.Math.NoiseHelper;

namespace Puppet
{

public sealed partial class Dancer
{
    #region Animation variables

    XXHash _hash;
    float2 _noise;

    // Foot positions
    float3[] _feet = new float3[2];

    // Global step parameter
    float _step;

    // Direction flip variable
    float _stepFlip = 1;

    #endregion

    #region Local enum

    // Left / Right
    enum Side { Left, Right }

    #endregion

    #region Utility functions

    static float3 Up => math.float3(0, 1, 0);

    static float  deg2rad(float  x) => math.radians(x);
    static float3 deg2rad(float3 x) => math.radians(x);

    #endregion

    #region Foot animation

    // Step count: What number the current step is
    int StepCount => (int)_step;

    // Step parameter: Progress of the current step
    float StepParam => _step - math.floor(_step);

    // Random seed of the current step
    uint StepSeed => (uint)StepCount * 100;

    // Which side the current/next pivot is on
    Side PivotSide => (Side)(StepCount & 1);
    Side NonPivotSide => (Side)((StepCount & 1) ^ 1);

    // Angle of the pivot rotation of the current step
    float StepAngle
      => _hash.Float(0.5f, 1.0f, StepSeed + 1) * _stepAngle * _stepFlip;

    // Pivot rotation at the end of the current step
    quaternion StepRotationFull
      => quaternion.RotateY(deg2rad(StepAngle));

    // Pivot rotation at the current frame
    quaternion StepRotation
      => quaternion.RotateY(deg2rad(StepAngle * StepParam));

    // The original height of the foot point
    float3 FootBias => Up * _animator.leftFeetBottomHeight;

    // Foot position
    float3 GetFootPosition(Side side)
    {
        var thisFoot = _feet[(int)side];
        var thatFoot = _feet[(int)side ^ 1];

        // If it's the pivot foot, return it immediately.
        if (side == PivotSide) return thisFoot + FootBias;

        // Horizontal move: Rotation around the pivot foot
        var rp = math.mul(StepRotation, thisFoot - thatFoot);

        // Horizontal move: Cosine wave (open - close - open)
        rp *= math.cos(StepParam * math.PI * 2) * 0.3f + 0.7f;

        // Vertical move: Sine wave with smooth step
        var offs = math.sin(math.smoothstep(0, 1, StepParam) * math.PI);
        offs *= _stepHeight;

        return thatFoot + rp + Up * offs + FootBias;
    }

    float3 LeftFootPosition => GetFootPosition(Side.Left);
    float3 RightFootPosition => GetFootPosition(Side.Right);

    // Direction vector of the current step
    float3 CurrentStepDirection
      => math.normalize(_feet[(int)NonPivotSide] - _feet[(int)PivotSide]);

    // Destination point of the current step
    float3 CurrentStepDestination
      => _feet[(int)PivotSide]
         + math.mul(StepRotationFull, CurrentStepDirection) * _footDistance;

    // Rotation of the pivot foot
    quaternion PivotFootRotation
      => quaternion.LookRotation
           (math.cross(RightFootPosition - LeftFootPosition, Up), Up);

    // Weight parameter for each foot
    float GetFootRotationWeight(Side side)
    {
        var p = (_step + (int)side) % 2;
        var down = math.smoothstep(1, 1.1f, p);
        var up = math.smoothstep(1.9f, 2, p);
        return math.max(1 - down, up) * 0.9f;
    }

    #endregion

    #region Lower body animation

    // Body (hip) position
    float3 GetBodyPosition()
    {
        // Horizontal move: Sine interpolation between the left/right feet
        var param = (1 - math.sin((_step % 2) * math.PI)) / 2;
        var pos = math.lerp(LeftFootPosition, RightFootPosition, param);

        // Vertical move: Two waves for a step
        var dy1 = math.cos(StepParam * math.PI * 4) * _stepHeight / 2;

        // Vertical noise
        var dy2 = noise.snoise(_noise) * _hipPositionNoise;

        return math.float3(pos.x, _hipHeight + dy1 + dy2, pos.z);
    }

    // Body (hip) rotation
    quaternion GetBodyRotation()
    {
        // Base offset
        var r1 = quaternion.RotateY(-math.PI / 2);

        // Right direction vector based on the foot positions
        var right = RightFootPosition - LeftFootPosition;
        right.y = 0;
        right = math.normalize(right);

        // Horizontal rotation
        var r2 = quaternion.LookRotation(right, Up);

        // Noise
        var r3 = Noise.Rotation(_noise, deg2rad(_hipRotationNoise), 0);

        return math.mul(math.mul(r1, r2), r3);
    }

    #endregion

    #region Upper body animation

    // Spine (spine/chest/upper chest) rotation
    quaternion GetSpineRotation()
    {
        // Constant bending
        var r1 = quaternion.RotateX(deg2rad(_spineBend));

        // Noise
        var r2 = Noise.Rotation(_noise, deg2rad(_spineRotationNoise), 1);

        return math.mul(r1, r2);
    }

    // Hand positions
    float3 GetHandPosition(Side side)
    {
        // Relative position
        var pos = (float3)_handPosition;
        if (side == Side.Left) pos.x *= -1;

        // Noise
        pos += Noise.Float3(_noise, 2 + (uint)side) * _handPositionNoise;

        // Chest transform
        pos = math.mul(_chestMatrix, math.float4(pos, 1)).xyz;

        return pos;
    }

    float3 LeftHandPosition => GetHandPosition(Side.Left);
    float3 RightHandPosition => GetHandPosition(Side.Right);

    // Finger rotations
    quaternion GetFingerRotation(Side side)
      => quaternion.Euler
           (Noise.Float3(_noise, 4 + (uint)side)
            * math.float3(0.7f, 0.3f, 0.3f) + math.float3(0.35f, 0, 0));

    // Look at position (for head movement)
    float3 GetLookAtPosition()
    {
        // Z plane constraint noise
        var pos = Noise.Float3(_noise, 6) * _headMove;
        pos.z = 2;

        // Body transform
        pos = math.mul(_animator.bodyRotation, pos);
        pos += (float3)_animator.bodyPosition;

        return pos;
    }

    #endregion

    #region Common methods

    void InitializeAnimationParameters()
    {
        // Random number/noise generators
        _hash = new XXHash(_randomSeed);
        _noise = _hash.Float2(-1000, 1000, 0);

        // Initial foot positions
        var origin = transform.position * math.float3(1, 0, 1);
        var foot = (float3)transform.right * _footDistance / 2;
        _feet[0] = origin - foot;
        _feet[1] = origin + foot;
    }

    void UpdateAnimationParameters()
    {
        var dt = Time.deltaTime;

        // Update the noise parameter.
        _noise.x += _noiseFrequency * dt;

        // Step parameter delta
        var delta = _stepFrequency * dt;

        // Check if the current step still continues.
        if (StepCount == (int)(_step + delta))
        {
            // The current step is still going:

            // Recalculate the non-pivot foot position.
            _feet[(int)NonPivotSide] =
              _feet[(int)PivotSide] + CurrentStepDirection * _footDistance;

            // Update the step parameter.
            _step += delta;
        }
        else
        {
            // The current step ends in this frame:

            // Put the foot at the destination.
            _feet[(int)NonPivotSide] = CurrentStepDestination;

            // Update the step parameter.
            _step += delta;

            // Randomly flip the direction.
            if (_hash.Float(StepSeed) > 0.5f) _stepFlip *= -1;

            // Check if the next destination is in the maxDistance range.
            var origin = transform.position;
            var dist = math.distance(CurrentStepDestination, origin);
            if (dist > _maxDistance)
            {
                // Try flipping the turn direction. Revert it if it makes the
                // destination further from the origin.
                _stepFlip *= -1;
                if (dist < math.distance(CurrentStepDestination, origin))
                    _stepFlip *= -1;
            }
        }
    }

    #endregion
}

}


text:
using UnityEngine;
using Unity.Mathematics;

namespace Puppet
{
    public sealed partial class Dancer : MonoBehaviour
    {
        #region Editable attributes

        [SerializeField] float _footDistance = 0;
        [SerializeField] float _stepFrequency = 0;
        [SerializeField] float _stepHeight = 0;
        [SerializeField] float _stepAngle = 0;
        [SerializeField] float _maxDistance = 0;

        [SerializeField] float _hipHeight = 0;
        [SerializeField] float _hipPositionNoise = 0;
        [SerializeField] float _hipRotationNoise = 0;

        [SerializeField] float _spineBend = 0;
        [SerializeField] Vector3 _spineRotationNoise = Vector3.zero;

        [SerializeField] Vector3 _handPosition = Vector3.zero;
        [SerializeField] Vector3 _handPositionNoise = Vector3.zero;

        [SerializeField] float _headMove = 0;

        [SerializeField] float _noiseFrequency = 0;
        [SerializeField] uint _randomSeed = 0;

        #endregion

        #region Private variables

        Animator _animator;

        // Chest bone matrix cache
        // Used to calculate the hand positions. Bone matrices are not
        // accessible from OnAnimatorIK, so we cache them in Update.
        float4x4 _chestMatrix;

        #endregion

        #region MonoBehaviour implementation

        void Start()
        {
            _animator = GetComponent<Animator>();

            InitializeAnimationParameters();
        }

        void Update()
        {
            UpdateAnimationParameters();

            // Update the chest matrix cache.
            var chest = _animator.GetBoneTransform(HumanBodyBones.Chest);
            _chestMatrix = chest.localToWorldMatrix;
        }

        void OnAnimatorIK(int layerIndex)
        {
            // Feet
            _animator.SetIKPosition(AvatarIKGoal.LeftFoot, LeftFootPosition);
            _animator.SetIKPosition(AvatarIKGoal.RightFoot, RightFootPosition);
            _animator.SetIKPositionWeight(AvatarIKGoal.LeftFoot, 1);
            _animator.SetIKPositionWeight(AvatarIKGoal.RightFoot, 1);

            var footr = PivotFootRotation;
            var lfw = GetFootRotationWeight(Side.Left);
            var rfw = GetFootRotationWeight(Side.Right);
            _animator.SetIKRotation(AvatarIKGoal.LeftFoot, footr);
            _animator.SetIKRotation(AvatarIKGoal.RightFoot, footr);
            _animator.SetIKRotationWeight(AvatarIKGoal.LeftFoot, lfw);
            _animator.SetIKRotationWeight(AvatarIKGoal.RightFoot, rfw);

            // Body (hip)
            _animator.bodyPosition = GetBodyPosition();
            _animator.bodyRotation = GetBodyRotation();

            // Spine
            var spine = GetSpineRotation();
            _animator.SetBoneLocalRotation(HumanBodyBones.Spine, spine);
            _animator.SetBoneLocalRotation(HumanBodyBones.Chest, spine);
            _animator.SetBoneLocalRotation(HumanBodyBones.UpperChest, spine);

            // Hands
            _animator.SetIKPosition(AvatarIKGoal.LeftHand, LeftHandPosition);
            _animator.SetIKPosition(AvatarIKGoal.RightHand, RightHandPosition);
            _animator.SetIKPositionWeight(AvatarIKGoal.LeftHand, 1);
            _animator.SetIKPositionWeight(AvatarIKGoal.RightHand, 1);

            // Left wrist and fingers
            var lfinger = GetFingerRotation(Side.Left);
            _animator.SetBoneLocalRotation(HumanBodyBones.LeftHand, lfinger);
            _animator.SetBoneLocalRotation(HumanBodyBones.LeftIndexProximal, lfinger);
            _animator.SetBoneLocalRotation(HumanBodyBones.LeftIndexIntermediate, lfinger);
            _animator.SetBoneLocalRotation(HumanBodyBones.LeftIndexDistal, lfinger);

            // Right wrist and fingers
            var rfinger = GetFingerRotation(Side.Right);
            _animator.SetBoneLocalRotation(HumanBodyBones.RightHand, rfinger);
            _animator.SetBoneLocalRotation(HumanBodyBones.RightIndexProximal, rfinger);
            _animator.SetBoneLocalRotation(HumanBodyBones.RightIndexIntermediate, rfinger);
            _animator.SetBoneLocalRotation(HumanBodyBones.RightIndexDistal, rfinger);

            // Head
            _animator.SetLookAtPosition(GetLookAtPosition());
            _animator.SetLookAtWeight(1);
        }

        #endregion
    }
}


text:
fileFormatVersion: 2
guid: 9469e0e3d01592541889b83af7503a30
MonoImporter:
  externalObjects: {}
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:


text:
fileFormatVersion: 2
guid: 74eacbddd55ba8c47a31b3087d99f2b9
MonoImporter:
  externalObjects: {}
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:


text:
using UnityEngine;

namespace Puppet
{
    public sealed partial class Dancer
    {
        public float footDistance {
            get => _footDistance;
            set => _footDistance = value;
        }

        public float stepFrequency {
            get => _stepFrequency;
            set => _stepFrequency = value;
        }

        public float stepHeight {
            get => _stepHeight;
            set => _stepHeight = value;
        }

        public float stepAngle {
            get => _stepAngle;
            set => _stepAngle = value;
        }

        public float maxDistance {
            get => _maxDistance;
            set => _maxDistance = value;
        }

        public float hipHeight {
            get => _hipHeight;
            set => _hipHeight = value;
        }

        public float hipPositionNoise {
            get => _hipPositionNoise;
            set => _hipPositionNoise = value;
        }

        public float hipRotationNoise {
            get => _hipRotationNoise;
            set => _hipRotationNoise = value;
        }

        public float spineBend {
            get => _spineBend;
            set => _spineBend = value;
        }

        public Vector3 spineRotationNoise {
            get => _spineRotationNoise;
            set => _spineRotationNoise = value;
        }

        public Vector3 handPosition {
            get => _handPosition;
            set => _handPosition = value;
        }

        public Vector3 handPositionNoise {
            get => _handPositionNoise;
            set => _handPositionNoise = value;
        }

        public float headMove {
            get => _headMove;
            set => _headMove = value;
        }

        public float noiseFrequency {
            get => _noiseFrequency;
            set => _noiseFrequency = value;
        }

        public uint randomSeed {
            get => _randomSeed;
            set => _randomSeed = value;
        }
    }
}


text:
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &-7089757308646879465
MonoBehaviour:
  m_ObjectHideFlags: 3
  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: bcf384b154398e341b6b29969c078198, type: 3}
  m_Name: MotionBlur
  m_EditorClassIdentifier:
  active: 1
  m_AdvancedMode: 0
  quality:
    m_OverrideState: 1
    m_Value: 1
  intensity:
    m_OverrideState: 1
    m_Value: 0.5
    min: 0
  maximumVelocity:
    m_OverrideState: 0
    m_Value: 200
    min: 0
    max: 1500
  minimumVelocity:
    m_OverrideState: 0
    m_Value: 2
    min: 0
    max: 64
  cameraRotationVelocityClamp:
    m_OverrideState: 0
    m_Value: 0.03
    min: 0
    max: 0.2
  depthComparisonExtent:
    m_OverrideState: 0
    m_Value: 1
    min: 0
    max: 20
  cameraMotionBlur:
    m_OverrideState: 0
    m_Value: 1
  m_SampleCount:
    m_OverrideState: 0
    m_Value: 8
    min: 2
--- !u!114 &-1016694868962581565
MonoBehaviour:
  m_ObjectHideFlags: 3
  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: 56b145d2b9ee1ac4f846968484e7485a, type: 3}
  m_Name: ContactShadows
  m_EditorClassIdentifier:
  active: 1
  m_AdvancedMode: 0
  quality:
    m_OverrideState: 0
    m_Value: 1
  enable:
    m_OverrideState: 1
    m_Value: 1
  length:
    m_OverrideState: 0
    m_Value: 0.15
    min: 0
    max: 1
  opacity:
    m_OverrideState: 0
    m_Value: 1
    min: 0
    max: 1
  distanceScaleFactor:
    m_OverrideState: 0
    m_Value: 0.5
    min: 0
    max: 1
  maxDistance:
    m_OverrideState: 0
    m_Value: 50
    min: 0
  fadeDistance:
    m_OverrideState: 0
    m_Value: 5
    min: 0
  m_SampleCount:
    m_OverrideState: 1
    m_Value: 12
    min: 4
    max: 64
--- !u!114 &11400000
MonoBehaviour:
  m_ObjectHideFlags: 0
  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: d7fd9488000d3734a9e00ee676215985, type: 3}
  m_Name: DefaultSettingsVolumeProfile
  m_EditorClassIdentifier:
  components:
  - {fileID: 7686318427622180703}
  - {fileID: -1016694868962581565}
  - {fileID: 7502528774814404555}
  - {fileID: 7542669330009093999}
  - {fileID: 1501199423866068322}
  - {fileID: 5315503232242033309}
  - {fileID: 1932259527246508038}
  - {fileID: 448115243408767295}
  - {fileID: -7089757308646879465}
--- !u!114 &448115243408767295
MonoBehaviour:
  m_ObjectHideFlags: 3
  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: 59b6606ef2548734bb6d11b9d160bc7e, type: 3}
  m_Name: HDRISky
  m_EditorClassIdentifier:
  active: 1
  m_AdvancedMode: 0
  rotation:
    m_OverrideState: 0
    m_Value: 0
    min: 0
    max: 360
  skyIntensityMode:
    m_OverrideState: 0
    m_Value: 0
  exposure:
    m_OverrideState: 1
    m_Value: 11
  multiplier:
    m_OverrideState: 0
    m_Value: 1
    min: 0
  upperHemisphereLuxValue:
    m_OverrideState: 0
    m_Value: 0.4660715
    min: 0
  upperHemisphereLuxColor:
    m_OverrideState: 0
    m_Value: {x: 0.18750614, y: 0.29181972, z: 0.5}
  desiredLuxValue:
    m_OverrideState: 0
    m_Value: 20000
  updateMode:
    m_OverrideState: 0
    m_Value: 0
  updatePeriod:
    m_OverrideState: 0
    m_Value: 0
    min: 0
  includeSunInBaking:
    m_OverrideState: 0
    m_Value: 0
  hdriSky:
    m_OverrideState: 1
    m_Value: {fileID: 8900000, guid: 8253d41e6e8b11a4cbe77a4f8f82934d, type: 3}
  enableBackplate:
    m_OverrideState: 0
    m_Value: 0
  backplateType:
    m_OverrideState: 0
    m_Value: 0
  groundLevel:
    m_OverrideState: 0
    m_Value: 0
  scale:
    m_OverrideState: 0
    m_Value: {x: 32, y: 32}
  projectionDistance:
    m_OverrideState: 0
    m_Value: 16
    min: 0.0000001
  plateRotation:
    m_OverrideState: 0
    m_Value: 0
    min: 0
    max: 360
  plateTexRotation:
    m_OverrideState: 0
    m_Value: 0
    min: 0
    max: 360
  plateTexOffset:
    m_OverrideState: 0
    m_Value: {x: 0, y: 0}
  blendAmount:
    m_OverrideState: 0
    m_Value: 0
    min: 0
    max: 100
  shadowTint:
    m_OverrideState: 0
    m_Value: {r: 0.5, g: 0.5, b: 0.5, a: 1}
    hdr: 0
    showAlpha: 1
    showEyeDropper: 1
  pointLightShadow:
    m_OverrideState: 0
    m_Value: 0
  dirLightShadow:
    m_OverrideState: 0
    m_Value: 0
  rectLightShadow:
    m_OverrideState: 0
    m_Value: 0
--- !u!114 &1501199423866068322
MonoBehaviour:
  m_ObjectHideFlags: 3
  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: 24f077503be6ae942a1e1245dbd53ea9, type: 3}
  m_Name: Bloom
  m_EditorClassIdentifier:
  active: 1
  m_AdvancedMode: 0
  quality:
    m_OverrideState: 1
    m_Value: 1
  threshold:
    m_OverrideState: 0
    m_Value: 0
    min: 0
  intensity:
    m_OverrideState: 1
    m_Value: 0.2
    min: 0
    max: 1
  scatter:
    m_OverrideState: 0
    m_Value: 0.7
    min: 0
    max: 1
  tint:
    m_OverrideState: 0
    m_Value: {r: 1, g: 1, b: 1, a: 1}
    hdr: 0
    showAlpha: 0
    showEyeDropper: 1
  dirtTexture:
    m_OverrideState: 0
    m_Value: {fileID: 0}
  dirtIntensity:
    m_OverrideState: 0
    m_Value: 0
    min: 0
  anamorphic:
    m_OverrideState: 0
    m_Value: 1
  m_Resolution:
    m_OverrideState: 0
    m_Value: 2
  m_HighQualityFiltering:
    m_OverrideState: 0
    m_Value: 1
--- !u!114 &1932259527246508038
MonoBehaviour:
  m_ObjectHideFlags: 3
  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: 0d7593b3a9277ac4696b20006c21dde2, type: 3}
  m_Name: VisualEnvironment
  m_EditorClassIdentifier:
  active: 1
  m_AdvancedMode: 0
  skyType:
    m_OverrideState: 1
    m_Value: 1
  skyAmbientMode:
    m_OverrideState: 0
    m_Value: 0
  fogType:
    m_OverrideState: 0
    m_Value: 0
--- !u!114 &5315503232242033309
MonoBehaviour:
  m_ObjectHideFlags: 3
  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: 2d08ce26990eb1a4a9177b860541e702, type: 3}
  m_Name: Exposure
  m_EditorClassIdentifier:
  active: 1
  m_AdvancedMode: 0
  mode:
    m_OverrideState: 1
    m_Value: 1
  meteringMode:
    m_OverrideState: 0
    m_Value: 2
  luminanceSource:
    m_OverrideState: 0
    m_Value: 1
  fixedExposure:
    m_OverrideState: 0
    m_Value: 0
  compensation:
    m_OverrideState: 1
    m_Value: 1
  limitMin:
    m_OverrideState: 0
    m_Value: -10
  limitMax:
    m_OverrideState: 0
    m_Value: 10
  curveMap:
    m_OverrideState: 0
    m_Value:
      serializedVersion: 2
      m_Curve:
      - serializedVersion: 3
        time: -10
        value: -10
        inSlope: 0
        outSlope: 1
        tangentMode: 0
        weightedMode: 0
        inWeight: 0
        outWeight: 0
      - serializedVersion: 3
        time: 20
        value: 20
        inSlope: 1
        outSlope: 0
        tangentMode: 0
        weightedMode: 0
        inWeight: 0
        outWeight: 0
      m_PreInfinity: 2
      m_PostInfinity: 2
      m_RotationOrder: 4
  adaptationMode:
    m_OverrideState: 0
    m_Value: 1
  adaptationSpeedDarkToLight:
    m_OverrideState: 0
    m_Value: 3
    min: 0.001
  adaptationSpeedLightToDark:
    m_OverrideState: 0
    m_Value: 1
    min: 0.001
--- !u!114 &7502528774814404555
MonoBehaviour:
  m_ObjectHideFlags: 3
  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: 9008a067f4d626c4d8bc4bc48f04bb89, type: 3}
  m_Name: AmbientOcclusion
  m_EditorClassIdentifier:
  active: 1
  m_AdvancedMode: 0
  quality:
    m_OverrideState: 0
    m_Value: 1
  rayTracing:
    m_OverrideState: 0
    m_Value: 0
  intensity:
    m_OverrideState: 1
    m_Value: 0.5
    min: 0
    max: 4
  directLightingStrength:
    m_OverrideState: 0
    m_Value: 0
    min: 0
    max: 1
  radius:
    m_OverrideState: 1
    m_Value: 1.5
    min: 0.25
    max: 5
  temporalAccumulation:
    m_OverrideState: 0
    m_Value: 1
  ghostingReduction:
    m_OverrideState: 0
    m_Value: 0.5
    min: 0
    max: 1
  blurSharpness:
    m_OverrideState: 0
    m_Value: 0.1
    min: 0
    max: 1
  layerMask:
    m_OverrideState: 0
    m_Value:
      serializedVersion: 2
      m_Bits: 4294967295
  rayLength:
    m_OverrideState: 0
    m_Value: 0.5
    min: 0
    max: 50
  sampleCount:
    m_OverrideState: 0
    m_Value: 4
    min: 1
    max: 64
  denoise:
    m_OverrideState: 0
    m_Value: 0
  denoiserRadius:
    m_OverrideState: 0
    m_Value: 0.5
    min: 0.001
    max: 1
  m_StepCount:
    m_OverrideState: 0
    m_Value: 6
    min: 2
    max: 32
  m_FullResolution:
    m_OverrideState: 0
    m_Value: 0
  m_MaximumRadiusInPixels:
    m_OverrideState: 0
    m_Value: 40
    min: 16
    max: 256
  m_BilateralUpsample:
    m_OverrideState: 0
    m_Value: 1
  m_DirectionCount:
    m_OverrideState: 0
    m_Value: 2
    min: 1
    max: 6
--- !u!114 &7542669330009093999
MonoBehaviour:
  m_ObjectHideFlags: 3
  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: f086a068d4c5889438831b3ae9afc11c, type: 3}
  m_Name: Tonemapping
  m_EditorClassIdentifier:
  active: 1
  m_AdvancedMode: 0
  mode:
    m_OverrideState: 1
    m_Value: 2
  toeStrength:
    m_OverrideState: 0
    m_Value: 0
    min: 0
    max: 1
  toeLength:
    m_OverrideState: 0
    m_Value: 0.5
    min: 0
    max: 1
  shoulderStrength:
    m_OverrideState: 0
    m_Value: 0
    min: 0
    max: 1
  shoulderLength:
    m_OverrideState: 0
    m_Value: 0.5
    min: 0
  shoulderAngle:
    m_OverrideState: 0
    m_Value: 0
    min: 0
    max: 1
  gamma:
    m_OverrideState: 0
    m_Value: 1
    min: 0.001
  lutTexture:
    m_OverrideState: 0
    m_Value: {fileID: 0}
  lutContribution:
    m_OverrideState: 0
    m_Value: 1
    min: 0
    max: 1
--- !u!114 &7686318427622180703
MonoBehaviour:
  m_ObjectHideFlags: 3
  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: 7ddcec8a8eb2d684d833ac8f5d26aebd, type: 3}
  m_Name: HDShadowSettings
  m_EditorClassIdentifier:
  active: 1
  m_AdvancedMode: 0
  maxShadowDistance:
    m_OverrideState: 1
    m_Value: 150
    min: 0
  directionalTransmissionMultiplier:
    m_OverrideState: 0
    m_Value: 1
    min: 0
    max: 1
  cascadeShadowSplitCount:
    m_OverrideState: 0
    m_Value: 4
    min: 1
    max: 4
  cascadeShadowSplit0:
    m_OverrideState: 0
    m_Value: 0.05
  cascadeShadowSplit1:
    m_OverrideState: 0
    m_Value: 0.15
  cascadeShadowSplit2:
    m_OverrideState: 0
    m_Value: 0.3
  cascadeShadowBorder0:
    m_OverrideState: 1
    m_Value: 0.13333334
  cascadeShadowBorder1:
    m_OverrideState: 1
    m_Value: 0.06666666
  cascadeShadowBorder2:
    m_OverrideState: 0
    m_Value: 0
  cascadeShadowBorder3:
    m_OverrideState: 0
    m_Value: 0


text:
fileFormatVersion: 2
guid: ad831f940d86ed843b2665672915653c
NativeFormatImporter:
  externalObjects: {}
  mainObjectFileID: 0
  userData:
  assetBundleName:
  assetBundleVariant:


text:
fileFormatVersion: 2
guid: 4e8ec2bc35623b84eb5519fcfe73917e
NativeFormatImporter:
  externalObjects: {}
  mainObjectFileID: 0
  userData:
  assetBundleName:
  assetBundleVariant:


text:
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &-3305224281371206947
MonoBehaviour:
  m_ObjectHideFlags: 3
  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: 953beb541740ddc499d005ee80c9ff29, type: 3}
  m_Name:
  m_EditorClassIdentifier:
  active: 1
  m_AdvancedMode: 0
  enabled:
    m_OverrideState: 1
    m_Value: 1
  colorMode:
    m_OverrideState: 0
    m_Value: 1
  color:
    m_OverrideState: 0
    m_Value: {r: 0.5, g: 0.5, b: 0.5, a: 1}
    hdr: 1
    showAlpha: 0
    showEyeDropper: 1
  maxFogDistance:
    m_OverrideState: 0
    m_Value: 5000
    min: 0
  mipFogMaxMip:
    m_OverrideState: 0
    m_Value: 0.5
    min: 0
    max: 1
  mipFogNear:
    m_OverrideState: 0
    m_Value: 0
    min: 0
  mipFogFar:
    m_OverrideState: 0
    m_Value: 1000
    min: 0
  baseHeight:
    m_OverrideState: 0
    m_Value: 0
  maximumHeight:
    m_OverrideState: 0
    m_Value: 50
  albedo:
    m_OverrideState: 0
    m_Value: {r: 1, g: 1, b: 1, a: 1}
    hdr: 0
    showAlpha: 1
    showEyeDropper: 1
  meanFreePath:
    m_OverrideState: 1
    m_Value: 200
    min: 1
  enableVolumetricFog:
    m_OverrideState: 1
    m_Value: 1
  anisotropy:
    m_OverrideState: 1
    m_Value: 0.65
    min: -1
    max: 1
  globalLightProbeDimmer:
    m_OverrideState: 0
    m_Value: 1
    min: 0
    max: 1
  depthExtent:
    m_OverrideState: 0
    m_Value: 64
    min: 0.1
  sliceDistributionUniformity:
    m_OverrideState: 0
    m_Value: 0.75
    min: 0
    max: 1
  filter:
    m_OverrideState: 0
    m_Value: 0
--- !u!114 &11400000
MonoBehaviour:
  m_ObjectHideFlags: 0
  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: d7fd9488000d3734a9e00ee676215985, type: 3}
  m_Name: Sky and Fog Settings Profile
  m_EditorClassIdentifier:
  components:
  - {fileID: 6775376097864012941}
  - {fileID: 7488742677745068149}
  - {fileID: -3305224281371206947}
--- !u!114 &6775376097864012941
MonoBehaviour:
  m_ObjectHideFlags: 3
  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: 0d7593b3a9277ac4696b20006c21dde2, type: 3}
  m_Name:
  m_EditorClassIdentifier:
  active: 1
  m_AdvancedMode: 0
  skyType:
    m_OverrideState: 1
    m_Value: 1
  skyAmbientMode:
    m_OverrideState: 0
    m_Value: 0
  fogType:
    m_OverrideState: 1
    m_Value: 3
--- !u!114 &7488742677745068149
MonoBehaviour:
  m_ObjectHideFlags: 3
  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: 59b6606ef2548734bb6d11b9d160bc7e, type: 3}
  m_Name: HDRISky
  m_EditorClassIdentifier:
  active: 1
  m_AdvancedMode: 0
  rotation:
    m_OverrideState: 0
    m_Value: 0
    min: 0
    max: 360
  skyIntensityMode:
    m_OverrideState: 0
    m_Value: 0
  exposure:
    m_OverrideState: 1
    m_Value: 10
  multiplier:
    m_OverrideState: 0
    m_Value: 1
    min: 0
  upperHemisphereLuxValue:
    m_OverrideState: 0
    m_Value: 0.46607146
    min: 0
  upperHemisphereLuxColor:
    m_OverrideState: 0
    m_Value: {x: 0.18750611, y: 0.29181966, z: 0.5}
  desiredLuxValue:
    m_OverrideState: 0
    m_Value: 20000
  updateMode:
    m_OverrideState: 0
    m_Value: 0
  updatePeriod:
    m_OverrideState: 0
    m_Value: 0
    min: 0
  includeSunInBaking:
    m_OverrideState: 0
    m_Value: 0
  hdriSky:
    m_OverrideState: 1
    m_Value: {fileID: 8900000, guid: 8253d41e6e8b11a4cbe77a4f8f82934d, type: 3}
  enableBackplate:
    m_OverrideState: 0
    m_Value: 0
  backplateType:
    m_OverrideState: 0
    m_Value: 0
  groundLevel:
    m_OverrideState: 0
    m_Value: 0
  scale:
    m_OverrideState: 0
    m_Value: {x: 32, y: 32}
  projectionDistance:
    m_OverrideState: 0
    m_Value: 16
    min: 0.0000001
  plateRotation:
    m_OverrideState: 0
    m_Value: 0
    min: 0
    max: 360
  plateTexRotation:
    m_OverrideState: 0
    m_Value: 0
    min: 0
    max: 360
  plateTexOffset:
    m_OverrideState: 0
    m_Value: {x: 0, y: 0}
  blendAmount:
    m_OverrideState: 0
    m_Value: 0
    min: 0
    max: 100
  shadowTint:
    m_OverrideState: 0
    m_Value: {r: 0.5, g: 0.5, b: 0.5, a: 1}
    hdr: 0
    showAlpha: 1
    showEyeDropper: 1
  pointLightShadow:
    m_OverrideState: 0
    m_Value: 0
  dirLightShadow:
    m_OverrideState: 0
    m_Value: 0
  rectLightShadow:
    m_OverrideState: 0
    m_Value: 0


text:
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
  m_ObjectHideFlags: 0
  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: b2686e09ec7aef44bad2843e4416f057, type: 3}
  m_Name: Skin Diffusion Profile
  m_EditorClassIdentifier:
  profile:
    name: Skin
    scatteringDistance: {r: 0.7568628, g: 0.32156864, b: 0.20000002, a: 1}
    transmissionTint: {r: 0.7568628, g: 0.32156864, b: 0.20000002, a: 1}
    texturingMode: 0
    transmissionMode: 0
    thicknessRemap: {x: 0, y: 8.152544}
    worldScale: 1
    ior: 1.4
    hash: 1075477546
  m_Version: 1
  profiles: []


text:
fileFormatVersion: 2
guid: 9f0097dbdf3a4784cb697a7b8e95fbfc
NativeFormatImporter:
  externalObjects: {}
  mainObjectFileID: 11400000
  userData:
  assetBundleName:
  assetBundleVariant:


text:
fileFormatVersion: 2
guid: 8545f159b3774a242b9de4ecfa46f953
NativeFormatImporter:
  externalObjects: {}
  mainObjectFileID: 0
  userData:
  assetBundleName:
  assetBundleVariant:


text:
fileFormatVersion: 2
guid: d984979c78e2d6641a8b411aad77babd
NativeFormatImporter:
  externalObjects: {}
  mainObjectFileID: 0
  userData:
  assetBundleName:
  assetBundleVariant:


text:
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
  m_ObjectHideFlags: 0
  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: b2686e09ec7aef44bad2843e4416f057, type: 3}
  m_Name: Foliage Diffusion Profile
  m_EditorClassIdentifier:
  profile:
    name: Foliage
    scatteringDistance: {r: 0.7568628, g: 0.7019608, b: 0.24313727, a: 1}
    transmissionTint: {r: 1, g: 1, b: 1, a: 1}
    texturingMode: 0
    transmissionMode: 1
    thicknessRemap: {x: 0, y: 0.2873168}
    worldScale: 1
    ior: 1.4
    hash: 1081692787
  m_Version: 1
  profiles: []


text:
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
  m_ObjectHideFlags: 0
  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: 0cf1dab834d4ec34195b920ea7bbf9ec, type: 3}
  m_Name: HDRenderPipelineAsset
  m_EditorClassIdentifier:
  m_Version: 14
  m_ObsoleteFrameSettings:
    overrides: 0
    enableShadow: 0
    enableContactShadows: 0
    enableShadowMask: 0
    enableSSR: 0
    enableSSAO: 0
    enableSubsurfaceScattering: 0
    enableTransmission: 0
    enableAtmosphericScattering: 0
    enableVolumetrics: 0
    enableReprojectionForVolumetrics: 0
    enableLightLayers: 0
    enableExposureControl: 1
    diffuseGlobalDimmer: 0
    specularGlobalDimmer: 0
    shaderLitMode: 0
    enableDepthPrepassWithDeferredRendering: 0
    enableTransparentPrepass: 0
    enableMotionVectors: 0
    enableObjectMotionVectors: 0
    enableDecals: 0
    enableRoughRefraction: 0
    enableTransparentPostpass: 0
    enableDistortion: 0
    enablePostprocess: 0
    enableOpaqueObjects: 0
    enableTransparentObjects: 0
    enableRealtimePlanarReflection: 0
    enableMSAA: 0
    enableAsyncCompute: 0
    runLightListAsync: 0
    runSSRAsync: 0
    runSSAOAsync: 0
    runContactShadowsAsync: 0
    runVolumeVoxelizationAsync: 0
    lightLoopSettings:
      overrides: 0
      enableDeferredTileAndCluster: 0
      enableComputeLightEvaluation: 0
      enableComputeLightVariants: 0
      enableComputeMaterialVariants: 0
      enableFptlForForwardOpaque: 0
      enableBigTilePrepass: 0
      isFptlEnabled: 0
  m_ObsoleteBakedOrCustomReflectionFrameSettings:
    overrides: 0
    enableShadow: 0
    enableContactShadows: 0
    enableShadowMask: 0
    enableSSR: 0
    enableSSAO: 0
    enableSubsurfaceScattering: 0
    enableTransmission: 0
    enableAtmosphericScattering: 0
    enableVolumetrics: 0
    enableReprojectionForVolumetrics: 0
    enableLightLayers: 0
    enableExposureControl: 1
    diffuseGlobalDimmer: 0
    specularGlobalDimmer: 0
    shaderLitMode: 0
    enableDepthPrepassWithDeferredRendering: 0
    enableTransparentPrepass: 0
    enableMotionVectors: 0
    enableObjectMotionVectors: 0
    enableDecals: 0
    enableRoughRefraction: 0
    enableTransparentPostpass: 0
    enableDistortion: 0
    enablePostprocess: 0
    enableOpaqueObjects: 0
    enableTransparentObjects: 0
    enableRealtimePlanarReflection: 0
    enableMSAA: 0
    enableAsyncCompute: 0
    runLightListAsync: 0
    runSSRAsync: 0
    runSSAOAsync: 0
    runContactShadowsAsync: 0
    runVolumeVoxelizationAsync: 0
    lightLoopSettings:
      overrides: 0
      enableDeferredTileAndCluster: 0
      enableComputeLightEvaluation: 0
      enableComputeLightVariants: 0
      enableComputeMaterialVariants: 0
      enableFptlForForwardOpaque: 0
      enableBigTilePrepass: 0
      isFptlEnabled: 0
  m_ObsoleteRealtimeReflectionFrameSettings:
    overrides: 0
    enableShadow: 0
    enableContactShadows: 0
    enableShadowMask: 0
    enableSSR: 0
    enableSSAO: 0
    enableSubsurfaceScattering: 0
    enableTransmission: 0
    enableAtmosphericScattering: 0
    enableVolumetrics: 0
    enableReprojectionForVolumetrics: 0
    enableLightLayers: 0
    enableExposureControl: 1
    diffuseGlobalDimmer: 0
    specularGlobalDimmer: 0
    shaderLitMode: 0
    enableDepthPrepassWithDeferredRendering: 0
    enableTransparentPrepass: 0
    enableMotionVectors: 0
    enableObjectMotionVectors: 0
    enableDecals: 0
    enableRoughRefraction: 0
    enableTransparentPostpass: 0
    enableDistortion: 0
    enablePostprocess: 0
    enableOpaqueObjects: 0
    enableTransparentObjects: 0
    enableRealtimePlanarReflection: 0
    enableMSAA: 0
    enableAsyncCompute: 0
    runLightListAsync: 0
    runSSRAsync: 0
    runSSAOAsync: 0
    runContactShadowsAsync: 0
    runVolumeVoxelizationAsync: 0
    lightLoopSettings:
      overrides: 0
      enableDeferredTileAndCluster: 0
      enableComputeLightEvaluation: 0
      enableComputeLightVariants: 0
      enableComputeMaterialVariants: 0
      enableFptlForForwardOpaque: 0
      enableBigTilePrepass: 0
      isFptlEnabled: 0
  m_RenderPipelineResources: {fileID: 11400000, guid: 3ce144cff5783da45aa5d4fdc2da14b7,
    type: 2}
  m_RenderPipelineRayTracingResources: {fileID: 0}
  m_DefaultVolumeProfile: {fileID: 11400000, guid: d07b34eae0d22c94fb935b73f3ef7c8e,
    type: 2}
  m_DefaultLookDevProfile: {fileID: 11400000, guid: 254c4fe87beb7be4fa72e1681edbed02,
    type: 2}
  m_RenderingPathDefaultCameraFrameSettings:
    bitDatas:
      data1: 70297877217101
      data2: 4539628425463136256
    lodBias: 1
    lodBiasMode: 0
    lodBiasQualityLevel: 0
    maximumLODLevel: 0
    maximumLODLevelMode: 0
    maximumLODLevelQualityLevel: 0
    materialQuality: 0
  m_RenderingPathDefaultBakedOrCustomReflectionFrameSettings:
    bitDatas:
      data1: 64942043591501
      data2: 4539628424389459968
    lodBias: 1
    lodBiasMode: 0
    lodBiasQualityLevel: 0
    maximumLODLevel: 0
    maximumLODLevelMode: 0
    maximumLODLevelQualityLevel: 0
    materialQuality: 0
  m_RenderingPathDefaultRealtimeReflectionFrameSettings:
    bitDatas:
      data1: 69554681159501
      data2: 4539628424657895424
    lodBias: 1
    lodBiasMode: 0
    lodBiasQualityLevel: 0
    maximumLODLevel: 0
    maximumLODLevelMode: 0
    maximumLODLevelQualityLevel: 0
    materialQuality: 0
  m_RenderPipelineSettings:
    supportShadowMask: 1
    supportSSR: 0
    supportSSAO: 1
    supportSubsurfaceScattering: 1
    increaseSssSampleCount: 0
    supportVolumetrics: 1
    increaseResolutionOfVolumetrics: 0
    supportLightLayers: 0
    lightLayerName0: Light Layer default
    lightLayerName1: Light Layer 1
    lightLayerName2: Light Layer 2
    lightLayerName3: Light Layer 3
    lightLayerName4: Light Layer 4
    lightLayerName5: Light Layer 5
    lightLayerName6: Light Layer 6
    lightLayerName7: Light Layer 7
    supportDistortion: 1
    supportTransparentBackface: 1
    supportTransparentDepthPrepass: 1
    supportTransparentDepthPostpass: 1
    colorBufferFormat: 74
    supportCustomPass: 1
    customBufferFormat: 12
    supportedLitShaderMode: 2
    supportDecals: 1
    msaaSampleCount: 1
    supportMotionVectors: 1
    supportRuntimeDebugDisplay: 1
    supportDitheringCrossFade: 1
    supportTerrainHole: 0
    supportRayTracing: 0
    lightLoopSettings:
      cookieAtlasSize: 2048
      cookieFormat: 74
      pointCookieSize: 128
      cubeCookieTexArraySize: 16
      cookieAtlasLastValidMip: 0
      cookieTexArraySize: 1
      planarReflectionAtlasSize: 1024
      reflectionProbeCacheSize: 64
      reflectionCubemapSize: 256
      reflectionCacheCompressed: 0
      planarReflectionCacheCompressed: 0
      skyReflectionSize: 256
      skyLightingOverrideLayerMask:
        serializedVersion: 2
        m_Bits: 0
      supportFabricConvolution: 0
      maxDirectionalLightsOnScreen: 16
      maxPunctualLightsOnScreen: 512
      maxAreaLightsOnScreen: 64
      maxEnvLightsOnScreen: 64
      maxDecalsOnScreen: 512
      maxPlanarReflectionOnScreen: 16
    hdShadowInitParams:
      maxShadowRequests: 128
      directionalShadowsDepthBits: 32
      shadowFilteringQuality: 1
      punctualLightShadowAtlas:
        shadowAtlasResolution: 4096
        shadowAtlasDepthBits: 32
        useDynamicViewportRescale: 1
      areaLightShadowAtlas:
        shadowAtlasResolution: 4096
        shadowAtlasDepthBits: 32
        useDynamicViewportRescale: 1
      shadowResolutionDirectional:
        m_Values: 00010000000200000004000000080000
        m_SchemaId:
          m_Id: With4Levels
      shadowResolutionPunctual:
        m_Values: 00010000000200000004000000080000
        m_SchemaId:
          m_Id: With4Levels
      shadowResolutionArea:
        m_Values: 00010000000200000004000000080000
        m_SchemaId:
          m_Id: With4Levels
      maxDirectionalShadowMapResolution: 2048
      maxPunctualShadowMapResolution: 2048
      maxAreaShadowMapResolution: 2048
      supportScreenSpaceShadows: 0
      maxScreenSpaceShadowSlots: 4
      screenSpaceShadowBufferFormat: 48
    decalSettings:
      drawDistance: 1000
      atlasWidth: 4096
      atlasHeight: 4096
      perChannelMask: 0
    postProcessSettings:
      m_LutSize: 32
      lutFormat: 48
      bufferFormat: 74
    dynamicResolutionSettings:
      enabled: 0
      maxPercentage: 100
      minPercentage: 100
      dynResType: 1
      upsampleFilter: 1
      forceResolution: 0
      forcedPercentage: 100
    lowresTransparentSettings:
      enabled: 1
      checkerboardDepthBuffer: 1
      upsampleType: 1
    xrSettings:
      singlePass: 1
      occlusionMesh: 1
      cameraJitter: 0
    postProcessQualitySettings:
      NearBlurSampleCount: 030000000500000008000000
      NearBlurMaxRadius:
      - 2
      - 4
      - 7
      FarBlurSampleCount: 04000000070000000e000000
      FarBlurMaxRadius:
      - 5
      - 8
      - 13
      DoFResolution: 040000000200000001000000
      DoFHighQualityFiltering: 000101
      MotionBlurSampleCount: 04000000080000000c000000
      BloomRes: 040000000200000002000000
      BloomHighQualityFiltering: 000101
      ChromaticAberrationMaxSamples: 03000000060000000c000000
    lightSettings:
      useContactShadow:
        m_Values:
        m_SchemaId:
          m_Id:
    maximumLODLevel:
      m_Values: 000000000000000000000000
      m_SchemaId:
        m_Id: With3Levels
    lodBias:
      m_Values:
      - 1
      - 1
      - 1
      m_SchemaId:
        m_Id: With3Levels
    lightingQualitySettings:
      AOStepCount: 040000000600000010000000
      AOFullRes: 000001
      AOMaximumRadiusPixels: 200000002800000050000000
      AOBilateralUpsample: 000101
      AODirectionCount: 010000000200000004000000
      ContactShadowSampleCount: 060000000a00000010000000
      SSRMaxRaySteps: 100000002000000040000000
  allowShaderVariantStripping: 1
  enableSRPBatcher: 1
  shaderVariantLogLevel: 0
  availableMaterialQualityLevels: -1
  m_DefaultMaterialQualityLevel: 4
  diffusionProfileSettings: {fileID: 0}
  diffusionProfileSettingsList:
  - {fileID: 11400000, guid: ad831f940d86ed843b2665672915653c, type: 2}
  - {fileID: 11400000, guid: 9f0097dbdf3a4784cb697a7b8e95fbfc, type: 2}
  beforeTransparentCustomPostProcesses: []
  beforePostProcessCustomPostProcesses: []
  afterPostProcessCustomPostProcesses:
  - Kino.PostProcessing.Recolor, Kino.Postprocessing, Version=0.0.0.0, Culture=neutral,
    PublicKeyToken=null
  - Kino.PostProcessing.Slice, Kino.Postprocessing, Version=0.0.0.0, Culture=neutral,
    PublicKeyToken=null
  - Kino.PostProcessing.Overlay, Kino.Postprocessing, Version=0.0.0.0, Culture=neutral,
    PublicKeyToken=null
  - Kino.PostProcessing.Glitch, Kino.Postprocessing, Version=0.0.0.0, Culture=neutral,
    PublicKeyToken=null
  - Kino.PostProcessing.Utility, Kino.Postprocessing, Version=0.0.0.0, Culture=neutral,
    PublicKeyToken=null


text:
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &1357569919786384354
GameObject:
  m_ObjectHideFlags: 0
  m_CorrespondingSourceObject: {fileID: 0}
  m_PrefabInstance: {fileID: 0}
  m_PrefabAsset: {fileID: 0}
  serializedVersion: 6
  m_Component:
  - component: {fileID: 1593205710513468862}
  - component: {fileID: 1167239801420306679}
  - component: {fileID: 246949571376715543}
  - component: {fileID: 1612986841743735477}
  m_Layer: 0
  m_Name: Main Camera
  m_TagString: MainCamera
  m_Icon: {fileID: 0}
  m_NavMeshLayer: 0
  m_StaticEditorFlags: 0
  m_IsActive: 1
--- !u!4 &1593205710513468862
Transform:
  m_ObjectHideFlags: 0
  m_CorrespondingSourceObject: {fileID: 0}
  m_PrefabInstance: {fileID: 0}
  m_PrefabAsset: {fileID: 0}
  m_GameObject: {fileID: 1357569919786384354}
  m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
  m_LocalPosition: {x: 0, y: 1, z: -10}
  m_LocalScale: {x: 1, y: 1, z: 1}
  m_Children: []
  m_Father: {fileID: 3321477440709210067}
  m_RootOrder: 0
  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!20 &1167239801420306679
Camera:
  m_ObjectHideFlags: 0
  m_CorrespondingSourceObject: {fileID: 0}
  m_PrefabInstance: {fileID: 0}
  m_PrefabAsset: {fileID: 0}
  m_GameObject: {fileID: 1357569919786384354}
  m_Enabled: 1
  serializedVersion: 2
  m_ClearFlags: 1
  m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
  m_projectionMatrixMode: 1
  m_GateFitMode: 2
  m_FOVAxisMode: 0
  m_SensorSize: {x: 36, y: 24}
  m_LensShift: {x: 0, y: 0}
  m_FocalLength: 50
  m_NormalizedViewPortRect:
    serializedVersion: 2
    x: 0
    y: 0
    width: 1
    height: 1
  near clip plane: 0.3
  far clip plane: 1000
  field of view: 60
  orthographic: 0
  orthographic size: 5
  m_Depth: -1
  m_CullingMask:
    serializedVersion: 2
    m_Bits: 4294967295
  m_RenderingPath: -1
  m_TargetTexture: {fileID: 0}
  m_TargetDisplay: 0
  m_TargetEye: 3
  m_HDR: 0
  m_AllowMSAA: 0
  m_AllowDynamicResolution: 0
  m_ForceIntoRT: 0
  m_OcclusionCulling: 1
  m_StereoConvergence: 10
  m_StereoSeparation: 0.022
--- !u!81 &246949571376715543
AudioListener:
  m_ObjectHideFlags: 0
  m_CorrespondingSourceObject: {fileID: 0}
  m_PrefabInstance: {fileID: 0}
  m_PrefabAsset: {fileID: 0}
  m_GameObject: {fileID: 1357569919786384354}
  m_Enabled: 1
--- !u!114 &1612986841743735477
MonoBehaviour:
  m_ObjectHideFlags: 0
  m_CorrespondingSourceObject: {fileID: 0}
  m_PrefabInstance: {fileID: 0}
  m_PrefabAsset: {fileID: 0}
  m_GameObject: {fileID: 1357569919786384354}
  m_Enabled: 1
  m_EditorHideFlags: 0
  m_Script: {fileID: 11500000, guid: 23c1ce4fb46143f46bc5cb5224c934f6, type: 3}
  m_Name:
  m_EditorClassIdentifier:
  m_Version: 7
  m_ObsoleteRenderingPath: 0
  m_ObsoleteFrameSettings:
    overrides: 0
    enableShadow: 0
    enableContactShadows: 0
    enableShadowMask: 0
    enableSSR: 0
    enableSSAO: 0
    enableSubsurfaceScattering: 0
    enableTransmission: 0
    enableAtmosphericScattering: 0
    enableVolumetrics: 0
    enableReprojectionForVolumetrics: 0
    enableLightLayers: 0
    enableExposureControl: 1
    diffuseGlobalDimmer: 0
    specularGlobalDimmer: 0
    shaderLitMode: 0
    enableDepthPrepassWithDeferredRendering: 0
    enableTransparentPrepass: 0
    enableMotionVectors: 0
    enableObjectMotionVectors: 0
    enableDecals: 0
    enableRoughRefraction: 0
    enableTransparentPostpass: 0
    enableDistortion: 0
    enablePostprocess: 0
    enableOpaqueObjects: 0
    enableTransparentObjects: 0
    enableRealtimePlanarReflection: 0
    enableMSAA: 0
    enableAsyncCompute: 0
    runLightListAsync: 0
    runSSRAsync: 0
    runSSAOAsync: 0
    runContactShadowsAsync: 0
    runVolumeVoxelizationAsync: 0
    lightLoopSettings:
      overrides: 0
      enableDeferredTileAndCluster: 0
      enableComputeLightEvaluation: 0
      enableComputeLightVariants: 0
      enableComputeMaterialVariants: 0
      enableFptlForForwardOpaque: 0
      enableBigTilePrepass: 0
      isFptlEnabled: 0
  clearColorMode: 0
  backgroundColorHDR: {r: 0.025, g: 0.07, b: 0.19, a: 0}
  clearDepth: 1
  volumeLayerMask:
    serializedVersion: 2
    m_Bits: 1
  volumeAnchorOverride: {fileID: 0}
  antialiasing: 0
  SMAAQuality: 2
  dithering: 0
  stopNaNs: 0
  taaSharpenStrength: 0.6
  physicalParameters:
    m_Iso: 200
    m_ShutterSpeed: 0.005
    m_Aperture: 16
    m_BladeCount: 5
    m_Curvature: {x: 2, y: 11}
    m_BarrelClipping: 0.25
    m_Anamorphism: 0
  flipYMode: 0
  fullscreenPassthrough: 0
  allowDynamicResolution: 0
  customRenderingSettings: 0
  invertFaceCulling: 0
  probeLayerMask:
    serializedVersion: 2
    m_Bits: 4294967295
  hasPersistentHistory: 0
  m_RenderingPathCustomFrameSettings:
    bitDatas:
      data1: 734440390720
      data2: 536805376
    lodBias: 1
    lodBiasMode: 0
    lodBiasQualityLevel: 0
    maximumLODLevel: 0
    maximumLODLevelMode: 0
    maximumLODLevelQualityLevel: 0
    materialQuality: 0
  renderingPathCustomFrameSettingsOverrideMask:
    mask:
      data1: 0
      data2: 0
  defaultFrameSettings: 0
--- !u!1 &4983735487394053334
GameObject:
  m_ObjectHideFlags: 0
  m_CorrespondingSourceObject: {fileID: 0}
  m_PrefabInstance: {fileID: 0}
  m_PrefabAsset: {fileID: 0}
  serializedVersion: 6
  m_Component:
  - component: {fileID: 6036082589011171296}
  - component: {fileID: 7240076251166687866}
  m_Layer: 0
  m_Name: Sky and Fog Volume
  m_TagString: Untagged
  m_Icon: {fileID: 0}
  m_NavMeshLayer: 0
  m_StaticEditorFlags: 0
  m_IsActive: 1
--- !u!4 &6036082589011171296
Transform:
  m_ObjectHideFlags: 0
  m_CorrespondingSourceObject: {fileID: 0}
  m_PrefabInstance: {fileID: 0}
  m_PrefabAsset: {fileID: 0}
  m_GameObject: {fileID: 4983735487394053334}
  m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
  m_LocalPosition: {x: -3.9172678, y: -0.07954121, z: 5.81527}
  m_LocalScale: {x: 1, y: 1, z: 1}
  m_Children: []
  m_Father: {fileID: 3321477440709210067}
  m_RootOrder: 2
  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &7240076251166687866
MonoBehaviour:
  m_ObjectHideFlags: 0
  m_CorrespondingSourceObject: {fileID: 0}
  m_PrefabInstance: {fileID: 0}
  m_PrefabAsset: {fileID: 0}
  m_GameObject: {fileID: 4983735487394053334}
  m_Enabled: 1
  m_EditorHideFlags: 0
  m_Script: {fileID: 11500000, guid: 172515602e62fb746b5d573b38a5fe58, type: 3}
  m_Name:
  m_EditorClassIdentifier:
  isGlobal: 1
  priority: 0
  blendDistance: 0
  weight: 1
  sharedProfile: {fileID: 11400000, guid: 64d0a8af6f49caf40ba9a93ecc9f9714, type: 2}
--- !u!1 &5710712751814275007
GameObject:
  m_ObjectHideFlags: 0
  m_CorrespondingSourceObject: {fileID: 0}
  m_PrefabInstance: {fileID: 0}
  m_PrefabAsset: {fileID: 0}
  serializedVersion: 6
  m_Component:
  - component: {fileID: 604574683031968705}
  - component: {fileID: 7643073095026524292}
  - component: {fileID: 1577589821597124969}
  m_Layer: 0
  m_Name: Directional Light
  m_TagString: Untagged
  m_Icon: {fileID: 0}
  m_NavMeshLayer: 0
  m_StaticEditorFlags: 0
  m_IsActive: 1
--- !u!4 &604574683031968705
Transform:
  m_ObjectHideFlags: 0
  m_CorrespondingSourceObject: {fileID: 0}
  m_PrefabInstance: {fileID: 0}
  m_PrefabAsset: {fileID: 0}
  m_GameObject: {fileID: 5710712751814275007}
  m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261}
  m_LocalPosition: {x: 0, y: 3, z: 0}
  m_LocalScale: {x: 1, y: 1, z: 1}
  m_Children: []
  m_Father: {fileID: 3321477440709210067}
  m_RootOrder: 1
  m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
--- !u!108 &7643073095026524292
Light:
  m_ObjectHideFlags: 0
  m_CorrespondingSourceObject: {fileID: 0}
  m_PrefabInstance: {fileID: 0}
  m_PrefabAsset: {fileID: 0}
  m_GameObject: {fileID: 5710712751814275007}
  m_Enabled: 1
  serializedVersion: 10
  m_Type: 1
  m_Shape: 0
  m_Color: {r: 1, g: 1, b: 1, a: 1}
  m_Intensity: 10000
  m_Range: 10
  m_SpotAngle: 30
  m_InnerSpotAngle: 21.80208
  m_CookieSize: 10
  m_Shadows:
    m_Type: 2
    m_Resolution: -1
    m_CustomResolution: -1
    m_Strength: 1
    m_Bias: 0.05
    m_NormalBias: 0.4
    m_NearPlane: 0.2
    m_CullingMatrixOverride:
      e00: 1
      e01: 0
      e02: 0
      e03: 0
      e10: 0
      e11: 1
      e12: 0
      e13: 0
      e20: 0
      e21: 0
      e22: 1
      e23: 0
      e30: 0
      e31: 0
      e32: 0
      e33: 1
    m_UseCullingMatrixOverride: 0
  m_Cookie: {fileID: 0}
  m_DrawHalo: 0
  m_Flare: {fileID: 0}
  m_RenderMode: 0
  m_CullingMask:
    serializedVersion: 2
    m_Bits: 4294967295
  m_RenderingLayerMask: 1
  m_Lightmapping: 4
  m_LightShadowCasterMode: 2
  m_AreaSize: {x: 1, y: 1}
  m_BounceIntensity: 1
  m_ColorTemperature: 5500
  m_UseColorTemperature: 1
  m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0}
  m_UseBoundingSphereOverride: 0
  m_ShadowRadius: 0
  m_ShadowAngle: 0.53
--- !u!114 &1577589821597124969
MonoBehaviour:
  m_ObjectHideFlags: 0
  m_CorrespondingSourceObject: {fileID: 0}
  m_PrefabInstance: {fileID: 0}
  m_PrefabAsset: {fileID: 0}
  m_GameObject: {fileID: 5710712751814275007}
  m_Enabled: 1
  m_EditorHideFlags: 0
  m_Script: {fileID: 11500000, guid: 7a68c43fe1f2a47cfa234b5eeaa98012, type: 3}
  m_Name:
  m_EditorClassIdentifier:
  m_Version: 9
  m_ObsoleteShadowResolutionTier: 1
  m_ObsoleteUseShadowQualitySettings: 0
  m_ObsoleteCustomShadowResolution: 512
  m_ObsoleteContactShadows: 0
  m_PointlightHDType: 0
  m_SpotLightShape: 0
  m_AreaLightShape: 0
  m_Intensity: 10000
  m_EnableSpotReflector: 0
  m_LuxAtDistance: 1
  m_InnerSpotPercent: 0
  m_LightDimmer: 1
  m_VolumetricDimmer: 1
  m_LightUnit: 2
  m_FadeDistance: 10000
  m_AffectDiffuse: 1
  m_AffectSpecular: 1
  m_NonLightmappedOnly: 0
  m_ShapeWidth: 0.5
  m_ShapeHeight: 0.5
  m_AspectRatio: 1
  m_ShapeRadius: 0
  m_SoftnessScale: 1
  m_UseCustomSpotLightShadowCone: 0
  m_CustomSpotLightShadowCone: 30
  m_MaxSmoothness: 0.99
  m_ApplyRangeAttenuation: 1
  m_DisplayAreaLightEmissiveMesh: 0
  m_AreaLightCookie: {fileID: 0}
  m_AreaLightShadowCone: 120
  m_UseScreenSpaceShadows: 0
  m_InteractsWithSky: 1
  m_AngularDiameter: 0.53
  m_FlareSize: 2
  m_FlareTint: {r: 1, g: 1, b: 1, a: 1}
  m_FlareFalloff: 4
  m_SurfaceTexture: {fileID: 0}
  m_SurfaceTint: {r: 1, g: 1, b: 1, a: 1}
  m_Distance: 150000000
  m_UseRayTracedShadows: 0
  m_NumRayTracingSamples: 4
  m_FilterTracedShadow: 1
  m_FilterSizeTraced: 16
  m_SunLightConeAngle: 0.5
  m_LightShadowRadius: 0.5
  m_ColorShadow: 1
  m_EvsmExponent: 15
  m_EvsmLightLeakBias: 0
  m_EvsmVarianceBias: 0.00001
  m_EvsmBlurPasses: 0
  m_LightlayersMask: 1
  m_LinkShadowLayers: 1
  m_ShadowNearPlane: 0.1
  m_BlockerSampleCount: 24
  m_FilterSampleCount: 16
  m_MinFilterSize: 0.01
  m_KernelSize: 5
  m_LightAngle: 1
  m_MaxDepthBias: 0.001
  m_ShadowResolution:
    m_Override: 512
    m_UseOverride: 1
    m_Level: 1
  m_ShadowDimmer: 1
  m_VolumetricShadowDimmer: 1
  m_ShadowFadeDistance: 10000
  m_UseContactShadow:
    m_Override: 0
    m_UseOverride: 1
    m_Level: 0
  m_RayTracedContactShadow: 0
  m_ShadowTint: {r: 0, g: 0, b: 0, a: 1}
  m_PenumbraTint: 0
  m_NormalBias: 0.75
  m_SlopeBias: 0.5
  m_ShadowUpdateMode: 0
  m_BarnDoorAngle: 90
  m_BarnDoorLength: 0.05
  m_ShadowCascadeRatios:
  - 0.05
  - 0.2
  - 0.3
  m_ShadowCascadeBorders:
  - 0.2
  - 0.2
  - 0.2
  - 0.2
  m_ShadowAlgorithm: 0
  m_ShadowVariant: 0
  m_ShadowPrecision: 0
  useOldInspector: 0
  useVolumetric: 1
  featuresFoldout: 1
  showAdditionalSettings: 0
--- !u!1 &5823510469358171751
GameObject:
  m_ObjectHideFlags: 0
  m_CorrespondingSourceObject: {fileID: 0}
  m_PrefabInstance: {fileID: 0}
  m_PrefabAsset: {fileID: 0}
  serializedVersion: 6
  m_Component:
  - component: {fileID: 3321477440709210067}
  m_Layer: 0
  m_Name: Root
  m_TagString: Untagged
  m_Icon: {fileID: 0}
  m_NavMeshLayer: 0
  m_StaticEditorFlags: 0
  m_IsActive: 1
--- !u!4 &3321477440709210067
Transform:
  m_ObjectHideFlags: 0
  m_CorrespondingSourceObject: {fileID: 0}
  m_PrefabInstance: {fileID: 0}
  m_PrefabAsset: {fileID: 0}
  m_GameObject: {fileID: 5823510469358171751}
  m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
  m_LocalPosition: {x: 0, y: 0, z: 0}
  m_LocalScale: {x: 1, y: 1, z: 1}
  m_Children:
  - {fileID: 1593205710513468862}
  - {fileID: 604574683031968705}
  - {fileID: 6036082589011171296}
  m_Father: {fileID: 0}
  m_RootOrder: 0
  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}


text:
fileFormatVersion: 2
guid: a683d0c776c00e246add61b896b61bdd
PrefabImporter:
  externalObjects: {}
  userData:
  assetBundleName:
  assetBundleVariant:


text:
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
  m_ObjectHideFlags: 0
  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: cd0a560c562a33e4b94f515804e2bd27, type: 3}
  m_Name: VFXDefaultResources
  m_EditorClassIdentifier:
  particleTexture: {fileID: 2800000, guid: 276d9e395ae18fe40a9b4988549f2349, type: 3}
  noiseTexture: {fileID: 2800000, guid: 1d8481de16af723418a688958c41224b, type: 3}
  vectorField: {fileID: 11700000, guid: 08937e3134903c5488be506a2dac71e9, type: 2}
  signedDistanceField: {fileID: 11700000, guid: 5c2949c31aafddd4e8011ffdebb8fdf7,
    type: 2}
  mesh: {fileID: 10208, guid: 0000000000000000e000000000000000, type: 0}
  animationCurve:
    serializedVersion: 2
    m_Curve:
    - serializedVersion: 3
      time: 0
      value: 0
      inSlope: 0
      outSlope: 0
      tangentMode: 0
      weightedMode: 0
      inWeight: 0
      outWeight: 0
    - serializedVersion: 3
      time: 0.25
      value: 0.25
      inSlope: 0
      outSlope: 0
      tangentMode: 0
      weightedMode: 0
      inWeight: 0
      outWeight: 0
    - serializedVersion: 3
      time: 1
      value: 0
      inSlope: 0
      outSlope: 0
      tangentMode: 0
      weightedMode: 0
      inWeight: 0
      outWeight: 0
    m_PreInfinity: 2
    m_PostInfinity: 2
    m_RotationOrder: 4
  gradient:
    serializedVersion: 2
    key0: {r: 1, g: 1, b: 1, a: 0}
    key1: {r: 0.5, g: 0.5, b: 0.5, a: 1}
    key2: {r: 0, g: 0, b: 0, a: 0.8}
    key3: {r: 0, g: 0, b: 0, a: 0}
    key4: {r: 0, g: 0, b: 0, a: 0}
    key5: {r: 0, g: 0, b: 0, a: 0}
    key6: {r: 0, g: 0, b: 0, a: 0}
    key7: {r: 0, g: 0, b: 0, a: 0}
    ctime0: 0
    ctime1: 65535
    ctime2: 0
    ctime3: 0
    ctime4: 0
    ctime5: 0
    ctime6: 0
    ctime7: 0
    atime0: 0
    atime1: 6554
    atime2: 52428
    atime3: 65535
    atime4: 0
    atime5: 0
    atime6: 0
    atime7: 0
    m_Mode: 0
    m_NumColorKeys: 2
    m_NumAlphaKeys: 4
  gradientMapRamp:
    serializedVersion: 2
    key0: {r: 0, g: 0, b: 0, a: 0}
    key1: {r: 0.75, g: 0.15, b: 0, a: 1}
    key2: {r: 1.25, g: 0.56, b: 0.12, a: 0}
    key3: {r: 3.5, g: 2, b: 0.5, a: 0}
    key4: {r: 4, g: 3.5, b: 1.2, a: 0}
    key5: {r: 12, g: 10, b: 2.5, a: 0}
    key6: {r: 0, g: 0, b: 0, a: 0}
    key7: {r: 0, g: 0, b: 0, a: 0}
    ctime0: 0
    ctime1: 19661
    ctime2: 32768
    ctime3: 45875
    ctime4: 58982
    ctime5: 65535
    ctime6: 0
    ctime7: 0
    atime0: 0
    atime1: 65535
    atime2: 0
    atime3: 0
    atime4: 0
    atime5: 0
    atime6: 0
    atime7: 0
    m_Mode: 0
    m_NumColorKeys: 6
    m_NumAlphaKeys: 2
  shader: {fileID: 4800000, guid: cd270bc83dc0ce644bf351c3f5b7f30f, type: 3}


text:
fileFormatVersion: 2
guid: d07b34eae0d22c94fb935b73f3ef7c8e
NativeFormatImporter:
  externalObjects: {}
  mainObjectFileID: 0
  userData:
  assetBundleName:
  assetBundleVariant:


text:
fileFormatVersion: 2
guid: 05b03911ecb17cc45a6199075f6b59b0
folderAsset: yes
DefaultImporter:
  externalObjects: {}
  userData:
  assetBundleName:
  assetBundleVariant:


text:
fileFormatVersion: 2
guid: dd4a72edec07c4c4c94a8ab10f321efd
folderAsset: yes
DefaultImporter:
  externalObjects: {}
  userData:
  assetBundleName:
  assetBundleVariant:


text:
using UnityEngine;
using UnityEditor;

namespace BurstWig
{
    [CustomEditor(typeof(WigController))]
    sealed class WigControllerEditor : Editor
    {
        SerializedProperty _source;
        SerializedProperty _target;
        SerializedProperty _segmentCount;
        SerializedProperty _randomSeed;

        SerializedProperty _length;
        SerializedProperty _lengthRandomness;
        SerializedProperty _spring;
        SerializedProperty _damping;
        SerializedProperty _gravity;
        SerializedProperty _noiseAmplitude;
        SerializedProperty _noiseFrequency;
        SerializedProperty _noiseSpeed;

        static class Labels
        {
            public static Label Randomness = "Randomness";
            public static Label NoiseField = "Noise Field";
            public static Label Frequency  = "Frequency";
            public static Label Amplitude  = "Amplitude";
            public static Label Speed      = "Speed";
        }

        void OnEnable()
        {
            var finder = new PropertyFinder(serializedObject);

            _source       = finder["_source"];
            _target       = finder["_target"];
            _segmentCount = finder["_segmentCount"];
            _randomSeed   = finder["_randomSeed"];

            _length           = finder["_profile.length"];
            _lengthRandomness = finder["_profile.lengthRandomness"];
            _spring           = finder["_profile.spring"];
            _damping          = finder["_profile.damping"];
            _gravity          = finder["_profile.gravity"];
            _noiseAmplitude   = finder["_profile.noiseAmplitude"];
            _noiseFrequency   = finder["_profile.noiseFrequency"];
            _noiseSpeed       = finder["_profile.noiseSpeed"];
        }

        public override void OnInspectorGUI()
        {
            serializedObject.Update();

            EditorGUILayout.PropertyField(_source);
            EditorGUILayout.PropertyField(_target);

            EditorGUILayout.Space();

            EditorGUILayout.PropertyField(_segmentCount);
            EditorGUILayout.PropertyField(_randomSeed);

            EditorGUILayout.Space();

            EditorGUILayout.Slider(_length, 0.1f, 5);
            EditorGUI.indentLevel++;
            EditorGUILayout.Slider(_lengthRandomness, 0, 1, Labels.Randomness);
            EditorGUI.indentLevel--;

            EditorGUILayout.Space();

            EditorGUILayout.PropertyField(_spring);
            EditorGUILayout.PropertyField(_damping);
            EditorGUILayout.PropertyField(_gravity);

            EditorGUILayout.Space();

            EditorGUILayout.LabelField(Labels.NoiseField);
            EditorGUI.indentLevel++;
            EditorGUILayout.PropertyField(_noiseFrequency, Labels.Frequency);
            EditorGUILayout.PropertyField(_noiseAmplitude, Labels.Amplitude);
            EditorGUILayout.PropertyField(_noiseSpeed, Labels.Speed);
            EditorGUI.indentLevel--;

            serializedObject.ApplyModifiedProperties();
        }
    }
}


text:
fileFormatVersion: 2
guid: 170691a5a73151d4e80ed4caf56d9d8f
MonoImporter:
  externalObjects: {}
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:


text:
fileFormatVersion: 2
guid: 5aed52907f3f0564db4b44e4901048b2
MonoImporter:
  externalObjects: {}
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:


text:
using UnityEngine;
using UnityEditor;

namespace BurstWig
{
    // Simple string label with GUIContent
    struct Label
    {
        GUIContent _guiContent;

        public static implicit operator GUIContent(Label label)
          => label._guiContent;

        public static implicit operator Label(string text)
          => new Label { _guiContent = new GUIContent(text) };
    }

    // Utilities for finding serialized properties
    struct PropertyFinder
    {
        SerializedObject _so;

        public PropertyFinder(SerializedObject so)
          => _so = so;

        public SerializedProperty this[string name]
          => _so.FindProperty(name);
    }
}


text:
using UnityEngine;

namespace BurstWig
{
    public sealed partial class WigController
    {
        public float length
        {
            get => _profile.length;
            set => _profile.length = value;
        }

        public float lengthRandomness
        {
            get => _profile.lengthRandomness;
            set => _profile.lengthRandomness = value;
        }

        public float spring
        {
            get => _profile.spring;
            set => _profile.spring = value;
        }

        public float damping
        {
            get => _profile.damping;
            set => _profile.damping = value;
        }

        public Vector3 gravity
        {
            get => _profile.gravity;
            set => _profile.gravity = value;
        }

        public float noiseAmplitude
        {
            get => _profile.noiseAmplitude;
            set => _profile.noiseAmplitude = value;
        }

        public float noiseFrequency
        {
            get => _profile.noiseFrequency;
            set => _profile.noiseFrequency = value;
        }

        public float noiseSpeed
        {
            get => _profile.noiseSpeed;
            set => _profile.noiseSpeed = value;
        }
    }
}


text:
fileFormatVersion: 2
guid: ca25f87f21e635a45be523a25dd14f6d
MonoImporter:
  externalObjects: {}
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:


text:
using UnityEngine;

namespace BurstWig
{
    [System.Serializable]
    public struct WigProfile
    {
        public float length;
        public float lengthRandomness;
        public float spring;
        public float damping;
        public Vector3 gravity;
        public float noiseAmplitude;
        public float noiseFrequency;
        public float noiseSpeed;

        static public WigProfile DefaultProfile => new WigProfile
        {
            length = 1,
            lengthRandomness = 0.5f,
            spring = 600,
            damping = 30,
            gravity = new Vector3(0, -8, 2),
            noiseAmplitude = 5,
            noiseFrequency = 1,
            noiseSpeed = 0.1f
        };
    }
}


text:
fileFormatVersion: 2
guid: dec024e6214370d4782421d5470abac0
folderAsset: yes
DefaultImporter:
  externalObjects: {}
  userData:
  assetBundleName:
  assetBundleVariant:


text:
fileFormatVersion: 2
guid: f0a67a685fe9f8c47864ff3cd14dfb6f
MonoImporter:
  externalObjects: {}
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:


text:
using UnityEngine;
using Unity.Collections;
using Unity.Jobs;
using Unity.Mathematics;
using VisualEffect = UnityEngine.VFX.VisualEffect;

namespace BurstWig
{
    public sealed partial class WigController : MonoBehaviour
    {
        #region Editable attributes

        [SerializeField] MeshRenderer _source = null;
        [SerializeField] VisualEffect _target = null;
        [SerializeField, Range(8, 256)] int _segmentCount = 64;
        [SerializeField] uint _randomSeed = 0;
        [SerializeField] WigProfile _profile = WigProfile.DefaultProfile;

        #endregion

        #region Private variables

        NativeArray<RootPoint> _rootPoints;
        NativeArray<float4> _positionBuffer;
        NativeArray<float3> _velocityBuffer;
        Texture2D _positionMap;

        #endregion

        #region MonoBehaviour implementation

        void Start()
        {
            var mesh = _source.GetComponent<MeshFilter>().sharedMesh;
            var vcount = mesh.vertexCount;

            _rootPoints = new NativeArray<RootPoint>
              (vcount, Allocator.Persistent);

            _positionBuffer = new NativeArray<float4>
              (vcount * _segmentCount, Allocator.Persistent);

            _velocityBuffer = new NativeArray<float3>
              (vcount * _segmentCount, Allocator.Persistent);

            var vertices = mesh.vertices;
            var normals = mesh.normals;

            for (var vi = 0; vi < vcount; vi++)
                _rootPoints[vi] = new RootPoint
                  { position = vertices[vi], normal = normals[vi] };

            _positionMap = new Texture2D
              (_segmentCount, vcount, TextureFormat.RGBAFloat, false);

            _target.SetTexture("PositionMap", _positionMap);
            _target.SetUInt("VertexCount", (uint)vcount);
            _target.SetUInt("SegmentCount", (uint)_segmentCount);
        }

        void OnDestroy()
        {
            if (_rootPoints.IsCreated) _rootPoints.Dispose();
            if (_positionBuffer.IsCreated) _positionBuffer.Dispose();
            if (_velocityBuffer.IsCreated) _velocityBuffer.Dispose();
            if (_positionMap != null) Destroy(_positionMap);
        }

        void LateUpdate()
        {
            var job = new UpdateJob
            {
                // Buffers
                R = _rootPoints, P = _positionBuffer, V = _velocityBuffer,

                // Settings
                prof = _profile, seed = _randomSeed,

                // Current state
                tf = (float4x4)_source.transform.localToWorldMatrix,
                t = Time.time, dt = Time.deltaTime
            };

            job.Schedule(_rootPoints.Length, 1).Complete();

            _positionMap.LoadRawTextureData(_positionBuffer);
            _positionMap.Apply();
        }

        #endregion
    }
}


text:
fileFormatVersion: 2
guid: a03c312d968d29f4eaeb6167dfa80438
MonoImporter:
  externalObjects: {}
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:


text:
fileFormatVersion: 2
guid: 9f4ea78609cf59a4598bea173d36cd06
MonoImporter:
  externalObjects: {}
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:


text:
using Unity.Mathematics;

namespace BurstWig
{
    struct RootPoint
    {
        public float3 position;
        public float3 normal;
    }
}


text:
fileFormatVersion: 2
guid: a58179628c3e3084ea0338a667852156
MonoImporter:
  externalObjects: {}
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:


text:
using Unity.Collections;
using Unity.Jobs;
using Unity.Mathematics;
using XXHash = Klak.Math.XXHash;

namespace BurstWig
{
    [Unity.Burst.BurstCompile(CompileSynchronously = true)]
    struct UpdateJob : IJobParallelFor
    {
        // Buffers
        [NativeDisableParallelForRestrictionAttribute]
        public NativeArray<RootPoint> R;

        [NativeDisableParallelForRestrictionAttribute]
        public NativeArray<float4> P;

        [NativeDisableParallelForRestrictionAttribute]
        public NativeArray<float3> V;

        // Settings
        public WigProfile prof;
        public uint seed;

        // Current state
        public float4x4 tf;
        public float t;
        public float dt;

        // Noise field variables
        float3 noffs1;
        float3 noffs2;

        // Divergence-free noise field function
        float3 NoiseField(float3 p)
        {
            p *= prof.noiseFrequency;

            float3 grad1, grad2;
            noise.snoise(p.xyz + noffs1, out grad1);
            noise.snoise(p.yzx + noffs2, out grad2);

            return math.cross(grad1, grad2) * prof.noiseAmplitude;
        }

        public void Execute(int vi)
        {
            // Number of the segments
            var scount = P.Length / R.Length;

            // Per-filament random segment length
            var seg = new XXHash(seed).Float((uint)vi);
            seg = (1 - seg * prof.lengthRandomness) * prof.length / scount;

            // Noise field settings
            noffs1 = math.float3(0, 1, 0) * prof.noiseSpeed * t;
            noffs2 = math.float3(3, 1, 7) * math.PI - noffs1.zyx;

            // Offset in the position/velocity buffer.
            var offs = vi * scount;

            // The first vertex (root point, transform only)
            var p = math.mul(tf, math.float4(R[vi].position, 1)).xyz;
            P[offs++] = math.float4(p, 1);

            // The second vertex (no dynamics)
            p += math.mul(tf, math.float4(R[vi].normal, 0)).xyz * seg;
            P[offs++] = math.float4(p, 1);

            // Following vertices
            for (var si = 2; si < scount; si++, offs++)
            {
                // Target position
                var p4 = P[offs - math.min(si, 4)].xyz;
                var p_t = p + math.normalizesafe(p - p4) * seg;

                // -- Position update

                // Newtonian motion
                var p_n = P[offs].xyz + V[offs] * dt;

                // Segment length constraint
                p += math.normalize(p_n - p) * seg;

                // -- Velocity Update

                // Damping
                var v = V[offs] * math.exp(-prof.damping * dt);

                // Acceleration (spring model)
                v += (p_t - p) * dt * prof.spring;

                // Gravity
                v += (float3)prof.gravity * dt;

                // Noise field
                v += NoiseField(p) * dt;

                // Output
                P[offs] = math.float4(p, 1);
                V[offs] = v;
            }
        }
    }
}