├── CHANGELOG.md ├── CHANGELOG.md.meta ├── Documentation~ ├── images │ ├── inspector-preview.png │ ├── mesh-to-sdf-sample-skinned.png │ ├── mesh-to-sdf-sample.png │ ├── mesh-to-sdf-skinned.png │ └── sign-flip-glitch.png └── index.md ├── Editor.meta ├── Editor ├── MeshToSDFEditor.cs ├── MeshToSDFEditor.cs.meta ├── SDFTexture.shader ├── SDFTexture.shader.meta ├── SDFTextureEditor.cs ├── SDFTextureEditor.cs.meta ├── Unity.DemoTeam.MeshToSDF.Editor.asmdef └── Unity.DemoTeam.MeshToSDF.Editor.asmdef.meta ├── LICENSE.md ├── LICENSE.md.meta ├── README.md ├── README.md.meta ├── Runtime.meta ├── Runtime ├── MeshToSDF.compute ├── MeshToSDF.compute.meta ├── MeshToSDF.cs ├── MeshToSDF.cs.meta ├── SDFTexture.cs ├── SDFTexture.cs.meta ├── Unity.DemoTeam.MeshToSDF.asmdef └── Unity.DemoTeam.MeshToSDF.asmdef.meta ├── Samples~ └── MeshToSDF-sample │ ├── MeshToSDF-SkinnedMesh-HDRP.unity │ ├── MeshToSDF-SkinnedMesh-HDRP.unity.meta │ ├── MeshToSDF-StaticMesh-BuiltInRP.unity │ ├── MeshToSDF-StaticMesh-BuiltInRP.unity.meta │ ├── MeshToSDF-StaticMesh-HDRP.unity │ ├── MeshToSDF-StaticMesh-HDRP.unity.meta │ ├── MeshToSDF-StaticMesh-URP.unity │ ├── MeshToSDF-StaticMesh-URP.unity.meta │ ├── SDFTexture-SkinnedMesh.renderTexture │ ├── SDFTexture-SkinnedMesh.renderTexture.meta │ ├── SDFTexture-StaticMesh.renderTexture │ ├── SDFTexture-StaticMesh.renderTexture.meta │ ├── SceneAssets.meta │ └── SceneAssets │ ├── SkinnedMesh.meta │ ├── SkinnedMesh │ ├── Environment.prefab │ ├── Environment.prefab.meta │ ├── Global Volume Profile.asset │ ├── Global Volume Profile.asset.meta │ ├── Mannequin.fbx │ ├── Mannequin.fbx.meta │ ├── Mannequin_01_Lights.prefab │ ├── Mannequin_01_Lights.prefab.meta │ ├── ReflectionProbe-0.exr │ ├── ReflectionProbe-0.exr.meta │ ├── Timeline.playable │ ├── Timeline.playable.meta │ ├── mannequin.mat │ ├── mannequin.mat.meta │ ├── plane.mat │ └── plane.mat.meta │ ├── StaticMesh.meta │ └── StaticMesh │ ├── Capsule-BuiltInRP.mat │ ├── Capsule-BuiltInRP.mat.meta │ ├── Capsule-HDRP.mat │ ├── Capsule-HDRP.mat.meta │ ├── Capsule-URP.mat │ ├── Capsule-URP.mat.meta │ ├── Capsule.controller │ ├── Capsule.controller.meta │ ├── Checker.png │ ├── Checker.png.meta │ ├── MeshToSDF-StaticMesh-HDRP.meta │ ├── MeshToSDF-StaticMesh-HDRP │ ├── HDAdditionalLightData.png │ ├── HDAdditionalLightData.png.meta │ ├── SkyandFogSettingsProfile.asset │ ├── SkyandFogSettingsProfile.asset.meta │ ├── Volume.png │ ├── Volume.png.meta │ ├── VolumeProfileAsset.png │ └── VolumeProfileAsset.png.meta │ ├── MeshToSDF-StaticMesh-URP.meta │ ├── MeshToSDF-StaticMesh-URP │ ├── GlobalVolumeProfile.asset │ ├── GlobalVolumeProfile.asset.meta │ ├── Volume.png │ ├── Volume.png.meta │ ├── VolumeProfileAsset.png │ └── VolumeProfileAsset.png.meta │ ├── Sky-Unlit.mat │ ├── Sky-Unlit.mat.meta │ ├── capsule.anim │ └── capsule.anim.meta ├── THIRD PARTY NOTICES.md ├── THIRD PARTY NOTICES.md.meta ├── _External.meta ├── _External ├── TressFXSDF.hlsl └── TressFXSDF.hlsl.meta ├── catalog-info.yaml ├── catalog-info.yaml.meta ├── package.json └── package.json.meta /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | ## [1.1.0] - 2023-01-24 4 | - Support higher voxel resolutions 5 | 6 | ## [1.0.0] - 2022-08-16 7 | - Initial release -------------------------------------------------------------------------------- /CHANGELOG.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 78bc0a0a501f09a44b8917672e007dc6 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Documentation~/images/inspector-preview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/com.unity.demoteam.mesh-to-sdf/1f8ee658aabe2b588aae7d0b635a9941266a52ef/Documentation~/images/inspector-preview.png -------------------------------------------------------------------------------- /Documentation~/images/mesh-to-sdf-sample-skinned.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/com.unity.demoteam.mesh-to-sdf/1f8ee658aabe2b588aae7d0b635a9941266a52ef/Documentation~/images/mesh-to-sdf-sample-skinned.png -------------------------------------------------------------------------------- /Documentation~/images/mesh-to-sdf-sample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/com.unity.demoteam.mesh-to-sdf/1f8ee658aabe2b588aae7d0b635a9941266a52ef/Documentation~/images/mesh-to-sdf-sample.png -------------------------------------------------------------------------------- /Documentation~/images/mesh-to-sdf-skinned.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/com.unity.demoteam.mesh-to-sdf/1f8ee658aabe2b588aae7d0b635a9941266a52ef/Documentation~/images/mesh-to-sdf-skinned.png -------------------------------------------------------------------------------- /Documentation~/images/sign-flip-glitch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/com.unity.demoteam.mesh-to-sdf/1f8ee658aabe2b588aae7d0b635a9941266a52ef/Documentation~/images/sign-flip-glitch.png -------------------------------------------------------------------------------- /Documentation~/index.md: -------------------------------------------------------------------------------- 1 | # Mesh-to-SDF Documentation 2 | 3 | ## Quickstart 4 | 5 | Once the package has been imported: 6 | 1. Create an empty game object and give it an SDFTexture component. 7 | 2. This component and the game object's transform control the volume you will capture, so make sure it's place over your mesh and adjust the Size property. 8 | 3. Create a RenderTexture asset and assign it to the SDFTexture component. 9 | 4. Add a MeshToSDF component to your SkinnedMeshRenderer or MeshRenderer, and give it the previously created SDFTexture. 10 | 5. If you now select the SDFTexture object, you should see a slice of the SDF in the Scene View, dynamically updating. 11 | 12 | Scripts can query `SDFTexture.sdf` and `SDFTexture.worldToSDFTexCoords` to get the texture and a texture coordinates transform to sample the texture. 13 | 14 | Alternatively you can use the SDFTexture component as a way to place in the scene a static SDF 3DTexture generated elsewhere. Just assign the 3DTexture in the SDFTexture component. 15 | 16 | ### Sample 17 | 18 | The setup described above is used in the samples included in the package. Samples can be imported into the project by navigating to the package in the Package Manager window and using the _Import_ button under _Samples_. The Samples folder that now should appear in the project contains scenes demonstrating usage both for static meshes (MeshFilter/MeshRenderer) and skinned meshes (SkinnedMeshRenderer). Setup in both cases is identical, though. 19 | 20 | Look for the MeshToSDF component (type *t:MeshToSDF* in the Hierarchy search bar). MeshToSDF is the component responsible for generating an SDF for whatever mesh it finds on the same game object - be it a static mesh in a MeshFilter, or a skinned mesh in a SkinnedMeshRenderer. 21 | 22 | The MeshToSDF component references an SDFTexture component. SDFTexture is responsible for placing an SDF in the space (through its Transform), and definiting its bounds (through the _Size_ property). 23 | 24 | SDFTexture can also use a static, externally generated 3D texture containing an SDF. In that case MeshToSDF wouldn't be needed, and SDFTexture would just be useful for placing the SDF in the space, and exposing that placement, its matrix, etc. through its API. 25 | 26 | In the sample SDFTexture references a 3D render texture, which allows MeshToSDF to dynamically write an SDF into it. 27 | 28 | The SDF can be previewed either by selecting the SDFTexture game object while in Scene View, or by selecting the 3D render texture asset and using one of the built-in 3D texture preview modes in the Inspector. 29 | 30 | \ 31 | ![mesh-to-sdf sample](../Documentation~/images/mesh-to-sdf-sample.png) 32 | ![mesh-to-sdf sample](../Documentation~/images/mesh-to-sdf-sample-skinned.png) 33 | ![mesh-to-sdf sample](../Documentation~/images/inspector-preview.png) 34 | 35 | 36 | ## Limitations and known issues 37 | 38 | - MacOS/Metal - there's a known bug causing occasional garbage output, and the SDF visualisation causing artifacts in other Editor windows. 39 | - One MeshToSDF per SDF - no support yet for multiple MeshToSDF instances writing to the same SDF render texture. 40 | - Vertex shader animation - vertex shader animation is not supported. However any kind of vertex animation affecting vertex buffers, including GPU skinning, is supported for meshes from SkinnedMeshRenderers. 41 | - One submesh - for meshes with multiple submeshes, only the first submesh will be used. 42 | - In signed mode occasionally a voxel near the surface will have its sign flipped (still correct absolute distance). The following flooding step unfortunately propagates that flip, causing artifacts like in the image. Unfortunately post-filtering is not a viable fix, since the flipped clusters can be larger than a single voxel. To limit the occurence of this issue, avoid pointy features on meshes, or switch to unsigned mode. ![mesh-to-sdf sample](../Documentation~/images/sign-flip-glitch.png) 43 | -------------------------------------------------------------------------------- /Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 28e0a54c5e4f1554180c6db3836f1f5a 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Editor/MeshToSDFEditor.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEditor; 3 | 4 | [CustomEditor(typeof(MeshToSDF))] 5 | public class MeshToSDFEditor : Editor 6 | { 7 | SerializedProperty m_SDFTexture; 8 | SerializedProperty m_FloodMode; 9 | SerializedProperty m_FloodFillQuality; 10 | SerializedProperty m_FloodFillIterations; 11 | SerializedProperty m_DistanceMode; 12 | SerializedProperty m_UpdateMode; 13 | SerializedProperty m_Offset; 14 | 15 | void OnEnable() 16 | { 17 | m_SDFTexture = serializedObject.FindProperty("m_SDFTexture"); 18 | m_FloodMode = serializedObject.FindProperty("m_FloodMode"); 19 | m_FloodFillQuality = serializedObject.FindProperty("m_FloodFillQuality"); 20 | m_FloodFillIterations = serializedObject.FindProperty("m_FloodFillIterations"); 21 | m_DistanceMode = serializedObject.FindProperty("m_DistanceMode"); 22 | m_UpdateMode = serializedObject.FindProperty("m_UpdateMode"); 23 | m_Offset = serializedObject.FindProperty("m_Offset"); 24 | } 25 | 26 | public override void OnInspectorGUI() 27 | { 28 | ValidateMesh(); 29 | 30 | if ((MeshToSDF.UpdateMode)m_UpdateMode.enumValueIndex == MeshToSDF.UpdateMode.Explicit) 31 | { 32 | EditorGUILayout.HelpBox("Explicit update mode - SDF updates driven by a user script", MessageType.Info); 33 | EditorGUILayout.Space(); 34 | } 35 | 36 | EditorGUILayout.PropertyField(m_SDFTexture); 37 | 38 | SDFTexture sdftexture = m_SDFTexture.objectReferenceValue as SDFTexture; 39 | if (sdftexture == null) 40 | EditorGUILayout.HelpBox("Assign an object with an SDFTexture component - that's where this script will write the SDF to.", MessageType.Warning); 41 | else if (sdftexture.mode != SDFTexture.Mode.Dynamic) 42 | EditorGUILayout.HelpBox("SDFTexture needs to reference a RenderTexture to be writeable.", MessageType.Error); 43 | 44 | EditorGUILayout.PropertyField(m_FloodMode); 45 | EditorGUILayout.PropertyField(m_FloodFillQuality); 46 | 47 | if ((MeshToSDF.FloodMode)m_FloodMode.enumValueIndex == MeshToSDF.FloodMode.Linear) 48 | { 49 | EditorGUILayout.PropertyField(m_FloodFillIterations); 50 | EditorGUILayout.PropertyField(m_DistanceMode); 51 | } 52 | else 53 | { 54 | GUI.enabled = false; 55 | 56 | int oldDistanceMode = m_DistanceMode.enumValueIndex; 57 | m_DistanceMode.enumValueIndex = (int)MeshToSDF.DistanceMode.Unsigned; 58 | EditorGUILayout.PropertyField(m_DistanceMode); 59 | m_DistanceMode.enumValueIndex = oldDistanceMode; 60 | 61 | GUI.enabled = true; 62 | } 63 | 64 | if ((MeshToSDF.FloodMode)m_FloodMode.enumValueIndex == MeshToSDF.FloodMode.Linear && (MeshToSDF.DistanceMode)m_DistanceMode.enumValueIndex == MeshToSDF.DistanceMode.Signed) 65 | { 66 | EditorGUILayout.PropertyField(m_Offset); 67 | } 68 | else 69 | { 70 | GUI.enabled = false; 71 | 72 | float oldOffset = m_Offset.floatValue; 73 | m_Offset.floatValue = 0; 74 | EditorGUILayout.PropertyField(m_Offset); 75 | m_Offset.floatValue = oldOffset; 76 | 77 | GUI.enabled = true; 78 | } 79 | 80 | serializedObject.ApplyModifiedProperties(); 81 | } 82 | 83 | void ValidateMesh() 84 | { 85 | MeshToSDF meshToSDF = target as MeshToSDF; 86 | Mesh mesh = null; 87 | SkinnedMeshRenderer smr = meshToSDF.GetComponent(); 88 | if (smr != null) 89 | mesh = smr.sharedMesh; 90 | if (mesh == null) 91 | { 92 | MeshFilter mf = meshToSDF.GetComponent(); 93 | if (mf != null) 94 | mesh = mf.sharedMesh; 95 | } 96 | if (mesh == null) 97 | { 98 | EditorGUILayout.HelpBox("MeshToSDF needs a Mesh from either a SkinnedMeshRenderer or a MeshFilter component on this GameObject.", MessageType.Error); 99 | return; 100 | } 101 | 102 | if (mesh.subMeshCount > 1) 103 | EditorGUILayout.HelpBox("Multiple submeshes detected, will only use the first one.", MessageType.Warning); 104 | 105 | if (mesh.GetTopology(0) != MeshTopology.Triangles) 106 | EditorGUILayout.HelpBox("Only triangular topology meshes supported (MeshTopology.Triangles).", MessageType.Error); 107 | 108 | if (mesh.GetIndexCount(0) > 3 * 10000) 109 | EditorGUILayout.HelpBox("This looks like a large mesh. For best performance and a smoother SDF, use a proxy mesh of under 10k triangles.", MessageType.Warning); 110 | 111 | if (mesh.GetVertexAttributeStream(UnityEngine.Rendering.VertexAttribute.Position) < 0) 112 | EditorGUILayout.HelpBox("No vertex positions in the mesh.", MessageType.Error); 113 | } 114 | } -------------------------------------------------------------------------------- /Editor/MeshToSDFEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c8245169a826c5a48ad08e557b5f2532 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/SDFTexture.shader: -------------------------------------------------------------------------------- 1 | Shader "Hidden/SDFTexture" 2 | { 3 | Properties 4 | { 5 | } 6 | 7 | HLSLINCLUDE 8 | #pragma vertex vert 9 | #pragma fragment frag 10 | 11 | #include "UnityCG.cginc" 12 | 13 | struct appdata 14 | { 15 | float4 vertex : POSITION; 16 | float2 texcoord : TEXCOORD; 17 | }; 18 | 19 | struct v2f 20 | { 21 | float4 vertex : SV_POSITION; 22 | float2 texcoord : TEXCOORD; 23 | }; 24 | 25 | float _Z; 26 | float _DistanceScale; 27 | sampler3D _SDF; 28 | 29 | int _Axis; 30 | #define AXIS_X 0 31 | #define AXIS_Y 1 32 | 33 | #define COLOR_POS 1 34 | #define COLOR_NEG float3(0.72, 0, 1) 35 | 36 | v2f vert(appdata v) 37 | { 38 | v2f o; 39 | o.vertex = UnityObjectToClipPos(v.vertex); 40 | o.texcoord = v.texcoord; 41 | return o; 42 | } 43 | 44 | float4 frag(v2f i) : SV_Target 45 | { 46 | float3 uvw = float3(i.texcoord, _Z); 47 | 48 | if (_Axis == AXIS_X) 49 | uvw = float3(_Z, i.texcoord.yx); 50 | else if (_Axis == AXIS_Y) 51 | uvw = float3(i.texcoord.x, _Z, i.texcoord.y); 52 | 53 | float dist = tex3D(_SDF, uvw).r * _DistanceScale; 54 | float3 color = dist > 0.0 ? dist * COLOR_POS : -dist * COLOR_NEG; 55 | return float4(color, 1); 56 | } 57 | ENDHLSL 58 | 59 | SubShader 60 | { 61 | Cull Off 62 | Pass 63 | { 64 | Name "ForwardOnly" 65 | Tags { "LightMode" = "ForwardOnly" } 66 | HLSLPROGRAM 67 | ENDHLSL 68 | } 69 | 70 | Pass 71 | { 72 | Name "DepthForwardOnly" 73 | Tags{ "LightMode" = "DepthForwardOnly" } 74 | HLSLPROGRAM 75 | ENDHLSL 76 | } 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /Editor/SDFTexture.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1b415b0b9d054c94590ae362e7335d69 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Editor/SDFTextureEditor.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEditor; 3 | 4 | [CustomEditor(typeof(SDFTexture))] 5 | public class SDFTextureEditor : Editor 6 | { 7 | enum Axis { X, Y, Z } 8 | 9 | static Mesh s_Quad; 10 | static SDFTexture s_SDFTexture; 11 | static Material s_Material; 12 | static float s_Slice = 0.5f; // [0, 1] 13 | static Axis s_Axis = Axis.X; 14 | 15 | SerializedProperty m_SDF; 16 | SerializedProperty m_Size; 17 | SerializedProperty m_Resolution; 18 | 19 | static class Uniforms 20 | { 21 | internal static int _Z = Shader.PropertyToID("_Z"); 22 | internal static int _Mode = Shader.PropertyToID("_Mode"); 23 | internal static int _Axis = Shader.PropertyToID("_Axis"); 24 | internal static int _DistanceScale = Shader.PropertyToID("_DistanceScale"); 25 | } 26 | 27 | void OnEnable() 28 | { 29 | // Unity creates multiple Editors for a target. 30 | // Sharing all state in static variables is an iffy way around it. 31 | s_SDFTexture = target as SDFTexture; 32 | 33 | UnityEditor.SceneView.duringSceneGui -= OnSceneGUI; 34 | UnityEditor.SceneView.duringSceneGui += OnSceneGUI; 35 | 36 | m_SDF = serializedObject.FindProperty("m_SDF"); 37 | m_Size = serializedObject.FindProperty("m_Size"); 38 | m_Resolution = serializedObject.FindProperty("m_Resolution"); 39 | } 40 | 41 | void OnDisable() 42 | { 43 | UnityEditor.SceneView.duringSceneGui -= OnSceneGUI; 44 | } 45 | 46 | static void DoBounds(SDFTexture sdftexture) 47 | { 48 | Handles.color = Color.white; 49 | Handles.DrawWireCube(Vector3.zero, sdftexture.voxelBounds.size); 50 | } 51 | 52 | static void DoHandles(Bounds bounds) 53 | { 54 | Vector3 dir = Vector3.forward; 55 | Vector3 perp = Vector3.right; 56 | switch (s_Axis) 57 | { 58 | case Axis.X: dir = Vector3.right; perp = Vector3.up; break; 59 | case Axis.Y: dir = Vector3.up; perp = Vector3.forward; break; 60 | } 61 | 62 | int axis = (int)s_Axis; 63 | Vector3[] offsets = {perp * bounds.extents[(axis + 1)%3], -perp * bounds.extents[(axis + 1)%3]}; 64 | 65 | foreach(var offset in offsets) 66 | { 67 | Vector3 handlePos = dir * (s_Slice - 0.5f) * bounds.size[axis] + offset; 68 | float handleSize = new Vector2(bounds.size[(axis + 1)%3], bounds.size[(axis + 2)%3]).magnitude * 0.03f; 69 | handlePos = Handles.Slider(handlePos, dir, handleSize, Handles.CubeHandleCap, snap:-1); 70 | s_Slice = Mathf.Clamp01(handlePos[axis]/bounds.size[axis] + 0.5f); 71 | } 72 | } 73 | 74 | static void DoSDFSlice(Matrix4x4 matrix, Camera camera, Vector3Int voxelResolution, Bounds voxelBounds, float distanceScale, Texture sdf) 75 | { 76 | if (s_Quad == null) 77 | s_Quad = Resources.GetBuiltinResource(typeof(Mesh), "Quad.fbx") as Mesh; 78 | 79 | if (s_Material == null) 80 | s_Material = new Material(Shader.Find("Hidden/SDFTexture")); 81 | 82 | Vector3 dir = Vector3.forward * voxelBounds.size.z; 83 | Quaternion rot = Quaternion.identity; 84 | switch (s_Axis) 85 | { 86 | case Axis.X: dir = Vector3.right * voxelBounds.size.x; rot = Quaternion.Euler(0, -90, 0); break; 87 | case Axis.Y: dir = Vector3.up * voxelBounds.size.y; rot = Quaternion.Euler(90, 0, 0); break; 88 | } 89 | 90 | matrix *= Matrix4x4.Translate(dir * (s_Slice - 0.5f)); 91 | matrix *= Matrix4x4.Scale(voxelBounds.size); 92 | matrix *= Matrix4x4.Rotate(rot); 93 | 94 | s_Material.SetFloat(Uniforms._Z, s_Slice); 95 | s_Material.SetInt(Uniforms._Axis, (int)s_Axis); 96 | s_Material.SetVector("_VoxelResolution", new Vector4(voxelResolution.x, voxelResolution.y, voxelResolution.z)); 97 | s_Material.SetFloat(Uniforms._DistanceScale, distanceScale); 98 | s_Material.SetTexture("_SDF", sdf); 99 | 100 | s_Material.SetPass(0); 101 | Graphics.DrawMeshNow(s_Quad, matrix); 102 | } 103 | 104 | static void OnSceneGUI(UnityEditor.SceneView sceneview) 105 | { 106 | if (s_SDFTexture == null) 107 | return; 108 | 109 | Bounds voxelBounds = s_SDFTexture.voxelBounds; 110 | var matrix = s_SDFTexture.transform.localToWorldMatrix; 111 | matrix *= Matrix4x4.Translate(voxelBounds.center); 112 | 113 | Handles.matrix = matrix; 114 | Handles.zTest = UnityEngine.Rendering.CompareFunction.LessEqual; 115 | 116 | if (s_SDFTexture.sdf != null && voxelBounds.extents != Vector3.zero) 117 | { 118 | DoSDFSlice(matrix, sceneview.camera, s_SDFTexture.voxelResolution, voxelBounds, distanceScale:1, s_SDFTexture.sdf); 119 | DoHandles(voxelBounds); 120 | } 121 | 122 | DoBounds(s_SDFTexture); 123 | } 124 | 125 | public override void OnInspectorGUI() 126 | { 127 | EditorGUILayout.LabelField("Texture", EditorStyles.boldLabel); 128 | EditorGUILayout.PropertyField(m_SDF); 129 | 130 | SDFTexture sdftexture = target as SDFTexture; 131 | 132 | switch(sdftexture.mode) 133 | { 134 | case SDFTexture.Mode.None: 135 | EditorGUILayout.HelpBox("Assign a static SDF Texture3D, or a RenderTexture if MeshToSDF is meant to output here.", MessageType.Warning); 136 | break; 137 | case SDFTexture.Mode.Static: 138 | GUI.enabled = false; 139 | EditorGUILayout.Vector3IntField("Resolution", sdftexture.voxelResolution); 140 | GUI.enabled = true; 141 | break; 142 | case SDFTexture.Mode.Dynamic: 143 | EditorGUILayout.PropertyField(m_Size); 144 | 145 | Rect GetColumnRect(Rect totalRect, int column) 146 | { 147 | Rect rect = totalRect; 148 | rect.xMin += (totalRect.width - 8) * (column / 3f) + column * 4; 149 | rect.width = (totalRect.width - 8) / 3f; 150 | return rect; 151 | } 152 | Rect position = EditorGUILayout.GetControlRect(); 153 | var label = EditorGUI.BeginProperty(position, new GUIContent("Resolution"), m_Resolution); 154 | position = EditorGUI.PrefixLabel(position, label); 155 | EditorGUIUtility.labelWidth = 13; // EditorGUI.kMiniLabelW 156 | EditorGUI.PropertyField(GetColumnRect(position, 0), m_Resolution, new GUIContent("X")); 157 | GUI.enabled = false; 158 | Vector3Int voxelRes = sdftexture.voxelResolution; 159 | EditorGUI.IntField(GetColumnRect(position, 1), "Y", voxelRes.y); 160 | EditorGUI.IntField(GetColumnRect(position, 2), "Z", voxelRes.z); 161 | GUI.enabled = true; 162 | EditorGUIUtility.labelWidth = 0; 163 | EditorGUI.EndProperty(); 164 | 165 | if (sdftexture.resolution >= sdftexture.maxResolution) 166 | EditorGUILayout.HelpBox("Maximum voxel count reached. Recommended resolution below 64^3.", MessageType.Info); 167 | else if (voxelRes.x * voxelRes.y * voxelRes.z >= 64 * 64 * 64 * 2) 168 | EditorGUILayout.HelpBox("High resolution might lead to poor performance. Recommended resolution below 64^3.", MessageType.Info); 169 | break; 170 | } 171 | 172 | if (serializedObject.hasModifiedProperties) 173 | serializedObject.ApplyModifiedProperties(); 174 | 175 | EditorGUILayout.Space(); 176 | EditorGUILayout.Space(); 177 | EditorGUILayout.LabelField("Debug", EditorStyles.boldLabel); 178 | s_Axis = (Axis)EditorGUILayout.EnumPopup(new GUIContent("Axis", "Draw SDF visualisation across the selected axis."), s_Axis); 179 | 180 | float slice = EditorGUILayout.Slider(new GUIContent("Slice", "Draw SDF visualisation for this slice along the selected axis."), s_Slice, 0, 1); 181 | if (slice != s_Slice) 182 | { 183 | s_Slice = slice; 184 | SceneView.lastActiveSceneView?.Repaint(); 185 | } 186 | } 187 | 188 | bool HasFrameBounds() 189 | { 190 | return true; 191 | } 192 | 193 | Bounds OnGetFrameBounds() 194 | { 195 | SDFTexture sdftexture = target as SDFTexture; 196 | Bounds bounds = sdftexture.voxelBounds; 197 | bounds.center += sdftexture.transform.position; 198 | bounds.size = Vector3.Scale(bounds.size, sdftexture.transform.lossyScale); 199 | return bounds; 200 | } 201 | } -------------------------------------------------------------------------------- /Editor/SDFTextureEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 841fceb3f24cd40469de4adabca3b27c 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/Unity.DemoTeam.MeshToSDF.Editor.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Unity.DemoTeam.MeshToSDF.Editor", 3 | "references": [ 4 | "Unity.DemoTeam.MeshToSDF", 5 | "Unity.DemoTeam.SDFTexture" 6 | ], 7 | "optionalUnityReferences": [], 8 | "includePlatforms": [ 9 | "Editor" 10 | ], 11 | "excludePlatforms": [], 12 | "allowUnsafeCode": false, 13 | "overrideReferences": false, 14 | "precompiledReferences": [], 15 | "autoReferenced": true, 16 | "defineConstraints": [], 17 | "versionDefines": [ 18 | { 19 | "name": "com.unity.render-pipelines.universal", 20 | "expression": "0.0", 21 | "define": "USING_URP" 22 | }, 23 | { 24 | "name": "com.unity.render-pipelines.high-definition", 25 | "expression": "0.0", 26 | "define": "USING_HDRP" 27 | } 28 | ] 29 | } -------------------------------------------------------------------------------- /Editor/Unity.DemoTeam.MeshToSDF.Editor.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8815ad42815ed244db7a54fc75c3a81d 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | Demo Team Mesh to SDF, copyright © 2022 Unity Technologies 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 4 | 5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 8 | -------------------------------------------------------------------------------- /LICENSE.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 859d54c3ee086f541a2f65ae63e70c18 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Package: com.unity.demoteam.mesh-to-sdf 2 | 3 | A real-time Signed Distance Field generator. Use a Mesh or a dynamically deforming SkinnedMesh as input to generate a 3D SDF texture every frame. 4 | 5 | The SDF can be used by the VFX Graph, the Hair system, and other effects relying on SDFs. 6 | 7 | \ 8 | ![mesh-to-sdf](Documentation~/images/mesh-to-sdf-skinned.png) 9 | 10 | The generator is real-time - to achieve better performance, it sacrifices robustness and the ability to handle large meshes. Typical resolutions would be a 5-8k triangle mesh in a 16^3-64^3 voxel volume. If your mesh is much larger or messy (holes, spiky shapes, etc.), it's best to use a cleaner low-res proxy mesh instead. Note that the SDF generator shipping with the VFX Graph has a more robust handling of larger or messy meshes, but it's slower. 11 | 12 | The generator works by first splatting distances into voxels in a small area around each triangle, then using either a linear flood or jump flood to fill the rest of the volume. 13 | 14 | ## Performance 15 | 16 | Tested with a 32^3 voxel volume, 5k triangle mesh 17 | - jump flood: RTX3090 0.22ms 18 | - linear flood, 8 iterations: RTX3090 0.18ms, RTX2080Super 0.21ms 19 | 20 | ## Requirements 21 | 22 | - Unity 2021.2+ (mesh buffer access in compute shaders) 23 | - Compute shaders supported on target platform 24 | 25 | ## Installation 26 | 27 | Use [*Add package from git URL*](https://docs.unity3d.com/Manual/upm-ui-giturl.html) (in the Package Manager): 28 | 29 | ```https://github.com/Unity-Technologies/com.unity.demoteam.mesh-to-sdf.git``` 30 | 31 | or 32 | 33 | Declare the package as a git dependency in `Packages/manifest.json`: 34 | 35 | ``` 36 | "dependencies": { 37 | "com.unity.demoteam.mesh-to-sdf": "https://github.com/Unity-Technologies/com.unity.demoteam.mesh-to-sdf.git", 38 | ... 39 | } 40 | ``` 41 | 42 | ## Documentation 43 | 44 | [Quickstart](Documentation~/index.md) 45 | 46 | ## Examples 47 | 48 | Samples included with the package show basic setup and are described in the doc above. 49 | 50 | The [mesh-to-sdf examples](https://github.com/robcupisz/mesh-to-sdf-examples) project is a vfx demo, with the dynamic SDFs driving VFX Graph effects and a raymarching shader: 51 | 52 | https://user-images.githubusercontent.com/6276154/201238758-cc87ec4a-a65a-4cb2-b3cc-123576ab9ea2.mov 53 | 54 | 55 | ## Acknowledgements 56 | 57 | The core functionality of the generator (initial splatting of distances around mesh faces) uses the implementation from [TressFX](https://github.com/GPUOpen-Effects/TressFX) published by AMD under the MIT license. Thank you! 58 | 59 | ## Known issues 60 | 61 | [Limitations and known issues](Documentation~/index.md#limitations-and-known-issues) 62 | 63 | -------------------------------------------------------------------------------- /README.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6c43e8e57c5f32e479c1e120b2c63de0 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Runtime.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 166c8a2128dd6274ab267a17e55e38d2 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Runtime/MeshToSDF.compute: -------------------------------------------------------------------------------- 1 | #pragma kernel Initialize 2 | #pragma kernel SplatTriangleDistancesUnsigned SplatTriangleDistances=SplatTriangleDistancesUnsigned 3 | #pragma kernel SplatTriangleDistancesSigned SplatTriangleDistances=SplatTriangleDistancesSigned SIGNED 4 | #pragma kernel Finalize 5 | #pragma kernel LinearFloodStep 6 | #pragma kernel LinearFloodStepUltraQuality LinearFloodStep=LinearFloodStepUltraQuality FLOOD_STEP_ULTRA_QUALITY 7 | #pragma kernel JumpFloodInitialize 8 | #pragma kernel JumpFloodStep 9 | #pragma kernel JumpFloodStepUltraQuality JumpFloodStep=JumpFloodStepUltraQuality FLOOD_STEP_ULTRA_QUALITY 10 | #pragma kernel JumpFloodFinalize 11 | #pragma kernel BufferToTexture 12 | 13 | int4 _VoxelResolution; // w = x * y * z 14 | float _MaxDistance; 15 | float INITIAL_DISTANCE; 16 | float4x4 _WorldToLocal; 17 | float _Offset; 18 | 19 | #define THREAD_GROUP_SIZE 64 20 | 21 | ByteAddressBuffer _VertexBuffer; 22 | ByteAddressBuffer _IndexBuffer; 23 | bool _IndexFormat16bit; 24 | int _VertexBufferStride; 25 | int _VertexBufferPosAttributeOffset; 26 | int _DispatchSizeX; 27 | 28 | uint GetIndex(uint i) 29 | { 30 | if (_IndexFormat16bit) 31 | { 32 | // 2 byte indices, Load() grabs 4 bytes at a time (4 byte aligned) so need to do some unpacking 33 | uint entryIndex = i >> 1u; 34 | uint entryOffset = i & 1u; 35 | uint read = _IndexBuffer.Load(entryIndex << 2); 36 | return entryOffset == 1u ? ((read >> 16) & 0xffff) : read & 0xffff; 37 | } 38 | else 39 | // 4 byte indices 40 | return _IndexBuffer.Load(i << 2); 41 | } 42 | 43 | float3 GetPos(uint i) 44 | { 45 | return asfloat(_VertexBuffer.Load3(i * _VertexBufferStride + _VertexBufferPosAttributeOffset)); 46 | } 47 | 48 | int GetVoxelIndex(uint GIndex, uint3 GId) 49 | { 50 | return (GId.x + GId.y * _DispatchSizeX) * THREAD_GROUP_SIZE + GIndex; 51 | } 52 | 53 | #include "../_External/TressFXSDF.hlsl" 54 | 55 | // The texture is a half, but on metal declaring it as a half silently breaks writing 56 | RWTexture3D _SDF; 57 | 58 | StructuredBuffer _SDFBuffer; 59 | RWStructuredBuffer _SDFBufferRW; 60 | 61 | StructuredBuffer _JumpBuffer; 62 | RWStructuredBuffer _JumpBufferRW; 63 | 64 | int3 GetVoxelCoords(int voxelIndex) 65 | { 66 | return GetLocalCellPositionFromIndex(voxelIndex, _VoxelResolution.xyz); 67 | } 68 | 69 | int GetVoxelIndex(int3 voxelCoords) 70 | { 71 | return GetSdfCellIndex(voxelCoords); 72 | } 73 | 74 | float GetVoxel(int voxelIndex) 75 | { 76 | return _SDFBuffer[voxelIndex]; 77 | } 78 | 79 | float GetVoxel(int3 voxelCoords) 80 | { 81 | voxelCoords = clamp(voxelCoords, 0, _VoxelResolution.xyz - 1); 82 | return GetVoxel(GetVoxelIndex(voxelCoords)); 83 | } 84 | 85 | int GetVoxelJump(int voxelIndex) 86 | { 87 | return _JumpBuffer[voxelIndex]; 88 | } 89 | 90 | int GetVoxelJump(int3 voxelCoords) 91 | { 92 | voxelCoords = clamp(voxelCoords, 0, _VoxelResolution.xyz - 1); 93 | return GetVoxelJump(GetVoxelIndex(voxelCoords)); 94 | } 95 | 96 | // One thread per cell 97 | [numthreads(THREAD_GROUP_SIZE, 1, 1)] 98 | void BufferToTexture(uint GIndex : SV_GroupIndex, uint3 GId : SV_GroupID, uint3 DTid : SV_DispatchThreadID) 99 | { 100 | int voxelIndex = GetVoxelIndex(GIndex, GId); 101 | if(voxelIndex >= _VoxelResolution.w) 102 | return; 103 | 104 | int3 center = GetVoxelCoords(voxelIndex); 105 | 106 | _SDF[center] = GetVoxel(voxelIndex) + _Offset; 107 | } 108 | 109 | float MinDist(float currentDist, float adjacentDist, float step) 110 | { 111 | if (adjacentDist < 0.0) 112 | step *= -1; 113 | 114 | // We're one more cell away now 115 | adjacentDist += step; 116 | 117 | float dist = 0; 118 | if (adjacentDist > _MaxDistance) 119 | // ignore invalid adjacent 120 | dist = currentDist; 121 | else if (currentDist > _MaxDistance) 122 | // ignore invalid current 123 | dist = adjacentDist; 124 | else 125 | // pick closer to 0 126 | dist = currentDist < 0 ? max(adjacentDist, currentDist) : min(adjacentDist, currentDist); 127 | 128 | return dist; 129 | } 130 | 131 | #define SQRT_2 1.41421356 132 | #define SQRT_3 1.73205081 133 | 134 | // One thread per cell 135 | [numthreads(THREAD_GROUP_SIZE, 1, 1)] 136 | void LinearFloodStep(uint GIndex : SV_GroupIndex, uint3 GId : SV_GroupID, uint3 DTid : SV_DispatchThreadID) 137 | { 138 | int voxelIndex = GetVoxelIndex(GIndex, GId); 139 | if(voxelIndex >= _VoxelResolution.w) 140 | return; 141 | 142 | float centerValue = GetVoxel(voxelIndex); 143 | 144 | // Values set by the initial triangle splatting are based around 0, fit within [-_MaxDistance, _MaxDistance] and are used as reference/seeds - 145 | // but only if they lie close enough to the surface. The ones above ~one voxel away are no longer treated as seeds and overwritten in flooding, 146 | // to avoid artifacts at the edges of the splatting aabbs. 147 | // Values above _MaxDistance hasn't been written by the initial triangle splatting, just by the initialization pass, and should be overwritten 148 | // by any valid neighbour (+step distance). 149 | 150 | // Don't touch voxels with distance less than one voxel diagonal, treat them as seed values 151 | if (abs(centerValue) < g_CellSize * SQRT_3) 152 | { 153 | _SDFBufferRW[voxelIndex] = centerValue; 154 | return; 155 | } 156 | 157 | int3 center = GetVoxelCoords(voxelIndex); 158 | int3 offset = int3(-1, 0, 1); 159 | 160 | float minDist = centerValue; 161 | // 6 orthogonally adjacent voxels 162 | float step = g_CellSize; 163 | minDist = MinDist(minDist, GetVoxel(center + offset.zyy), step); 164 | minDist = MinDist(minDist, GetVoxel(center + offset.yzy), step); 165 | minDist = MinDist(minDist, GetVoxel(center + offset.yyz), step); 166 | minDist = MinDist(minDist, GetVoxel(center + offset.xyy), step); 167 | minDist = MinDist(minDist, GetVoxel(center + offset.yxy), step); 168 | minDist = MinDist(minDist, GetVoxel(center + offset.yyx), step); 169 | 170 | #ifdef FLOOD_STEP_ULTRA_QUALITY 171 | // 20 diagonally adjacent voxels 172 | step = SQRT_2 * g_CellSize; 173 | minDist = MinDist(minDist, GetVoxel(center + offset.xxy), step); 174 | minDist = MinDist(minDist, GetVoxel(center + offset.xzy), step); 175 | minDist = MinDist(minDist, GetVoxel(center + offset.zzy), step); 176 | minDist = MinDist(minDist, GetVoxel(center + offset.zxy), step); 177 | 178 | minDist = MinDist(minDist, GetVoxel(center + offset.xyx), step); 179 | minDist = MinDist(minDist, GetVoxel(center + offset.xyz), step); 180 | minDist = MinDist(minDist, GetVoxel(center + offset.zyz), step); 181 | minDist = MinDist(minDist, GetVoxel(center + offset.zyx), step); 182 | 183 | minDist = MinDist(minDist, GetVoxel(center + offset.yxx), step); 184 | minDist = MinDist(minDist, GetVoxel(center + offset.yxz), step); 185 | minDist = MinDist(minDist, GetVoxel(center + offset.yzz), step); 186 | minDist = MinDist(minDist, GetVoxel(center + offset.yzx), step); 187 | 188 | step = SQRT_3 * g_CellSize; 189 | minDist = MinDist(minDist, GetVoxel(center + offset.xxx), step); 190 | minDist = MinDist(minDist, GetVoxel(center + offset.xxz), step); 191 | minDist = MinDist(minDist, GetVoxel(center + offset.xzx), step); 192 | minDist = MinDist(minDist, GetVoxel(center + offset.xzz), step); 193 | minDist = MinDist(minDist, GetVoxel(center + offset.zxx), step); 194 | minDist = MinDist(minDist, GetVoxel(center + offset.zxz), step); 195 | minDist = MinDist(minDist, GetVoxel(center + offset.zzx), step); 196 | minDist = MinDist(minDist, GetVoxel(center + offset.zzz), step); 197 | #endif 198 | 199 | _SDFBufferRW[voxelIndex] = minDist; 200 | } 201 | 202 | // One thread per cell 203 | [numthreads(THREAD_GROUP_SIZE, 1, 1)] 204 | void JumpFloodInitialize(uint GIndex : SV_GroupIndex, uint3 GId : SV_GroupID, uint3 DTid : SV_DispatchThreadID) 205 | { 206 | int voxelIndex = GetVoxelIndex(GIndex, GId); 207 | if(voxelIndex >= _VoxelResolution.w) 208 | return; 209 | 210 | float distance = GetVoxel(voxelIndex); 211 | // Even though more cells are initialized, we want to treat as seeds only the ones 212 | // within one voxel of the surface. Otherwise the distance estimate is not very smooth 213 | // as it sees the chunky bounding boxes of bigger triangles. 214 | _JumpBufferRW[voxelIndex] = distance > g_CellSize * SQRT_3 ? 0 : voxelIndex; 215 | } 216 | 217 | void JumpSample(int3 centerCoord, int3 offset, inout float bestDistance, inout int bestIndex) 218 | { 219 | int3 sampleCoord = centerCoord + offset; 220 | int voxelSampleIndex = GetVoxelJump(sampleCoord); 221 | int3 voxelSampleCoord = GetVoxelCoords(voxelSampleIndex); 222 | float dist = length(centerCoord - voxelSampleCoord); 223 | if (voxelSampleIndex != 0 && dist < bestDistance) 224 | { 225 | bestDistance = dist; 226 | bestIndex = voxelSampleIndex; 227 | } 228 | } 229 | 230 | int _JumpOffset; 231 | int3 _JumpOffsetInterleaved; 232 | 233 | // One thread per cell 234 | [numthreads(THREAD_GROUP_SIZE, 1, 1)] 235 | void JumpFloodStep(uint GIndex : SV_GroupIndex, uint3 GId : SV_GroupID, uint3 DTid : SV_DispatchThreadID) 236 | { 237 | int voxelIndex = GetVoxelIndex(GIndex, GId); 238 | if(voxelIndex >= _VoxelResolution.w) 239 | return; 240 | 241 | int3 centerCoord = GetVoxelCoords(voxelIndex); 242 | float bestDistance = 100000; 243 | int bestIndex = 0; 244 | 245 | #if FLOOD_STEP_ULTRA_QUALITY 246 | for(int z = -1; z <= 1; ++z) 247 | for(int y = -1; y <= 1; ++y) 248 | for(int x = -1; x <= 1; ++x) 249 | JumpSample(centerCoord, int3(x, y, z) * _JumpOffset, bestDistance, bestIndex); 250 | #else 251 | JumpSample(centerCoord, 0, bestDistance, bestIndex); 252 | JumpSample(centerCoord, _JumpOffsetInterleaved, bestDistance, bestIndex); 253 | JumpSample(centerCoord, -_JumpOffsetInterleaved, bestDistance, bestIndex); 254 | #endif 255 | 256 | _JumpBufferRW[voxelIndex] = bestIndex; 257 | } 258 | 259 | // One thread per cell 260 | [numthreads(THREAD_GROUP_SIZE, 1, 1)] 261 | void JumpFloodFinalize(uint GIndex : SV_GroupIndex, uint3 GId : SV_GroupID, uint3 DTid : SV_DispatchThreadID) 262 | { 263 | int voxelIndex = GetVoxelIndex(GIndex, GId); 264 | if(voxelIndex >= _VoxelResolution.w) 265 | return; 266 | 267 | int closestSeedVoxelIndex = GetVoxelJump(voxelIndex); 268 | float distanceToClosestSeedVoxel = length(GetVoxelCoords(voxelIndex) - GetVoxelCoords(closestSeedVoxelIndex)) * g_CellSize; 269 | float distanceOfClosestSeedVoxelToSurface = GetVoxel(closestSeedVoxelIndex); 270 | 271 | // Assuming unsigned distance, since signed has issues with jump flooding. With signed do 272 | // distanceToClosestSeedVoxel * sign(distanceOfClosestSeedVoxelToSurface) + distanceOfClosestSeedVoxelToSurface 273 | _SDFBufferRW[voxelIndex] = distanceToClosestSeedVoxel + distanceOfClosestSeedVoxelToSurface; 274 | } -------------------------------------------------------------------------------- /Runtime/MeshToSDF.compute.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 21a034c7a3ab6be46873a82e0d02ec7b 3 | ComputeShaderImporter: 4 | externalObjects: {} 5 | currentAPIMask: 4 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Runtime/MeshToSDF.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c7f34bde58152514d8cf7e7b2e7cc7dc 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: 7 | - m_Mesh: {instanceID: 0} 8 | - m_Compute: {fileID: 7200000, guid: 21a034c7a3ab6be46873a82e0d02ec7b, type: 3} 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /Runtime/SDFTexture.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEngine.Rendering; 3 | using System; 4 | 5 | public class SDFTexture : MonoBehaviour 6 | { 7 | [SerializeField] 8 | [Tooltip("Either a static 3DTexture asset containing an SDF, or a 3D RenderTexture. A 3D RenderTexture is where MeshToSDF writes the SDF.")] 9 | Texture m_SDF; 10 | [SerializeField] 11 | [Tooltip("Size of the volume. The effective size of the volume will be rounded off to the nearest full voxel, to keep voxels cubic.")] 12 | Vector3 m_Size = Vector3.one; 13 | [SerializeField] 14 | [Tooltip("Voxel count along each axis. Y and Z resolutions are calculated automatically from X and proportions of the volume. Voxel counts above 64^3 might lead to poor performance.")] 15 | int m_Resolution = 64; 16 | 17 | public Texture sdf { get { ValidateTexture(); return m_SDF; } set { m_SDF = value; } } 18 | public Vector3 size { get { return m_Size; } set { m_Size = value; ValidateSize(); } } 19 | public int resolution { get { return m_Resolution; } set { m_Resolution = value; ValidateResolution(); } } 20 | 21 | // Max 3D texture resolution in any dimension is 2048 22 | int kMaxResolution = 2048; 23 | // Max compute buffer size 24 | int kMaxVoxelCount = 1024 * 1024 * 1024 / 2; 25 | 26 | public enum Mode 27 | { 28 | None, 29 | Static, 30 | Dynamic 31 | } 32 | 33 | public Mode mode 34 | { 35 | get 36 | { 37 | if ((m_SDF as Texture3D) != null) 38 | return Mode.Static; 39 | 40 | RenderTexture rt = m_SDF as RenderTexture; 41 | if (rt != null && rt.dimension == TextureDimension.Tex3D) 42 | return Mode.Dynamic; 43 | 44 | return Mode.None; 45 | } 46 | } 47 | 48 | public Vector3Int voxelResolution 49 | { 50 | get 51 | { 52 | Texture3D tex3D = m_SDF as Texture3D; 53 | if (tex3D != null) 54 | return new Vector3Int(tex3D.width, tex3D.height, tex3D.depth); 55 | 56 | Vector3Int res = new Vector3Int(); 57 | res.x = m_Resolution; 58 | res.y = (int)(m_Resolution * m_Size.y / m_Size.x); 59 | res.z = (int)(m_Resolution * m_Size.z / m_Size.x); 60 | res.y = Mathf.Clamp(res.y, 1, kMaxResolution); 61 | res.z = Mathf.Clamp(res.z, 1, kMaxResolution); 62 | return res; 63 | } 64 | } 65 | 66 | public Bounds voxelBounds 67 | { 68 | get 69 | { 70 | Vector3Int voxelRes = voxelResolution; 71 | if (voxelRes == Vector3Int.zero) 72 | return new Bounds(Vector3.zero, Vector3.zero); 73 | 74 | // voxelBounds is m_Size, but adjusted to be filled by uniformly scaled voxels 75 | // voxelResolution quantizes to integer counts, so we just need to multiply by voxelSize 76 | Vector3 extent = new Vector3(voxelRes.x, voxelRes.y, voxelRes.z) * voxelSize; 77 | return new Bounds(Vector3.zero, extent); 78 | } 79 | } 80 | 81 | public float voxelSize 82 | { 83 | get 84 | { 85 | if (mode == Mode.Dynamic) 86 | return m_Size.x / m_Resolution; 87 | 88 | int resX = voxelResolution.x; 89 | return resX != 0 ? 1f / (float)resX : 0f; 90 | } 91 | } 92 | 93 | public Matrix4x4 worldToSDFTexCoords 94 | { 95 | get 96 | { 97 | Vector3 scale = voxelBounds.size; 98 | Matrix4x4 localToSDFLocal = Matrix4x4.Scale(new Vector3(1.0f / scale.x, 1.0f / scale.y, 1.0f / scale.z)); 99 | Matrix4x4 worldToSDFLocal = localToSDFLocal * transform.worldToLocalMatrix; 100 | return Matrix4x4.Translate(Vector3.one * 0.5f) * worldToSDFLocal; 101 | } 102 | } 103 | 104 | public Matrix4x4 sdflocalToWorld 105 | { 106 | get 107 | { 108 | Vector3 scale = voxelBounds.size; 109 | return transform.localToWorldMatrix * Matrix4x4.Scale(scale); 110 | } 111 | } 112 | 113 | public int maxResolution 114 | { 115 | get 116 | { 117 | // res * (res * size.y / size.x) * (res * size.z / size.x) = voxel_count 118 | // res^3 = voxel_count * size.x * size.x / (size.y * size.z) 119 | int maxResolution = (int)(Mathf.Pow(kMaxVoxelCount * m_Size.x * m_Size.x / (m_Size.y * m_Size.z), 1.0f/3.0f)); 120 | return Mathf.Clamp(maxResolution, 1, kMaxResolution); 121 | } 122 | } 123 | 124 | void ValidateSize() 125 | { 126 | m_Size.x = Mathf.Max(m_Size.x, 0.001f); 127 | m_Size.y = Mathf.Max(m_Size.y, 0.001f); 128 | m_Size.z = Mathf.Max(m_Size.z, 0.001f); 129 | } 130 | 131 | 132 | void ValidateResolution() 133 | { 134 | m_Resolution = Mathf.Clamp(m_Resolution, 1, maxResolution); 135 | } 136 | 137 | void ValidateTexture() 138 | { 139 | if (mode == Mode.Static) 140 | return; 141 | 142 | RenderTexture rt = m_SDF as RenderTexture; 143 | if (rt == null) 144 | return; 145 | 146 | Vector3Int res = voxelResolution; 147 | bool serializedPropertyChanged = rt.depth != 0 || rt.width != res.x || rt.height != res.y || rt.volumeDepth != res.z || rt.format != RenderTextureFormat.RHalf || rt.dimension != TextureDimension.Tex3D; 148 | 149 | if (!rt.enableRandomWrite || serializedPropertyChanged) 150 | { 151 | rt.Release(); 152 | if (serializedPropertyChanged) 153 | { 154 | rt.depth = 0; 155 | rt.width = res.x; 156 | rt.height = res.y; 157 | rt.volumeDepth = res.z; 158 | rt.format = RenderTextureFormat.RHalf; 159 | rt.dimension = TextureDimension.Tex3D; 160 | } 161 | 162 | // For some reason this flag gets lost (not serialized?), so we don't want to write and dirty other properties if just this doesn't match 163 | rt.enableRandomWrite = true; 164 | rt.Create(); 165 | } 166 | 167 | if (rt.wrapMode != TextureWrapMode.Clamp) 168 | rt.wrapMode = TextureWrapMode.Clamp; 169 | 170 | if (!rt.IsCreated()) 171 | { 172 | rt.Create(); 173 | } 174 | } 175 | 176 | public void OnValidate() 177 | { 178 | ValidateSize(); 179 | ValidateResolution(); 180 | ValidateTexture(); 181 | } 182 | } 183 | -------------------------------------------------------------------------------- /Runtime/SDFTexture.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c8dd008eddf8fb24190dd13afed8fa97 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Unity.DemoTeam.MeshToSDF.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Unity.DemoTeam.MeshToSDF", 3 | "references": [ 4 | "Unity.RenderPipelines.Core.Runtime", 5 | "Unity.DemoTeam.SDFTexture" 6 | ], 7 | "optionalUnityReferences": [], 8 | "includePlatforms": [], 9 | "excludePlatforms": [], 10 | "allowUnsafeCode": false, 11 | "overrideReferences": false, 12 | "precompiledReferences": [], 13 | "autoReferenced": true, 14 | "defineConstraints": [], 15 | "versionDefines": [ 16 | { 17 | "name": "com.unity.render-pipelines.universal", 18 | "expression": "0.0", 19 | "define": "USING_URP" 20 | }, 21 | { 22 | "name": "com.unity.render-pipelines.high-definition", 23 | "expression": "0.0", 24 | "define": "USING_HDRP" 25 | } 26 | ] 27 | } -------------------------------------------------------------------------------- /Runtime/Unity.DemoTeam.MeshToSDF.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b10624d713de0ea499050eed0b22b274 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Samples~/MeshToSDF-sample/MeshToSDF-SkinnedMesh-HDRP.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a6dec41f780e8ad47beee8f0f3b92973 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Samples~/MeshToSDF-sample/MeshToSDF-StaticMesh-BuiltInRP.unity: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!29 &1 4 | OcclusionCullingSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_OcclusionBakeSettings: 8 | smallestOccluder: 5 9 | smallestHole: 0.25 10 | backfaceThreshold: 100 11 | m_SceneGUID: 00000000000000000000000000000000 12 | m_OcclusionCullingData: {fileID: 0} 13 | --- !u!104 &2 14 | RenderSettings: 15 | m_ObjectHideFlags: 0 16 | serializedVersion: 9 17 | m_Fog: 0 18 | m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} 19 | m_FogMode: 3 20 | m_FogDensity: 0.01 21 | m_LinearFogStart: 0 22 | m_LinearFogEnd: 300 23 | m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} 24 | m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} 25 | m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} 26 | m_AmbientIntensity: 1 27 | m_AmbientMode: 0 28 | m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} 29 | m_SkyboxMaterial: {fileID: 2100000, guid: 96b7f3436aa1f6a4988dde414c10748c, type: 2} 30 | m_HaloStrength: 0.5 31 | m_FlareStrength: 1 32 | m_FlareFadeSpeed: 3 33 | m_HaloTexture: {fileID: 0} 34 | m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} 35 | m_DefaultReflectionMode: 0 36 | m_DefaultReflectionResolution: 128 37 | m_ReflectionBounces: 1 38 | m_ReflectionIntensity: 1 39 | m_CustomReflection: {fileID: 0} 40 | m_Sun: {fileID: 0} 41 | m_IndirectSpecularColor: {r: 0.2391358, g: 0.99999946, b: 0.55273455, a: 1} 42 | m_UseRadianceAmbientProbe: 0 43 | --- !u!157 &3 44 | LightmapSettings: 45 | m_ObjectHideFlags: 0 46 | serializedVersion: 12 47 | m_GIWorkflowMode: 1 48 | m_GISettings: 49 | serializedVersion: 2 50 | m_BounceScale: 1 51 | m_IndirectOutputScale: 1 52 | m_AlbedoBoost: 1 53 | m_EnvironmentLightingMode: 0 54 | m_EnableBakedLightmaps: 1 55 | m_EnableRealtimeLightmaps: 0 56 | m_LightmapEditorSettings: 57 | serializedVersion: 12 58 | m_Resolution: 2 59 | m_BakeResolution: 40 60 | m_AtlasSize: 1024 61 | m_AO: 0 62 | m_AOMaxDistance: 1 63 | m_CompAOExponent: 1 64 | m_CompAOExponentDirect: 0 65 | m_ExtractAmbientOcclusion: 0 66 | m_Padding: 2 67 | m_LightmapParameters: {fileID: 0} 68 | m_LightmapsBakeMode: 1 69 | m_TextureCompression: 1 70 | m_FinalGather: 0 71 | m_FinalGatherFiltering: 1 72 | m_FinalGatherRayCount: 256 73 | m_ReflectionCompression: 2 74 | m_MixedBakeMode: 2 75 | m_BakeBackend: 1 76 | m_PVRSampling: 1 77 | m_PVRDirectSampleCount: 32 78 | m_PVRSampleCount: 512 79 | m_PVRBounces: 2 80 | m_PVREnvironmentSampleCount: 256 81 | m_PVREnvironmentReferencePointCount: 2048 82 | m_PVRFilteringMode: 1 83 | m_PVRDenoiserTypeDirect: 1 84 | m_PVRDenoiserTypeIndirect: 1 85 | m_PVRDenoiserTypeAO: 1 86 | m_PVRFilterTypeDirect: 0 87 | m_PVRFilterTypeIndirect: 0 88 | m_PVRFilterTypeAO: 0 89 | m_PVREnvironmentMIS: 1 90 | m_PVRCulling: 1 91 | m_PVRFilteringGaussRadiusDirect: 1 92 | m_PVRFilteringGaussRadiusIndirect: 5 93 | m_PVRFilteringGaussRadiusAO: 2 94 | m_PVRFilteringAtrousPositionSigmaDirect: 0.5 95 | m_PVRFilteringAtrousPositionSigmaIndirect: 2 96 | m_PVRFilteringAtrousPositionSigmaAO: 1 97 | m_ExportTrainingData: 0 98 | m_TrainingDataDestination: TrainingData 99 | m_LightProbeSampleCountMultiplier: 4 100 | m_LightingDataAsset: {fileID: 0} 101 | m_LightingSettings: {fileID: 0} 102 | --- !u!196 &4 103 | NavMeshSettings: 104 | serializedVersion: 2 105 | m_ObjectHideFlags: 0 106 | m_BuildSettings: 107 | serializedVersion: 2 108 | agentTypeID: 0 109 | agentRadius: 0.5 110 | agentHeight: 2 111 | agentSlope: 45 112 | agentClimb: 0.4 113 | ledgeDropHeight: 0 114 | maxJumpAcrossDistance: 0 115 | minRegionArea: 2 116 | manualCellSize: 0 117 | cellSize: 0.16666667 118 | manualTileSize: 0 119 | tileSize: 256 120 | accuratePlacement: 0 121 | maxJobWorkers: 0 122 | preserveTilesOutsideBounds: 0 123 | debug: 124 | m_Flags: 0 125 | m_NavMeshData: {fileID: 0} 126 | --- !u!1 &115050257 127 | GameObject: 128 | m_ObjectHideFlags: 0 129 | m_CorrespondingSourceObject: {fileID: 0} 130 | m_PrefabInstance: {fileID: 0} 131 | m_PrefabAsset: {fileID: 0} 132 | serializedVersion: 6 133 | m_Component: 134 | - component: {fileID: 115050260} 135 | - component: {fileID: 115050259} 136 | - component: {fileID: 115050258} 137 | m_Layer: 0 138 | m_Name: Main Camera 139 | m_TagString: MainCamera 140 | m_Icon: {fileID: 0} 141 | m_NavMeshLayer: 0 142 | m_StaticEditorFlags: 0 143 | m_IsActive: 1 144 | --- !u!81 &115050258 145 | AudioListener: 146 | m_ObjectHideFlags: 0 147 | m_CorrespondingSourceObject: {fileID: 0} 148 | m_PrefabInstance: {fileID: 0} 149 | m_PrefabAsset: {fileID: 0} 150 | m_GameObject: {fileID: 115050257} 151 | m_Enabled: 1 152 | --- !u!20 &115050259 153 | Camera: 154 | m_ObjectHideFlags: 0 155 | m_CorrespondingSourceObject: {fileID: 0} 156 | m_PrefabInstance: {fileID: 0} 157 | m_PrefabAsset: {fileID: 0} 158 | m_GameObject: {fileID: 115050257} 159 | m_Enabled: 1 160 | serializedVersion: 2 161 | m_ClearFlags: 1 162 | m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} 163 | m_projectionMatrixMode: 1 164 | m_GateFitMode: 2 165 | m_FOVAxisMode: 0 166 | m_SensorSize: {x: 36, y: 24} 167 | m_LensShift: {x: 0, y: 0} 168 | m_FocalLength: 50 169 | m_NormalizedViewPortRect: 170 | serializedVersion: 2 171 | x: 0 172 | y: 0 173 | width: 1 174 | height: 1 175 | near clip plane: 0.3 176 | far clip plane: 1000 177 | field of view: 60 178 | orthographic: 0 179 | orthographic size: 5 180 | m_Depth: -1 181 | m_CullingMask: 182 | serializedVersion: 2 183 | m_Bits: 4294967295 184 | m_RenderingPath: -1 185 | m_TargetTexture: {fileID: 0} 186 | m_TargetDisplay: 0 187 | m_TargetEye: 3 188 | m_HDR: 1 189 | m_AllowMSAA: 1 190 | m_AllowDynamicResolution: 0 191 | m_ForceIntoRT: 0 192 | m_OcclusionCulling: 1 193 | m_StereoConvergence: 10 194 | m_StereoSeparation: 0.022 195 | --- !u!4 &115050260 196 | Transform: 197 | m_ObjectHideFlags: 0 198 | m_CorrespondingSourceObject: {fileID: 0} 199 | m_PrefabInstance: {fileID: 0} 200 | m_PrefabAsset: {fileID: 0} 201 | m_GameObject: {fileID: 115050257} 202 | m_LocalRotation: {x: -0.112534225, y: 0.7353108, z: -0.12607604, w: -0.6563223} 203 | m_LocalPosition: {x: 2.709134, y: 0.96334577, z: 0.30853444} 204 | m_LocalScale: {x: 1, y: 1, z: 1} 205 | m_ConstrainProportionsScale: 0 206 | m_Children: [] 207 | m_Father: {fileID: 0} 208 | m_RootOrder: 0 209 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 210 | --- !u!1 &795626623 211 | GameObject: 212 | m_ObjectHideFlags: 1 213 | m_CorrespondingSourceObject: {fileID: 0} 214 | m_PrefabInstance: {fileID: 0} 215 | m_PrefabAsset: {fileID: 0} 216 | serializedVersion: 6 217 | m_Component: 218 | - component: {fileID: 795626625} 219 | - component: {fileID: 795626624} 220 | m_Layer: 0 221 | m_Name: StaticLightingSky 222 | m_TagString: Untagged 223 | m_Icon: {fileID: 0} 224 | m_NavMeshLayer: 0 225 | m_StaticEditorFlags: 0 226 | m_IsActive: 1 227 | --- !u!114 &795626624 228 | MonoBehaviour: 229 | m_ObjectHideFlags: 1 230 | m_CorrespondingSourceObject: {fileID: 0} 231 | m_PrefabInstance: {fileID: 0} 232 | m_PrefabAsset: {fileID: 0} 233 | m_GameObject: {fileID: 795626623} 234 | m_Enabled: 1 235 | m_EditorHideFlags: 0 236 | m_Script: {fileID: 11500000, guid: 441482e8936e35048a1dffac814e3ef8, type: 3} 237 | m_Name: 238 | m_EditorClassIdentifier: 239 | m_Profile: {fileID: 0} 240 | m_StaticLightingSkyUniqueID: 0 241 | m_StaticLightingCloudsUniqueID: 0 242 | m_StaticLightingVolumetricClouds: 0 243 | --- !u!4 &795626625 244 | Transform: 245 | m_ObjectHideFlags: 1 246 | m_CorrespondingSourceObject: {fileID: 0} 247 | m_PrefabInstance: {fileID: 0} 248 | m_PrefabAsset: {fileID: 0} 249 | m_GameObject: {fileID: 795626623} 250 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 251 | m_LocalPosition: {x: 0, y: 0, z: 0} 252 | m_LocalScale: {x: 1, y: 1, z: 1} 253 | m_ConstrainProportionsScale: 0 254 | m_Children: [] 255 | m_Father: {fileID: 0} 256 | m_RootOrder: 4 257 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 258 | --- !u!1 &987321773 259 | GameObject: 260 | m_ObjectHideFlags: 0 261 | m_CorrespondingSourceObject: {fileID: 0} 262 | m_PrefabInstance: {fileID: 0} 263 | m_PrefabAsset: {fileID: 0} 264 | serializedVersion: 6 265 | m_Component: 266 | - component: {fileID: 987321775} 267 | - component: {fileID: 987321774} 268 | m_Layer: 0 269 | m_Name: SDF Texture - select me in scene view 270 | m_TagString: Untagged 271 | m_Icon: {fileID: 0} 272 | m_NavMeshLayer: 0 273 | m_StaticEditorFlags: 0 274 | m_IsActive: 1 275 | --- !u!114 &987321774 276 | MonoBehaviour: 277 | m_ObjectHideFlags: 0 278 | m_CorrespondingSourceObject: {fileID: 0} 279 | m_PrefabInstance: {fileID: 0} 280 | m_PrefabAsset: {fileID: 0} 281 | m_GameObject: {fileID: 987321773} 282 | m_Enabled: 1 283 | m_EditorHideFlags: 0 284 | m_Script: {fileID: 11500000, guid: c8dd008eddf8fb24190dd13afed8fa97, type: 3} 285 | m_Name: 286 | m_EditorClassIdentifier: 287 | m_SDF: {fileID: 8400000, guid: 65e9625aec8f5cf45ac81e928ac6588b, type: 2} 288 | m_Size: {x: 1.5, y: 2.5, z: 2.5} 289 | m_Resolution: 16 290 | --- !u!4 &987321775 291 | Transform: 292 | m_ObjectHideFlags: 0 293 | m_CorrespondingSourceObject: {fileID: 0} 294 | m_PrefabInstance: {fileID: 0} 295 | m_PrefabAsset: {fileID: 0} 296 | m_GameObject: {fileID: 987321773} 297 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 298 | m_LocalPosition: {x: 0, y: 0, z: 0} 299 | m_LocalScale: {x: 1, y: 1, z: 1} 300 | m_ConstrainProportionsScale: 0 301 | m_Children: [] 302 | m_Father: {fileID: 0} 303 | m_RootOrder: 3 304 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 305 | --- !u!1 &1584764026 306 | GameObject: 307 | m_ObjectHideFlags: 0 308 | m_CorrespondingSourceObject: {fileID: 0} 309 | m_PrefabInstance: {fileID: 0} 310 | m_PrefabAsset: {fileID: 0} 311 | serializedVersion: 6 312 | m_Component: 313 | - component: {fileID: 1584764029} 314 | - component: {fileID: 1584764028} 315 | - component: {fileID: 1584764027} 316 | - component: {fileID: 1584764030} 317 | - component: {fileID: 1584764031} 318 | m_Layer: 0 319 | m_Name: Capsule 320 | m_TagString: Untagged 321 | m_Icon: {fileID: 0} 322 | m_NavMeshLayer: 0 323 | m_StaticEditorFlags: 0 324 | m_IsActive: 1 325 | --- !u!23 &1584764027 326 | MeshRenderer: 327 | m_ObjectHideFlags: 0 328 | m_CorrespondingSourceObject: {fileID: 0} 329 | m_PrefabInstance: {fileID: 0} 330 | m_PrefabAsset: {fileID: 0} 331 | m_GameObject: {fileID: 1584764026} 332 | m_Enabled: 1 333 | m_CastShadows: 1 334 | m_ReceiveShadows: 1 335 | m_DynamicOccludee: 1 336 | m_StaticShadowCaster: 0 337 | m_MotionVectors: 1 338 | m_LightProbeUsage: 1 339 | m_ReflectionProbeUsage: 1 340 | m_RayTracingMode: 2 341 | m_RayTraceProcedural: 0 342 | m_RenderingLayerMask: 1 343 | m_RendererPriority: 0 344 | m_Materials: 345 | - {fileID: 2100000, guid: 06617b352d88e904a8ce85c839ee11ed, type: 2} 346 | m_StaticBatchInfo: 347 | firstSubMesh: 0 348 | subMeshCount: 0 349 | m_StaticBatchRoot: {fileID: 0} 350 | m_ProbeAnchor: {fileID: 0} 351 | m_LightProbeVolumeOverride: {fileID: 0} 352 | m_ScaleInLightmap: 1 353 | m_ReceiveGI: 1 354 | m_PreserveUVs: 0 355 | m_IgnoreNormalsForChartDetection: 0 356 | m_ImportantGI: 0 357 | m_StitchLightmapSeams: 1 358 | m_SelectedEditorRenderState: 3 359 | m_MinimumChartSize: 4 360 | m_AutoUVMaxDistance: 0.5 361 | m_AutoUVMaxAngle: 89 362 | m_LightmapParameters: {fileID: 0} 363 | m_SortingLayerID: 0 364 | m_SortingLayer: 0 365 | m_SortingOrder: 0 366 | m_AdditionalVertexStreams: {fileID: 0} 367 | --- !u!33 &1584764028 368 | MeshFilter: 369 | m_ObjectHideFlags: 0 370 | m_CorrespondingSourceObject: {fileID: 0} 371 | m_PrefabInstance: {fileID: 0} 372 | m_PrefabAsset: {fileID: 0} 373 | m_GameObject: {fileID: 1584764026} 374 | m_Mesh: {fileID: 10208, guid: 0000000000000000e000000000000000, type: 0} 375 | --- !u!4 &1584764029 376 | Transform: 377 | m_ObjectHideFlags: 0 378 | m_CorrespondingSourceObject: {fileID: 0} 379 | m_PrefabInstance: {fileID: 0} 380 | m_PrefabAsset: {fileID: 0} 381 | m_GameObject: {fileID: 1584764026} 382 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 383 | m_LocalPosition: {x: 0, y: 0, z: 0} 384 | m_LocalScale: {x: 1, y: 1, z: 1} 385 | m_ConstrainProportionsScale: 0 386 | m_Children: [] 387 | m_Father: {fileID: 0} 388 | m_RootOrder: 2 389 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 390 | --- !u!95 &1584764030 391 | Animator: 392 | serializedVersion: 4 393 | m_ObjectHideFlags: 0 394 | m_CorrespondingSourceObject: {fileID: 0} 395 | m_PrefabInstance: {fileID: 0} 396 | m_PrefabAsset: {fileID: 0} 397 | m_GameObject: {fileID: 1584764026} 398 | m_Enabled: 1 399 | m_Avatar: {fileID: 0} 400 | m_Controller: {fileID: 9100000, guid: ede3960e5320fb5428daf27f21c01652, type: 2} 401 | m_CullingMode: 0 402 | m_UpdateMode: 0 403 | m_ApplyRootMotion: 0 404 | m_LinearVelocityBlending: 0 405 | m_StabilizeFeet: 0 406 | m_WarningMessage: 407 | m_HasTransformHierarchy: 1 408 | m_AllowConstantClipSamplingOptimization: 1 409 | m_KeepAnimatorControllerStateOnDisable: 0 410 | --- !u!114 &1584764031 411 | MonoBehaviour: 412 | m_ObjectHideFlags: 0 413 | m_CorrespondingSourceObject: {fileID: 0} 414 | m_PrefabInstance: {fileID: 0} 415 | m_PrefabAsset: {fileID: 0} 416 | m_GameObject: {fileID: 1584764026} 417 | m_Enabled: 1 418 | m_EditorHideFlags: 0 419 | m_Script: {fileID: 11500000, guid: c7f34bde58152514d8cf7e7b2e7cc7dc, type: 3} 420 | m_Name: 421 | m_EditorClassIdentifier: 422 | m_SDFTexture: {fileID: 987321774} 423 | m_FloodMode: 0 424 | m_FloodFillQuality: 0 425 | m_FloodFillIterations: 8 426 | m_DistanceMode: 0 427 | m_Compute: {fileID: 7200000, guid: 21a034c7a3ab6be46873a82e0d02ec7b, type: 3} 428 | --- !u!1 &1993660484 429 | GameObject: 430 | m_ObjectHideFlags: 0 431 | m_CorrespondingSourceObject: {fileID: 0} 432 | m_PrefabInstance: {fileID: 0} 433 | m_PrefabAsset: {fileID: 0} 434 | serializedVersion: 6 435 | m_Component: 436 | - component: {fileID: 1993660486} 437 | - component: {fileID: 1993660485} 438 | m_Layer: 0 439 | m_Name: Directional Light 440 | m_TagString: Untagged 441 | m_Icon: {fileID: 0} 442 | m_NavMeshLayer: 0 443 | m_StaticEditorFlags: 0 444 | m_IsActive: 1 445 | --- !u!108 &1993660485 446 | Light: 447 | m_ObjectHideFlags: 0 448 | m_CorrespondingSourceObject: {fileID: 0} 449 | m_PrefabInstance: {fileID: 0} 450 | m_PrefabAsset: {fileID: 0} 451 | m_GameObject: {fileID: 1993660484} 452 | m_Enabled: 1 453 | serializedVersion: 10 454 | m_Type: 1 455 | m_Shape: 0 456 | m_Color: {r: 1, g: 1, b: 1, a: 1} 457 | m_Intensity: 1.79 458 | m_Range: 10 459 | m_SpotAngle: 30 460 | m_InnerSpotAngle: 21.80208 461 | m_CookieSize: 10 462 | m_Shadows: 463 | m_Type: 2 464 | m_Resolution: -1 465 | m_CustomResolution: -1 466 | m_Strength: 1 467 | m_Bias: 0.05 468 | m_NormalBias: 0.4 469 | m_NearPlane: 0.2 470 | m_CullingMatrixOverride: 471 | e00: 1 472 | e01: 0 473 | e02: 0 474 | e03: 0 475 | e10: 0 476 | e11: 1 477 | e12: 0 478 | e13: 0 479 | e20: 0 480 | e21: 0 481 | e22: 1 482 | e23: 0 483 | e30: 0 484 | e31: 0 485 | e32: 0 486 | e33: 1 487 | m_UseCullingMatrixOverride: 0 488 | m_Cookie: {fileID: 0} 489 | m_DrawHalo: 0 490 | m_Flare: {fileID: 0} 491 | m_RenderMode: 0 492 | m_CullingMask: 493 | serializedVersion: 2 494 | m_Bits: 4294967295 495 | m_RenderingLayerMask: 1 496 | m_Lightmapping: 4 497 | m_LightShadowCasterMode: 0 498 | m_AreaSize: {x: 1, y: 1} 499 | m_BounceIntensity: 1 500 | m_ColorTemperature: 6570 501 | m_UseColorTemperature: 0 502 | m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} 503 | m_UseBoundingSphereOverride: 0 504 | m_UseViewFrustumForShadowCasterCull: 1 505 | m_ShadowRadius: 0 506 | m_ShadowAngle: 0 507 | --- !u!4 &1993660486 508 | Transform: 509 | m_ObjectHideFlags: 0 510 | m_CorrespondingSourceObject: {fileID: 0} 511 | m_PrefabInstance: {fileID: 0} 512 | m_PrefabAsset: {fileID: 0} 513 | m_GameObject: {fileID: 1993660484} 514 | m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} 515 | m_LocalPosition: {x: 0, y: 3, z: 0} 516 | m_LocalScale: {x: 1, y: 1, z: 1} 517 | m_ConstrainProportionsScale: 0 518 | m_Children: [] 519 | m_Father: {fileID: 0} 520 | m_RootOrder: 1 521 | m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} 522 | -------------------------------------------------------------------------------- /Samples~/MeshToSDF-sample/MeshToSDF-StaticMesh-BuiltInRP.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e45db8d4e94a77844b32149601b060e8 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Samples~/MeshToSDF-sample/MeshToSDF-StaticMesh-HDRP.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ca50073054abb604fad03fab5c9c5f9b 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Samples~/MeshToSDF-sample/MeshToSDF-StaticMesh-URP.unity: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!29 &1 4 | OcclusionCullingSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_OcclusionBakeSettings: 8 | smallestOccluder: 5 9 | smallestHole: 0.25 10 | backfaceThreshold: 100 11 | m_SceneGUID: 00000000000000000000000000000000 12 | m_OcclusionCullingData: {fileID: 0} 13 | --- !u!104 &2 14 | RenderSettings: 15 | m_ObjectHideFlags: 0 16 | serializedVersion: 9 17 | m_Fog: 0 18 | m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} 19 | m_FogMode: 3 20 | m_FogDensity: 0.01 21 | m_LinearFogStart: 0 22 | m_LinearFogEnd: 300 23 | m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} 24 | m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} 25 | m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} 26 | m_AmbientIntensity: 1 27 | m_AmbientMode: 0 28 | m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} 29 | m_SkyboxMaterial: {fileID: 2100000, guid: 96b7f3436aa1f6a4988dde414c10748c, type: 2} 30 | m_HaloStrength: 0.5 31 | m_FlareStrength: 1 32 | m_FlareFadeSpeed: 3 33 | m_HaloTexture: {fileID: 0} 34 | m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} 35 | m_DefaultReflectionMode: 0 36 | m_DefaultReflectionResolution: 128 37 | m_ReflectionBounces: 1 38 | m_ReflectionIntensity: 1 39 | m_CustomReflection: {fileID: 0} 40 | m_Sun: {fileID: 0} 41 | m_IndirectSpecularColor: {r: 0.046661355, g: 0.99999905, b: 0.26611307, a: 1} 42 | m_UseRadianceAmbientProbe: 0 43 | --- !u!157 &3 44 | LightmapSettings: 45 | m_ObjectHideFlags: 0 46 | serializedVersion: 12 47 | m_GIWorkflowMode: 1 48 | m_GISettings: 49 | serializedVersion: 2 50 | m_BounceScale: 1 51 | m_IndirectOutputScale: 1 52 | m_AlbedoBoost: 1 53 | m_EnvironmentLightingMode: 0 54 | m_EnableBakedLightmaps: 1 55 | m_EnableRealtimeLightmaps: 0 56 | m_LightmapEditorSettings: 57 | serializedVersion: 12 58 | m_Resolution: 2 59 | m_BakeResolution: 40 60 | m_AtlasSize: 1024 61 | m_AO: 0 62 | m_AOMaxDistance: 1 63 | m_CompAOExponent: 1 64 | m_CompAOExponentDirect: 0 65 | m_ExtractAmbientOcclusion: 0 66 | m_Padding: 2 67 | m_LightmapParameters: {fileID: 0} 68 | m_LightmapsBakeMode: 1 69 | m_TextureCompression: 1 70 | m_FinalGather: 0 71 | m_FinalGatherFiltering: 1 72 | m_FinalGatherRayCount: 256 73 | m_ReflectionCompression: 2 74 | m_MixedBakeMode: 2 75 | m_BakeBackend: 1 76 | m_PVRSampling: 1 77 | m_PVRDirectSampleCount: 32 78 | m_PVRSampleCount: 512 79 | m_PVRBounces: 2 80 | m_PVREnvironmentSampleCount: 256 81 | m_PVREnvironmentReferencePointCount: 2048 82 | m_PVRFilteringMode: 1 83 | m_PVRDenoiserTypeDirect: 1 84 | m_PVRDenoiserTypeIndirect: 1 85 | m_PVRDenoiserTypeAO: 1 86 | m_PVRFilterTypeDirect: 0 87 | m_PVRFilterTypeIndirect: 0 88 | m_PVRFilterTypeAO: 0 89 | m_PVREnvironmentMIS: 1 90 | m_PVRCulling: 1 91 | m_PVRFilteringGaussRadiusDirect: 1 92 | m_PVRFilteringGaussRadiusIndirect: 5 93 | m_PVRFilteringGaussRadiusAO: 2 94 | m_PVRFilteringAtrousPositionSigmaDirect: 0.5 95 | m_PVRFilteringAtrousPositionSigmaIndirect: 2 96 | m_PVRFilteringAtrousPositionSigmaAO: 1 97 | m_ExportTrainingData: 0 98 | m_TrainingDataDestination: TrainingData 99 | m_LightProbeSampleCountMultiplier: 4 100 | m_LightingDataAsset: {fileID: 0} 101 | m_LightingSettings: {fileID: 0} 102 | --- !u!196 &4 103 | NavMeshSettings: 104 | serializedVersion: 2 105 | m_ObjectHideFlags: 0 106 | m_BuildSettings: 107 | serializedVersion: 2 108 | agentTypeID: 0 109 | agentRadius: 0.5 110 | agentHeight: 2 111 | agentSlope: 45 112 | agentClimb: 0.4 113 | ledgeDropHeight: 0 114 | maxJumpAcrossDistance: 0 115 | minRegionArea: 2 116 | manualCellSize: 0 117 | cellSize: 0.16666667 118 | manualTileSize: 0 119 | tileSize: 256 120 | accuratePlacement: 0 121 | maxJobWorkers: 0 122 | preserveTilesOutsideBounds: 0 123 | debug: 124 | m_Flags: 0 125 | m_NavMeshData: {fileID: 0} 126 | --- !u!1 &203844586 127 | GameObject: 128 | m_ObjectHideFlags: 0 129 | m_CorrespondingSourceObject: {fileID: 0} 130 | m_PrefabInstance: {fileID: 0} 131 | m_PrefabAsset: {fileID: 0} 132 | serializedVersion: 6 133 | m_Component: 134 | - component: {fileID: 203844589} 135 | - component: {fileID: 203844588} 136 | - component: {fileID: 203844587} 137 | m_Layer: 0 138 | m_Name: Directional Light 139 | m_TagString: Untagged 140 | m_Icon: {fileID: 0} 141 | m_NavMeshLayer: 0 142 | m_StaticEditorFlags: 0 143 | m_IsActive: 1 144 | --- !u!114 &203844587 145 | MonoBehaviour: 146 | m_ObjectHideFlags: 0 147 | m_CorrespondingSourceObject: {fileID: 0} 148 | m_PrefabInstance: {fileID: 0} 149 | m_PrefabAsset: {fileID: 0} 150 | m_GameObject: {fileID: 203844586} 151 | m_Enabled: 1 152 | m_EditorHideFlags: 0 153 | m_Script: {fileID: 11500000, guid: 474bcb49853aa07438625e644c072ee6, type: 3} 154 | m_Name: 155 | m_EditorClassIdentifier: 156 | m_Version: 1 157 | m_UsePipelineSettings: 1 158 | m_AdditionalLightsShadowResolutionTier: 2 159 | m_LightLayerMask: 1 160 | m_CustomShadowLayers: 0 161 | m_ShadowLayerMask: 1 162 | m_LightCookieSize: {x: 1, y: 1} 163 | m_LightCookieOffset: {x: 0, y: 0} 164 | --- !u!108 &203844588 165 | Light: 166 | m_ObjectHideFlags: 0 167 | m_CorrespondingSourceObject: {fileID: 0} 168 | m_PrefabInstance: {fileID: 0} 169 | m_PrefabAsset: {fileID: 0} 170 | m_GameObject: {fileID: 203844586} 171 | m_Enabled: 1 172 | serializedVersion: 10 173 | m_Type: 1 174 | m_Shape: 0 175 | m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} 176 | m_Intensity: 1.92 177 | m_Range: 10 178 | m_SpotAngle: 30 179 | m_InnerSpotAngle: 21.80208 180 | m_CookieSize: 10 181 | m_Shadows: 182 | m_Type: 2 183 | m_Resolution: -1 184 | m_CustomResolution: -1 185 | m_Strength: 1 186 | m_Bias: 0.05 187 | m_NormalBias: 0.4 188 | m_NearPlane: 0.2 189 | m_CullingMatrixOverride: 190 | e00: 1 191 | e01: 0 192 | e02: 0 193 | e03: 0 194 | e10: 0 195 | e11: 1 196 | e12: 0 197 | e13: 0 198 | e20: 0 199 | e21: 0 200 | e22: 1 201 | e23: 0 202 | e30: 0 203 | e31: 0 204 | e32: 0 205 | e33: 1 206 | m_UseCullingMatrixOverride: 0 207 | m_Cookie: {fileID: 0} 208 | m_DrawHalo: 0 209 | m_Flare: {fileID: 0} 210 | m_RenderMode: 0 211 | m_CullingMask: 212 | serializedVersion: 2 213 | m_Bits: 4294967295 214 | m_RenderingLayerMask: 1 215 | m_Lightmapping: 4 216 | m_LightShadowCasterMode: 0 217 | m_AreaSize: {x: 1, y: 1} 218 | m_BounceIntensity: 1 219 | m_ColorTemperature: 6570 220 | m_UseColorTemperature: 0 221 | m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} 222 | m_UseBoundingSphereOverride: 0 223 | m_UseViewFrustumForShadowCasterCull: 1 224 | m_ShadowRadius: 0 225 | m_ShadowAngle: 0 226 | --- !u!4 &203844589 227 | Transform: 228 | m_ObjectHideFlags: 0 229 | m_CorrespondingSourceObject: {fileID: 0} 230 | m_PrefabInstance: {fileID: 0} 231 | m_PrefabAsset: {fileID: 0} 232 | m_GameObject: {fileID: 203844586} 233 | m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} 234 | m_LocalPosition: {x: 0, y: 3, z: 0} 235 | m_LocalScale: {x: 1, y: 1, z: 1} 236 | m_ConstrainProportionsScale: 0 237 | m_Children: [] 238 | m_Father: {fileID: 0} 239 | m_RootOrder: 1 240 | m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} 241 | --- !u!1 &382486044 242 | GameObject: 243 | m_ObjectHideFlags: 0 244 | m_CorrespondingSourceObject: {fileID: 0} 245 | m_PrefabInstance: {fileID: 0} 246 | m_PrefabAsset: {fileID: 0} 247 | serializedVersion: 6 248 | m_Component: 249 | - component: {fileID: 382486049} 250 | - component: {fileID: 382486048} 251 | - component: {fileID: 382486047} 252 | - component: {fileID: 382486046} 253 | - component: {fileID: 382486045} 254 | m_Layer: 0 255 | m_Name: Capsule 256 | m_TagString: Untagged 257 | m_Icon: {fileID: 0} 258 | m_NavMeshLayer: 0 259 | m_StaticEditorFlags: 0 260 | m_IsActive: 1 261 | --- !u!114 &382486045 262 | MonoBehaviour: 263 | m_ObjectHideFlags: 0 264 | m_CorrespondingSourceObject: {fileID: 0} 265 | m_PrefabInstance: {fileID: 0} 266 | m_PrefabAsset: {fileID: 0} 267 | m_GameObject: {fileID: 382486044} 268 | m_Enabled: 1 269 | m_EditorHideFlags: 0 270 | m_Script: {fileID: 11500000, guid: c7f34bde58152514d8cf7e7b2e7cc7dc, type: 3} 271 | m_Name: 272 | m_EditorClassIdentifier: 273 | m_SDFTexture: {fileID: 515049555} 274 | m_FloodMode: 0 275 | m_FloodFillQuality: 0 276 | m_FloodFillIterations: 8 277 | m_DistanceMode: 0 278 | m_Compute: {fileID: 7200000, guid: 21a034c7a3ab6be46873a82e0d02ec7b, type: 3} 279 | --- !u!95 &382486046 280 | Animator: 281 | serializedVersion: 4 282 | m_ObjectHideFlags: 0 283 | m_CorrespondingSourceObject: {fileID: 0} 284 | m_PrefabInstance: {fileID: 0} 285 | m_PrefabAsset: {fileID: 0} 286 | m_GameObject: {fileID: 382486044} 287 | m_Enabled: 1 288 | m_Avatar: {fileID: 0} 289 | m_Controller: {fileID: 9100000, guid: ede3960e5320fb5428daf27f21c01652, type: 2} 290 | m_CullingMode: 0 291 | m_UpdateMode: 0 292 | m_ApplyRootMotion: 0 293 | m_LinearVelocityBlending: 0 294 | m_StabilizeFeet: 0 295 | m_WarningMessage: 296 | m_HasTransformHierarchy: 1 297 | m_AllowConstantClipSamplingOptimization: 1 298 | m_KeepAnimatorControllerStateOnDisable: 0 299 | --- !u!23 &382486047 300 | MeshRenderer: 301 | m_ObjectHideFlags: 0 302 | m_CorrespondingSourceObject: {fileID: 0} 303 | m_PrefabInstance: {fileID: 0} 304 | m_PrefabAsset: {fileID: 0} 305 | m_GameObject: {fileID: 382486044} 306 | m_Enabled: 1 307 | m_CastShadows: 1 308 | m_ReceiveShadows: 1 309 | m_DynamicOccludee: 1 310 | m_StaticShadowCaster: 0 311 | m_MotionVectors: 1 312 | m_LightProbeUsage: 1 313 | m_ReflectionProbeUsage: 1 314 | m_RayTracingMode: 2 315 | m_RayTraceProcedural: 0 316 | m_RenderingLayerMask: 1 317 | m_RendererPriority: 0 318 | m_Materials: 319 | - {fileID: 2100000, guid: 347dc93730433e941a38a06145405473, type: 2} 320 | m_StaticBatchInfo: 321 | firstSubMesh: 0 322 | subMeshCount: 0 323 | m_StaticBatchRoot: {fileID: 0} 324 | m_ProbeAnchor: {fileID: 0} 325 | m_LightProbeVolumeOverride: {fileID: 0} 326 | m_ScaleInLightmap: 1 327 | m_ReceiveGI: 1 328 | m_PreserveUVs: 0 329 | m_IgnoreNormalsForChartDetection: 0 330 | m_ImportantGI: 0 331 | m_StitchLightmapSeams: 1 332 | m_SelectedEditorRenderState: 3 333 | m_MinimumChartSize: 4 334 | m_AutoUVMaxDistance: 0.5 335 | m_AutoUVMaxAngle: 89 336 | m_LightmapParameters: {fileID: 0} 337 | m_SortingLayerID: 0 338 | m_SortingLayer: 0 339 | m_SortingOrder: 0 340 | m_AdditionalVertexStreams: {fileID: 0} 341 | --- !u!33 &382486048 342 | MeshFilter: 343 | m_ObjectHideFlags: 0 344 | m_CorrespondingSourceObject: {fileID: 0} 345 | m_PrefabInstance: {fileID: 0} 346 | m_PrefabAsset: {fileID: 0} 347 | m_GameObject: {fileID: 382486044} 348 | m_Mesh: {fileID: 10208, guid: 0000000000000000e000000000000000, type: 0} 349 | --- !u!4 &382486049 350 | Transform: 351 | m_ObjectHideFlags: 0 352 | m_CorrespondingSourceObject: {fileID: 0} 353 | m_PrefabInstance: {fileID: 0} 354 | m_PrefabAsset: {fileID: 0} 355 | m_GameObject: {fileID: 382486044} 356 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 357 | m_LocalPosition: {x: 0, y: 0, z: 0} 358 | m_LocalScale: {x: 1, y: 1, z: 1} 359 | m_ConstrainProportionsScale: 0 360 | m_Children: [] 361 | m_Father: {fileID: 0} 362 | m_RootOrder: 3 363 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 364 | --- !u!1 &515049554 365 | GameObject: 366 | m_ObjectHideFlags: 0 367 | m_CorrespondingSourceObject: {fileID: 0} 368 | m_PrefabInstance: {fileID: 0} 369 | m_PrefabAsset: {fileID: 0} 370 | serializedVersion: 6 371 | m_Component: 372 | - component: {fileID: 515049556} 373 | - component: {fileID: 515049555} 374 | m_Layer: 0 375 | m_Name: SDF Texture - select me in scene view 376 | m_TagString: Untagged 377 | m_Icon: {fileID: 0} 378 | m_NavMeshLayer: 0 379 | m_StaticEditorFlags: 0 380 | m_IsActive: 1 381 | --- !u!114 &515049555 382 | MonoBehaviour: 383 | m_ObjectHideFlags: 0 384 | m_CorrespondingSourceObject: {fileID: 0} 385 | m_PrefabInstance: {fileID: 0} 386 | m_PrefabAsset: {fileID: 0} 387 | m_GameObject: {fileID: 515049554} 388 | m_Enabled: 1 389 | m_EditorHideFlags: 0 390 | m_Script: {fileID: 11500000, guid: c8dd008eddf8fb24190dd13afed8fa97, type: 3} 391 | m_Name: 392 | m_EditorClassIdentifier: 393 | m_SDF: {fileID: 8400000, guid: 65e9625aec8f5cf45ac81e928ac6588b, type: 2} 394 | m_Size: {x: 1.5, y: 2.5, z: 2.5} 395 | m_Resolution: 16 396 | --- !u!4 &515049556 397 | Transform: 398 | m_ObjectHideFlags: 0 399 | m_CorrespondingSourceObject: {fileID: 0} 400 | m_PrefabInstance: {fileID: 0} 401 | m_PrefabAsset: {fileID: 0} 402 | m_GameObject: {fileID: 515049554} 403 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 404 | m_LocalPosition: {x: 0, y: 0, z: 0} 405 | m_LocalScale: {x: 1, y: 1, z: 1} 406 | m_ConstrainProportionsScale: 0 407 | m_Children: [] 408 | m_Father: {fileID: 0} 409 | m_RootOrder: 4 410 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 411 | --- !u!1 &961739749 412 | GameObject: 413 | m_ObjectHideFlags: 0 414 | m_CorrespondingSourceObject: {fileID: 0} 415 | m_PrefabInstance: {fileID: 0} 416 | m_PrefabAsset: {fileID: 0} 417 | serializedVersion: 6 418 | m_Component: 419 | - component: {fileID: 961739753} 420 | - component: {fileID: 961739752} 421 | - component: {fileID: 961739751} 422 | - component: {fileID: 961739750} 423 | m_Layer: 0 424 | m_Name: Main Camera 425 | m_TagString: MainCamera 426 | m_Icon: {fileID: 0} 427 | m_NavMeshLayer: 0 428 | m_StaticEditorFlags: 0 429 | m_IsActive: 1 430 | --- !u!114 &961739750 431 | MonoBehaviour: 432 | m_ObjectHideFlags: 0 433 | m_CorrespondingSourceObject: {fileID: 0} 434 | m_PrefabInstance: {fileID: 0} 435 | m_PrefabAsset: {fileID: 0} 436 | m_GameObject: {fileID: 961739749} 437 | m_Enabled: 1 438 | m_EditorHideFlags: 0 439 | m_Script: {fileID: 11500000, guid: a79441f348de89743a2939f4d699eac1, type: 3} 440 | m_Name: 441 | m_EditorClassIdentifier: 442 | m_RenderShadows: 1 443 | m_RequiresDepthTextureOption: 2 444 | m_RequiresOpaqueTextureOption: 2 445 | m_CameraType: 0 446 | m_Cameras: [] 447 | m_RendererIndex: -1 448 | m_VolumeLayerMask: 449 | serializedVersion: 2 450 | m_Bits: 1 451 | m_VolumeTrigger: {fileID: 0} 452 | m_VolumeFrameworkUpdateModeOption: 2 453 | m_RenderPostProcessing: 1 454 | m_Antialiasing: 1 455 | m_AntialiasingQuality: 2 456 | m_StopNaN: 0 457 | m_Dithering: 1 458 | m_ClearDepth: 1 459 | m_AllowXRRendering: 1 460 | m_RequiresDepthTexture: 0 461 | m_RequiresColorTexture: 0 462 | m_Version: 2 463 | --- !u!81 &961739751 464 | AudioListener: 465 | m_ObjectHideFlags: 0 466 | m_CorrespondingSourceObject: {fileID: 0} 467 | m_PrefabInstance: {fileID: 0} 468 | m_PrefabAsset: {fileID: 0} 469 | m_GameObject: {fileID: 961739749} 470 | m_Enabled: 1 471 | --- !u!20 &961739752 472 | Camera: 473 | m_ObjectHideFlags: 0 474 | m_CorrespondingSourceObject: {fileID: 0} 475 | m_PrefabInstance: {fileID: 0} 476 | m_PrefabAsset: {fileID: 0} 477 | m_GameObject: {fileID: 961739749} 478 | m_Enabled: 1 479 | serializedVersion: 2 480 | m_ClearFlags: 1 481 | m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} 482 | m_projectionMatrixMode: 1 483 | m_GateFitMode: 2 484 | m_FOVAxisMode: 0 485 | m_SensorSize: {x: 36, y: 24} 486 | m_LensShift: {x: 0, y: 0} 487 | m_FocalLength: 50 488 | m_NormalizedViewPortRect: 489 | serializedVersion: 2 490 | x: 0 491 | y: 0 492 | width: 1 493 | height: 1 494 | near clip plane: 0.3 495 | far clip plane: 1000 496 | field of view: 60 497 | orthographic: 0 498 | orthographic size: 5 499 | m_Depth: -1 500 | m_CullingMask: 501 | serializedVersion: 2 502 | m_Bits: 4294967295 503 | m_RenderingPath: -1 504 | m_TargetTexture: {fileID: 0} 505 | m_TargetDisplay: 0 506 | m_TargetEye: 3 507 | m_HDR: 1 508 | m_AllowMSAA: 1 509 | m_AllowDynamicResolution: 0 510 | m_ForceIntoRT: 0 511 | m_OcclusionCulling: 1 512 | m_StereoConvergence: 10 513 | m_StereoSeparation: 0.022 514 | --- !u!4 &961739753 515 | Transform: 516 | m_ObjectHideFlags: 0 517 | m_CorrespondingSourceObject: {fileID: 0} 518 | m_PrefabInstance: {fileID: 0} 519 | m_PrefabAsset: {fileID: 0} 520 | m_GameObject: {fileID: 961739749} 521 | m_LocalRotation: {x: -0.0205643, y: 0.9196998, z: -0.048614454, w: -0.3890579} 522 | m_LocalPosition: {x: 2.7203612, y: 0.4018702, z: 2.6399567} 523 | m_LocalScale: {x: 1, y: 1, z: 1} 524 | m_ConstrainProportionsScale: 0 525 | m_Children: [] 526 | m_Father: {fileID: 0} 527 | m_RootOrder: 0 528 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 529 | --- !u!1 &1160234425 530 | GameObject: 531 | m_ObjectHideFlags: 0 532 | m_CorrespondingSourceObject: {fileID: 0} 533 | m_PrefabInstance: {fileID: 0} 534 | m_PrefabAsset: {fileID: 0} 535 | serializedVersion: 6 536 | m_Component: 537 | - component: {fileID: 1160234427} 538 | - component: {fileID: 1160234426} 539 | m_Layer: 0 540 | m_Name: Global Volume 541 | m_TagString: Untagged 542 | m_Icon: {fileID: 0} 543 | m_NavMeshLayer: 0 544 | m_StaticEditorFlags: 0 545 | m_IsActive: 1 546 | --- !u!114 &1160234426 547 | MonoBehaviour: 548 | m_ObjectHideFlags: 0 549 | m_CorrespondingSourceObject: {fileID: 0} 550 | m_PrefabInstance: {fileID: 0} 551 | m_PrefabAsset: {fileID: 0} 552 | m_GameObject: {fileID: 1160234425} 553 | m_Enabled: 1 554 | m_EditorHideFlags: 0 555 | m_Script: {fileID: 11500000, guid: 172515602e62fb746b5d573b38a5fe58, type: 3} 556 | m_Name: 557 | m_EditorClassIdentifier: 558 | m_IsGlobal: 1 559 | priority: 0 560 | blendDistance: 0 561 | weight: 1 562 | sharedProfile: {fileID: 11400000, guid: 4c8c1cab3fe450a4a8adb564e6be0239, type: 2} 563 | --- !u!4 &1160234427 564 | Transform: 565 | m_ObjectHideFlags: 0 566 | m_CorrespondingSourceObject: {fileID: 0} 567 | m_PrefabInstance: {fileID: 0} 568 | m_PrefabAsset: {fileID: 0} 569 | m_GameObject: {fileID: 1160234425} 570 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 571 | m_LocalPosition: {x: 0, y: 0, z: -45.78} 572 | m_LocalScale: {x: 1, y: 1, z: 1} 573 | m_ConstrainProportionsScale: 0 574 | m_Children: [] 575 | m_Father: {fileID: 0} 576 | m_RootOrder: 2 577 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 578 | -------------------------------------------------------------------------------- /Samples~/MeshToSDF-sample/MeshToSDF-StaticMesh-URP.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: adb8cae6f077b1a438bc4fcd60665bf9 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Samples~/MeshToSDF-sample/SDFTexture-SkinnedMesh.renderTexture: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!84 &8400000 4 | RenderTexture: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_Name: SDFTexture-SkinnedMesh 10 | m_ImageContentsHash: 11 | serializedVersion: 2 12 | Hash: 00000000000000000000000000000000 13 | m_ForcedFallbackFormat: 4 14 | m_DownscaleFallback: 0 15 | m_IsAlphaChannelOptional: 0 16 | serializedVersion: 5 17 | m_Width: 32 18 | m_Height: 32 19 | m_AntiAliasing: 1 20 | m_MipCount: -1 21 | m_DepthStencilFormat: 0 22 | m_ColorFormat: 45 23 | m_MipMap: 0 24 | m_GenerateMips: 1 25 | m_SRGB: 0 26 | m_UseDynamicScale: 0 27 | m_BindMS: 0 28 | m_EnableCompatibleFormat: 1 29 | m_TextureSettings: 30 | serializedVersion: 2 31 | m_FilterMode: 1 32 | m_Aniso: 0 33 | m_MipBias: 0 34 | m_WrapU: 1 35 | m_WrapV: 1 36 | m_WrapW: 1 37 | m_Dimension: 3 38 | m_VolumeDepth: 32 39 | m_ShadowSamplingMode: 2 40 | -------------------------------------------------------------------------------- /Samples~/MeshToSDF-sample/SDFTexture-SkinnedMesh.renderTexture.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 069c47c4347941e4498d303a60f471e2 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 8400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Samples~/MeshToSDF-sample/SDFTexture-StaticMesh.renderTexture: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!84 &8400000 4 | RenderTexture: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_Name: SDFTexture-StaticMesh 10 | m_ImageContentsHash: 11 | serializedVersion: 2 12 | Hash: 00000000000000000000000000000000 13 | m_ForcedFallbackFormat: 4 14 | m_DownscaleFallback: 0 15 | m_IsAlphaChannelOptional: 0 16 | serializedVersion: 5 17 | m_Width: 16 18 | m_Height: 26 19 | m_AntiAliasing: 1 20 | m_MipCount: -1 21 | m_DepthStencilFormat: 0 22 | m_ColorFormat: 45 23 | m_MipMap: 0 24 | m_GenerateMips: 1 25 | m_SRGB: 0 26 | m_UseDynamicScale: 0 27 | m_BindMS: 0 28 | m_EnableCompatibleFormat: 1 29 | m_TextureSettings: 30 | serializedVersion: 2 31 | m_FilterMode: 1 32 | m_Aniso: 0 33 | m_MipBias: 0 34 | m_WrapU: 1 35 | m_WrapV: 1 36 | m_WrapW: 1 37 | m_Dimension: 3 38 | m_VolumeDepth: 26 39 | m_ShadowSamplingMode: 2 40 | -------------------------------------------------------------------------------- /Samples~/MeshToSDF-sample/SDFTexture-StaticMesh.renderTexture.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 65e9625aec8f5cf45ac81e928ac6588b 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 8400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Samples~/MeshToSDF-sample/SceneAssets.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ccc04348464a0bb4da43c974d10ab590 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Samples~/MeshToSDF-sample/SceneAssets/SkinnedMesh.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9b3e692d919fb4142a4790a98996f89b 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Samples~/MeshToSDF-sample/SceneAssets/SkinnedMesh/Environment.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ee7b75c48ebf4c3489fc8b9f76bfb627 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Samples~/MeshToSDF-sample/SceneAssets/SkinnedMesh/Global Volume Profile.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f104d21cc0d61484fa88f81d68a68fe3 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Samples~/MeshToSDF-sample/SceneAssets/SkinnedMesh/Mannequin.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/com.unity.demoteam.mesh-to-sdf/1f8ee658aabe2b588aae7d0b635a9941266a52ef/Samples~/MeshToSDF-sample/SceneAssets/SkinnedMesh/Mannequin.fbx -------------------------------------------------------------------------------- /Samples~/MeshToSDF-sample/SceneAssets/SkinnedMesh/Mannequin.fbx.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 42e6a3e75c593b441a96b61c9cd97395 3 | ModelImporter: 4 | serializedVersion: 22200 5 | internalIDToNameTable: [] 6 | externalObjects: {} 7 | materials: 8 | materialImportMode: 2 9 | materialName: 0 10 | materialSearch: 1 11 | materialLocation: 1 12 | animations: 13 | legacyGenerateAnimations: 4 14 | bakeSimulation: 0 15 | resampleCurves: 1 16 | optimizeGameObjects: 0 17 | removeConstantScaleCurves: 0 18 | motionNodeName: 19 | animationImportErrors: 20 | animationImportWarnings: 21 | animationRetargetingWarnings: 22 | animationDoRetargetingWarnings: 0 23 | importAnimatedCustomProperties: 0 24 | importConstraints: 0 25 | animationCompression: 1 26 | animationRotationError: 0.5 27 | animationPositionError: 0.5 28 | animationScaleError: 0.5 29 | animationWrapMode: 0 30 | extraExposedTransformPaths: [] 31 | extraUserProperties: [] 32 | clipAnimations: 33 | - serializedVersion: 16 34 | name: Take 001 35 | takeName: Take 001 36 | internalID: 1827226128182048838 37 | firstFrame: 460 38 | lastFrame: 2194 39 | wrapMode: 0 40 | orientationOffsetY: 0 41 | level: 0 42 | cycleOffset: 0 43 | loop: 0 44 | hasAdditiveReferencePose: 0 45 | loopTime: 0 46 | loopBlend: 0 47 | loopBlendOrientation: 0 48 | loopBlendPositionY: 0 49 | loopBlendPositionXZ: 0 50 | keepOriginalOrientation: 0 51 | keepOriginalPositionY: 1 52 | keepOriginalPositionXZ: 0 53 | heightFromFeet: 0 54 | mirror: 0 55 | bodyMask: 01000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000 56 | curves: [] 57 | events: [] 58 | transformMask: [] 59 | maskType: 3 60 | maskSource: {instanceID: 0} 61 | additiveReferencePoseFrame: 0 62 | isReadable: 0 63 | meshes: 64 | lODScreenPercentages: [] 65 | globalScale: 1 66 | meshCompression: 0 67 | addColliders: 0 68 | useSRGBMaterialColor: 1 69 | sortHierarchyByName: 1 70 | importVisibility: 1 71 | importBlendShapes: 1 72 | importCameras: 1 73 | importLights: 1 74 | nodeNameCollisionStrategy: 1 75 | fileIdsGeneration: 2 76 | swapUVChannels: 0 77 | generateSecondaryUV: 0 78 | useFileUnits: 1 79 | keepQuads: 0 80 | weldVertices: 1 81 | bakeAxisConversion: 0 82 | preserveHierarchy: 0 83 | skinWeightsMode: 1 84 | maxBonesPerVertex: 6 85 | minBoneWeight: 0.001 86 | optimizeBones: 0 87 | meshOptimizationFlags: -1 88 | indexFormat: 0 89 | secondaryUVAngleDistortion: 8 90 | secondaryUVAreaDistortion: 15.000001 91 | secondaryUVHardAngle: 88 92 | secondaryUVMarginMethod: 1 93 | secondaryUVMinLightmapResolution: 40 94 | secondaryUVMinObjectScale: 1 95 | secondaryUVPackMargin: 4 96 | useFileScale: 1 97 | strictVertexDataChecks: 0 98 | tangentSpace: 99 | normalSmoothAngle: 60 100 | normalImportMode: 0 101 | tangentImportMode: 3 102 | normalCalculationMode: 4 103 | legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0 104 | blendShapeNormalImportMode: 1 105 | normalSmoothingSource: 0 106 | referencedClips: [] 107 | importAnimation: 1 108 | humanDescription: 109 | serializedVersion: 3 110 | human: [] 111 | skeleton: [] 112 | armTwist: 0.5 113 | foreArmTwist: 0.5 114 | upperLegTwist: 0.5 115 | legTwist: 0.5 116 | armStretch: 0.05 117 | legStretch: 0.05 118 | feetSpacing: 0 119 | globalScale: 1 120 | rootMotionBoneName: 121 | hasTranslationDoF: 0 122 | hasExtraRoot: 0 123 | skeletonHasParents: 1 124 | lastHumanDescriptionAvatarSource: {instanceID: 0} 125 | autoGenerateAvatarMappingIfUnspecified: 1 126 | animationType: 2 127 | humanoidOversampling: 1 128 | avatarSetup: 0 129 | addHumanoidExtraRootOnlyWhenUsingAvatar: 1 130 | importBlendShapeDeformPercent: 1 131 | remapMaterialsIfMaterialImportModeIsNone: 0 132 | additionalBone: 0 133 | userData: 134 | assetBundleName: 135 | assetBundleVariant: 136 | -------------------------------------------------------------------------------- /Samples~/MeshToSDF-sample/SceneAssets/SkinnedMesh/Mannequin_01_Lights.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &1393302059519374015 4 | GameObject: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | serializedVersion: 6 10 | m_Component: 11 | - component: {fileID: 1393302059519374012} 12 | m_Layer: 0 13 | m_Name: Mannequin_01_Lights 14 | m_TagString: Untagged 15 | m_Icon: {fileID: 0} 16 | m_NavMeshLayer: 0 17 | m_StaticEditorFlags: 0 18 | m_IsActive: 1 19 | --- !u!4 &1393302059519374012 20 | Transform: 21 | m_ObjectHideFlags: 0 22 | m_CorrespondingSourceObject: {fileID: 0} 23 | m_PrefabInstance: {fileID: 0} 24 | m_PrefabAsset: {fileID: 0} 25 | m_GameObject: {fileID: 1393302059519374015} 26 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 27 | m_LocalPosition: {x: 0, y: 0, z: 0} 28 | m_LocalScale: {x: 1, y: 1, z: 1} 29 | m_ConstrainProportionsScale: 0 30 | m_Children: 31 | - {fileID: 7000581107869638905} 32 | - {fileID: 4010008948523426476} 33 | m_Father: {fileID: 0} 34 | m_RootOrder: 3 35 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 36 | --- !u!1 &5134930596796433314 37 | GameObject: 38 | m_ObjectHideFlags: 0 39 | m_CorrespondingSourceObject: {fileID: 0} 40 | m_PrefabInstance: {fileID: 0} 41 | m_PrefabAsset: {fileID: 0} 42 | serializedVersion: 6 43 | m_Component: 44 | - component: {fileID: 4010008948523426476} 45 | - component: {fileID: 6553608765272247196} 46 | - component: {fileID: 1629715303663471634} 47 | m_Layer: 0 48 | m_Name: Area Light - Mannequin_01 BOUNCE 49 | m_TagString: Untagged 50 | m_Icon: {fileID: 0} 51 | m_NavMeshLayer: 0 52 | m_StaticEditorFlags: 0 53 | m_IsActive: 1 54 | --- !u!4 &4010008948523426476 55 | Transform: 56 | m_ObjectHideFlags: 0 57 | m_CorrespondingSourceObject: {fileID: 0} 58 | m_PrefabInstance: {fileID: 0} 59 | m_PrefabAsset: {fileID: 0} 60 | m_GameObject: {fileID: 5134930596796433314} 61 | m_LocalRotation: {x: 0.60927963, y: -0.573123, z: -0.3822004, w: -0.39272293} 62 | m_LocalPosition: {x: -0.0119, y: -0.2302, z: 0.2094} 63 | m_LocalScale: {x: 1, y: 1, z: 1} 64 | m_ConstrainProportionsScale: 0 65 | m_Children: [] 66 | m_Father: {fileID: 1393302059519374012} 67 | m_RootOrder: -1 68 | m_LocalEulerAnglesHint: {x: 246.44101, y: 2.2339935, z: 85.034} 69 | --- !u!108 &6553608765272247196 70 | Light: 71 | m_ObjectHideFlags: 0 72 | m_CorrespondingSourceObject: {fileID: 0} 73 | m_PrefabInstance: {fileID: 0} 74 | m_PrefabAsset: {fileID: 0} 75 | m_GameObject: {fileID: 5134930596796433314} 76 | m_Enabled: 1 77 | serializedVersion: 10 78 | m_Type: 2 79 | m_Shape: 0 80 | m_Color: {r: 0.9529412, g: 1, b: 0.8352941, a: 1} 81 | m_Intensity: 25984.48 82 | m_Range: 2 83 | m_SpotAngle: 30 84 | m_InnerSpotAngle: 21.80208 85 | m_CookieSize: 10 86 | m_Shadows: 87 | m_Type: 1 88 | m_Resolution: -1 89 | m_CustomResolution: -1 90 | m_Strength: 1 91 | m_Bias: 0.05 92 | m_NormalBias: 0.4 93 | m_NearPlane: 0.2 94 | m_CullingMatrixOverride: 95 | e00: 1 96 | e01: 0 97 | e02: 0 98 | e03: 0 99 | e10: 0 100 | e11: 1 101 | e12: 0 102 | e13: 0 103 | e20: 0 104 | e21: 0 105 | e22: 1 106 | e23: 0 107 | e30: 0 108 | e31: 0 109 | e32: 0 110 | e33: 1 111 | m_UseCullingMatrixOverride: 0 112 | m_Cookie: {fileID: 0} 113 | m_DrawHalo: 0 114 | m_Flare: {fileID: 0} 115 | m_RenderMode: 0 116 | m_CullingMask: 117 | serializedVersion: 2 118 | m_Bits: 4294967295 119 | m_RenderingLayerMask: 3 120 | m_Lightmapping: 4 121 | m_LightShadowCasterMode: 2 122 | m_AreaSize: {x: 0.7, y: 0.7} 123 | m_BounceIntensity: 1 124 | m_ColorTemperature: 9388 125 | m_UseColorTemperature: 1 126 | m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 2} 127 | m_UseBoundingSphereOverride: 1 128 | m_UseViewFrustumForShadowCasterCull: 1 129 | m_ShadowRadius: 0 130 | m_ShadowAngle: 0 131 | --- !u!114 &1629715303663471634 132 | MonoBehaviour: 133 | m_ObjectHideFlags: 0 134 | m_CorrespondingSourceObject: {fileID: 0} 135 | m_PrefabInstance: {fileID: 0} 136 | m_PrefabAsset: {fileID: 0} 137 | m_GameObject: {fileID: 5134930596796433314} 138 | m_Enabled: 1 139 | m_EditorHideFlags: 0 140 | m_Script: {fileID: 11500000, guid: 7a68c43fe1f2a47cfa234b5eeaa98012, type: 3} 141 | m_Name: 142 | m_EditorClassIdentifier: 143 | m_Intensity: 40000 144 | m_EnableSpotReflector: 1 145 | m_LuxAtDistance: 1 146 | m_InnerSpotPercent: 0 147 | m_SpotIESCutoffPercent: 100 148 | m_LightDimmer: 1 149 | m_VolumetricDimmer: 1 150 | m_LightUnit: 0 151 | m_FadeDistance: 10000 152 | m_VolumetricFadeDistance: 10000 153 | m_AffectDiffuse: 1 154 | m_AffectSpecular: 1 155 | m_NonLightmappedOnly: 0 156 | m_ShapeWidth: 0.7 157 | m_ShapeHeight: 0.7 158 | m_AspectRatio: 1 159 | m_ShapeRadius: 0.025 160 | m_SoftnessScale: 1 161 | m_UseCustomSpotLightShadowCone: 0 162 | m_CustomSpotLightShadowCone: 30 163 | m_MaxSmoothness: 0.99 164 | m_ApplyRangeAttenuation: 1 165 | m_DisplayAreaLightEmissiveMesh: 0 166 | m_AreaLightCookie: {fileID: 0} 167 | m_IESPoint: {fileID: 0} 168 | m_IESSpot: {fileID: 0} 169 | m_IncludeForRayTracing: 1 170 | m_AreaLightShadowCone: 10 171 | m_UseScreenSpaceShadows: 0 172 | m_InteractsWithSky: 1 173 | m_AngularDiameter: 0.5 174 | m_FlareSize: 2 175 | m_FlareTint: {r: 1, g: 1, b: 1, a: 1} 176 | m_FlareFalloff: 4 177 | m_SurfaceTexture: {fileID: 0} 178 | m_SurfaceTint: {r: 1, g: 1, b: 1, a: 1} 179 | m_Distance: 1.5e+11 180 | m_UseRayTracedShadows: 0 181 | m_NumRayTracingSamples: 4 182 | m_FilterTracedShadow: 1 183 | m_FilterSizeTraced: 16 184 | m_SunLightConeAngle: 0.5 185 | m_LightShadowRadius: 0.5 186 | m_SemiTransparentShadow: 0 187 | m_ColorShadow: 1 188 | m_DistanceBasedFiltering: 0 189 | m_EvsmExponent: 15 190 | m_EvsmLightLeakBias: 0 191 | m_EvsmVarianceBias: 0.00001 192 | m_EvsmBlurPasses: 0 193 | m_LightlayersMask: 3 194 | m_LinkShadowLayers: 1 195 | m_ShadowNearPlane: 0.01 196 | m_BlockerSampleCount: 12 197 | m_FilterSampleCount: 14 198 | m_MinFilterSize: 0.2 199 | m_KernelSize: 5 200 | m_LightAngle: 1 201 | m_MaxDepthBias: 0.001 202 | m_ShadowResolution: 203 | m_Override: 512 204 | m_UseOverride: 0 205 | m_Level: 2 206 | m_ShadowDimmer: 1 207 | m_VolumetricShadowDimmer: 1 208 | m_ShadowFadeDistance: 10000 209 | m_UseContactShadow: 210 | m_Override: 0 211 | m_UseOverride: 1 212 | m_Level: 0 213 | m_RayTracedContactShadow: 0 214 | m_ShadowTint: {r: 0, g: 0, b: 0, a: 1} 215 | m_PenumbraTint: 0 216 | m_NormalBias: 0 217 | m_SlopeBias: 0.345 218 | m_ShadowUpdateMode: 0 219 | m_AlwaysDrawDynamicShadows: 0 220 | m_UpdateShadowOnLightMovement: 0 221 | m_CachedShadowTranslationThreshold: 0.01 222 | m_CachedShadowAngularThreshold: 0.5 223 | m_BarnDoorAngle: 90 224 | m_BarnDoorLength: 0.05 225 | m_preserveCachedShadow: 0 226 | m_OnDemandShadowRenderOnPlacement: 1 227 | m_ShadowCascadeRatios: 228 | - 0.05 229 | - 0.2 230 | - 0.3 231 | m_ShadowCascadeBorders: 232 | - 0.2 233 | - 0.2 234 | - 0.2 235 | - 0.2 236 | m_ShadowAlgorithm: 0 237 | m_ShadowVariant: 0 238 | m_ShadowPrecision: 0 239 | useOldInspector: 0 240 | useVolumetric: 1 241 | featuresFoldout: 1 242 | m_AreaLightEmissiveMeshShadowCastingMode: 0 243 | m_AreaLightEmissiveMeshMotionVectorGenerationMode: 0 244 | m_AreaLightEmissiveMeshLayer: -1 245 | m_Version: 11 246 | m_ObsoleteShadowResolutionTier: 1 247 | m_ObsoleteUseShadowQualitySettings: 0 248 | m_ObsoleteCustomShadowResolution: 512 249 | m_ObsoleteContactShadows: 0 250 | m_PointlightHDType: 1 251 | m_SpotLightShape: 0 252 | m_AreaLightShape: 0 253 | --- !u!1 &9127099390379318233 254 | GameObject: 255 | m_ObjectHideFlags: 0 256 | m_CorrespondingSourceObject: {fileID: 0} 257 | m_PrefabInstance: {fileID: 0} 258 | m_PrefabAsset: {fileID: 0} 259 | serializedVersion: 6 260 | m_Component: 261 | - component: {fileID: 7000581107869638905} 262 | - component: {fileID: 8844423964004370593} 263 | - component: {fileID: 1183314781903107802} 264 | m_Layer: 0 265 | m_Name: Area Light - Mannequin_01 266 | m_TagString: Untagged 267 | m_Icon: {fileID: 0} 268 | m_NavMeshLayer: 0 269 | m_StaticEditorFlags: 0 270 | m_IsActive: 1 271 | --- !u!4 &7000581107869638905 272 | Transform: 273 | m_ObjectHideFlags: 0 274 | m_CorrespondingSourceObject: {fileID: 0} 275 | m_PrefabInstance: {fileID: 0} 276 | m_PrefabAsset: {fileID: 0} 277 | m_GameObject: {fileID: 9127099390379318233} 278 | m_LocalRotation: {x: 0.54234064, y: -0.6971251, z: 0.4681989, w: 0.025944704} 279 | m_LocalPosition: {x: -0.211, y: 0.504, z: 0.311} 280 | m_LocalScale: {x: 1, y: 1, z: 1} 281 | m_ConstrainProportionsScale: 0 282 | m_Children: [] 283 | m_Father: {fileID: 1393302059519374012} 284 | m_RootOrder: -1 285 | m_LocalEulerAnglesHint: {x: 137.084, y: -40.095, z: 87.912} 286 | --- !u!108 &8844423964004370593 287 | Light: 288 | m_ObjectHideFlags: 0 289 | m_CorrespondingSourceObject: {fileID: 0} 290 | m_PrefabInstance: {fileID: 0} 291 | m_PrefabAsset: {fileID: 0} 292 | m_GameObject: {fileID: 9127099390379318233} 293 | m_Enabled: 1 294 | serializedVersion: 10 295 | m_Type: 2 296 | m_Shape: 0 297 | m_Color: {r: 1, g: 1, b: 1, a: 1} 298 | m_Intensity: 254647.9 299 | m_Range: 2 300 | m_SpotAngle: 30 301 | m_InnerSpotAngle: 21.80208 302 | m_CookieSize: 10 303 | m_Shadows: 304 | m_Type: 1 305 | m_Resolution: -1 306 | m_CustomResolution: -1 307 | m_Strength: 1 308 | m_Bias: 0.05 309 | m_NormalBias: 0.4 310 | m_NearPlane: 0.2 311 | m_CullingMatrixOverride: 312 | e00: 1 313 | e01: 0 314 | e02: 0 315 | e03: 0 316 | e10: 0 317 | e11: 1 318 | e12: 0 319 | e13: 0 320 | e20: 0 321 | e21: 0 322 | e22: 1 323 | e23: 0 324 | e30: 0 325 | e31: 0 326 | e32: 0 327 | e33: 1 328 | m_UseCullingMatrixOverride: 0 329 | m_Cookie: {fileID: 0} 330 | m_DrawHalo: 0 331 | m_Flare: {fileID: 0} 332 | m_RenderMode: 0 333 | m_CullingMask: 334 | serializedVersion: 2 335 | m_Bits: 4294967295 336 | m_RenderingLayerMask: 3 337 | m_Lightmapping: 4 338 | m_LightShadowCasterMode: 2 339 | m_AreaSize: {x: 0.5, y: 0.5} 340 | m_BounceIntensity: 1 341 | m_ColorTemperature: 5500 342 | m_UseColorTemperature: 1 343 | m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 2} 344 | m_UseBoundingSphereOverride: 1 345 | m_UseViewFrustumForShadowCasterCull: 1 346 | m_ShadowRadius: 0 347 | m_ShadowAngle: 0 348 | --- !u!114 &1183314781903107802 349 | MonoBehaviour: 350 | m_ObjectHideFlags: 0 351 | m_CorrespondingSourceObject: {fileID: 0} 352 | m_PrefabInstance: {fileID: 0} 353 | m_PrefabAsset: {fileID: 0} 354 | m_GameObject: {fileID: 9127099390379318233} 355 | m_Enabled: 1 356 | m_EditorHideFlags: 0 357 | m_Script: {fileID: 11500000, guid: 7a68c43fe1f2a47cfa234b5eeaa98012, type: 3} 358 | m_Name: 359 | m_EditorClassIdentifier: 360 | m_Intensity: 200000 361 | m_EnableSpotReflector: 1 362 | m_LuxAtDistance: 1 363 | m_InnerSpotPercent: 0 364 | m_SpotIESCutoffPercent: 100 365 | m_LightDimmer: 1 366 | m_VolumetricDimmer: 1 367 | m_LightUnit: 0 368 | m_FadeDistance: 10000 369 | m_VolumetricFadeDistance: 10000 370 | m_AffectDiffuse: 1 371 | m_AffectSpecular: 1 372 | m_NonLightmappedOnly: 0 373 | m_ShapeWidth: 0.5 374 | m_ShapeHeight: 0.5 375 | m_AspectRatio: 1 376 | m_ShapeRadius: 0.025 377 | m_SoftnessScale: 1 378 | m_UseCustomSpotLightShadowCone: 0 379 | m_CustomSpotLightShadowCone: 30 380 | m_MaxSmoothness: 0.99 381 | m_ApplyRangeAttenuation: 1 382 | m_DisplayAreaLightEmissiveMesh: 0 383 | m_AreaLightCookie: {fileID: 0} 384 | m_IESPoint: {fileID: 0} 385 | m_IESSpot: {fileID: 0} 386 | m_IncludeForRayTracing: 1 387 | m_AreaLightShadowCone: 10 388 | m_UseScreenSpaceShadows: 0 389 | m_InteractsWithSky: 1 390 | m_AngularDiameter: 0.5 391 | m_FlareSize: 2 392 | m_FlareTint: {r: 1, g: 1, b: 1, a: 1} 393 | m_FlareFalloff: 4 394 | m_SurfaceTexture: {fileID: 0} 395 | m_SurfaceTint: {r: 1, g: 1, b: 1, a: 1} 396 | m_Distance: 1.5e+11 397 | m_UseRayTracedShadows: 0 398 | m_NumRayTracingSamples: 4 399 | m_FilterTracedShadow: 1 400 | m_FilterSizeTraced: 16 401 | m_SunLightConeAngle: 0.5 402 | m_LightShadowRadius: 0.5 403 | m_SemiTransparentShadow: 0 404 | m_ColorShadow: 1 405 | m_DistanceBasedFiltering: 0 406 | m_EvsmExponent: 15 407 | m_EvsmLightLeakBias: 0 408 | m_EvsmVarianceBias: 0.00001 409 | m_EvsmBlurPasses: 0 410 | m_LightlayersMask: 3 411 | m_LinkShadowLayers: 1 412 | m_ShadowNearPlane: 0 413 | m_BlockerSampleCount: 11 414 | m_FilterSampleCount: 12 415 | m_MinFilterSize: 0.1 416 | m_KernelSize: 5 417 | m_LightAngle: 1 418 | m_MaxDepthBias: 0.001 419 | m_ShadowResolution: 420 | m_Override: 512 421 | m_UseOverride: 0 422 | m_Level: 2 423 | m_ShadowDimmer: 1 424 | m_VolumetricShadowDimmer: 1 425 | m_ShadowFadeDistance: 10000 426 | m_UseContactShadow: 427 | m_Override: 0 428 | m_UseOverride: 1 429 | m_Level: 0 430 | m_RayTracedContactShadow: 0 431 | m_ShadowTint: {r: 0, g: 0, b: 0, a: 1} 432 | m_PenumbraTint: 0 433 | m_NormalBias: 0 434 | m_SlopeBias: 0.389 435 | m_ShadowUpdateMode: 0 436 | m_AlwaysDrawDynamicShadows: 0 437 | m_UpdateShadowOnLightMovement: 0 438 | m_CachedShadowTranslationThreshold: 0.01 439 | m_CachedShadowAngularThreshold: 0.5 440 | m_BarnDoorAngle: 90 441 | m_BarnDoorLength: 0.05 442 | m_preserveCachedShadow: 0 443 | m_OnDemandShadowRenderOnPlacement: 1 444 | m_ShadowCascadeRatios: 445 | - 0.05 446 | - 0.2 447 | - 0.3 448 | m_ShadowCascadeBorders: 449 | - 0.2 450 | - 0.2 451 | - 0.2 452 | - 0.2 453 | m_ShadowAlgorithm: 0 454 | m_ShadowVariant: 0 455 | m_ShadowPrecision: 0 456 | useOldInspector: 0 457 | useVolumetric: 1 458 | featuresFoldout: 1 459 | m_AreaLightEmissiveMeshShadowCastingMode: 0 460 | m_AreaLightEmissiveMeshMotionVectorGenerationMode: 0 461 | m_AreaLightEmissiveMeshLayer: -1 462 | m_Version: 11 463 | m_ObsoleteShadowResolutionTier: 1 464 | m_ObsoleteUseShadowQualitySettings: 0 465 | m_ObsoleteCustomShadowResolution: 512 466 | m_ObsoleteContactShadows: 0 467 | m_PointlightHDType: 1 468 | m_SpotLightShape: 0 469 | m_AreaLightShape: 0 470 | -------------------------------------------------------------------------------- /Samples~/MeshToSDF-sample/SceneAssets/SkinnedMesh/Mannequin_01_Lights.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7bb143ba97b49a74cb285c23ab4b8cec 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Samples~/MeshToSDF-sample/SceneAssets/SkinnedMesh/ReflectionProbe-0.exr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/com.unity.demoteam.mesh-to-sdf/1f8ee658aabe2b588aae7d0b635a9941266a52ef/Samples~/MeshToSDF-sample/SceneAssets/SkinnedMesh/ReflectionProbe-0.exr -------------------------------------------------------------------------------- /Samples~/MeshToSDF-sample/SceneAssets/SkinnedMesh/ReflectionProbe-0.exr.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3cb3f62bccb087645ba127fdc4c418db 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 11 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 0 10 | sRGBTexture: 0 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | flipGreenChannel: 0 24 | isReadable: 0 25 | streamingMipmaps: 0 26 | streamingMipmapsPriority: 0 27 | vTOnly: 0 28 | ignoreMipmapLimit: 0 29 | grayScaleToAlpha: 0 30 | generateCubemap: 6 31 | cubemapConvolution: 0 32 | seamlessCubemap: 0 33 | textureFormat: 1 34 | maxTextureSize: 2048 35 | textureSettings: 36 | serializedVersion: 2 37 | filterMode: 1 38 | aniso: 1 39 | mipBias: 0 40 | wrapU: 0 41 | wrapV: 0 42 | wrapW: 0 43 | nPOTScale: 1 44 | lightmap: 0 45 | compressionQuality: 50 46 | spriteMode: 0 47 | spriteExtrude: 1 48 | spriteMeshType: 1 49 | alignment: 0 50 | spritePivot: {x: 0.5, y: 0.5} 51 | spritePixelsToUnits: 100 52 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 53 | spriteGenerateFallbackPhysicsShape: 1 54 | alphaUsage: 1 55 | alphaIsTransparency: 0 56 | spriteTessellationDetail: -1 57 | textureType: 0 58 | textureShape: 2 59 | singleChannelComponent: 0 60 | flipbookRows: 1 61 | flipbookColumns: 1 62 | maxTextureSizeSet: 0 63 | compressionQualitySet: 0 64 | textureFormatSet: 0 65 | ignorePngGamma: 0 66 | applyGammaDecoding: 0 67 | swizzle: 50462976 68 | platformSettings: 69 | - serializedVersion: 3 70 | buildTarget: DefaultTexturePlatform 71 | maxTextureSize: 2048 72 | resizeAlgorithm: 0 73 | textureFormat: -1 74 | textureCompression: 1 75 | compressionQuality: 50 76 | crunchedCompression: 0 77 | allowsAlphaSplitting: 0 78 | overridden: 0 79 | androidETC2FallbackOverride: 0 80 | forceMaximumCompressionQuality_BC6H_BC7: 0 81 | spriteSheet: 82 | serializedVersion: 2 83 | sprites: [] 84 | outline: [] 85 | physicsShape: [] 86 | bones: [] 87 | spriteID: 88 | internalID: 0 89 | vertices: [] 90 | indices: 91 | edges: [] 92 | weights: [] 93 | secondaryTextures: [] 94 | nameFileIdTable: {} 95 | mipmapLimitGroupName: 96 | pSDRemoveMatte: 0 97 | userData: 98 | assetBundleName: 99 | assetBundleVariant: 100 | -------------------------------------------------------------------------------- /Samples~/MeshToSDF-sample/SceneAssets/SkinnedMesh/Timeline.playable: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &-8984690489234356264 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 1 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: d21dcc2386d650c4597f3633c75a1f98, type: 3} 13 | m_Name: Animation Track 14 | m_EditorClassIdentifier: 15 | m_Version: 3 16 | m_AnimClip: {fileID: 0} 17 | m_Locked: 0 18 | m_Muted: 0 19 | m_CustomPlayableFullTypename: 20 | m_Curves: {fileID: 0} 21 | m_Parent: {fileID: 11400000} 22 | m_Children: [] 23 | m_Clips: 24 | - m_Version: 1 25 | m_Start: 0 26 | m_ClipIn: 0 27 | m_Asset: {fileID: -8625171609985693501} 28 | m_Duration: 45.708333333333336 29 | m_TimeScale: 2 30 | m_ParentTrack: {fileID: -8984690489234356264} 31 | m_EaseInDuration: 0 32 | m_EaseOutDuration: 0 33 | m_BlendInDuration: -1 34 | m_BlendOutDuration: -1 35 | m_MixInCurve: 36 | serializedVersion: 2 37 | m_Curve: 38 | - serializedVersion: 3 39 | time: 0 40 | value: 0 41 | inSlope: 0 42 | outSlope: 0 43 | tangentMode: 0 44 | weightedMode: 0 45 | inWeight: 0 46 | outWeight: 0 47 | - serializedVersion: 3 48 | time: 1 49 | value: 1 50 | inSlope: 0 51 | outSlope: 0 52 | tangentMode: 0 53 | weightedMode: 0 54 | inWeight: 0 55 | outWeight: 0 56 | m_PreInfinity: 2 57 | m_PostInfinity: 2 58 | m_RotationOrder: 4 59 | m_MixOutCurve: 60 | serializedVersion: 2 61 | m_Curve: 62 | - serializedVersion: 3 63 | time: 0 64 | value: 1 65 | inSlope: 0 66 | outSlope: 0 67 | tangentMode: 0 68 | weightedMode: 0 69 | inWeight: 0 70 | outWeight: 0 71 | - serializedVersion: 3 72 | time: 1 73 | value: 0 74 | inSlope: 0 75 | outSlope: 0 76 | tangentMode: 0 77 | weightedMode: 0 78 | inWeight: 0 79 | outWeight: 0 80 | m_PreInfinity: 2 81 | m_PostInfinity: 2 82 | m_RotationOrder: 4 83 | m_BlendInCurveMode: 0 84 | m_BlendOutCurveMode: 0 85 | m_ExposedParameterNames: [] 86 | m_AnimationCurves: {fileID: 0} 87 | m_Recordable: 0 88 | m_PostExtrapolationMode: 1 89 | m_PreExtrapolationMode: 1 90 | m_PostExtrapolationTime: Infinity 91 | m_PreExtrapolationTime: 0 92 | m_DisplayName: Take 001 93 | m_Markers: 94 | m_Objects: [] 95 | m_InfiniteClipPreExtrapolation: 0 96 | m_InfiniteClipPostExtrapolation: 0 97 | m_InfiniteClipOffsetPosition: {x: 0, y: 0, z: 0} 98 | m_InfiniteClipOffsetEulerAngles: {x: 0, y: 0, z: 0} 99 | m_InfiniteClipTimeOffset: 0 100 | m_InfiniteClipRemoveOffset: 0 101 | m_InfiniteClipApplyFootIK: 1 102 | mInfiniteClipLoop: 0 103 | m_MatchTargetFields: 63 104 | m_Position: {x: 0, y: 0, z: 0} 105 | m_EulerAngles: {x: 0, y: 0, z: 0} 106 | m_AvatarMask: {fileID: 0} 107 | m_ApplyAvatarMask: 1 108 | m_TrackOffset: 0 109 | m_InfiniteClip: {fileID: 0} 110 | m_OpenClipOffsetRotation: {x: 0, y: 0, z: 0, w: 1} 111 | m_Rotation: {x: 0, y: 0, z: 0, w: 1} 112 | m_ApplyOffsets: 0 113 | --- !u!114 &-8625171609985693501 114 | MonoBehaviour: 115 | m_ObjectHideFlags: 1 116 | m_CorrespondingSourceObject: {fileID: 0} 117 | m_PrefabInstance: {fileID: 0} 118 | m_PrefabAsset: {fileID: 0} 119 | m_GameObject: {fileID: 0} 120 | m_Enabled: 1 121 | m_EditorHideFlags: 0 122 | m_Script: {fileID: 11500000, guid: 030f85c3f73729f4f976f66ffb23b875, type: 3} 123 | m_Name: AnimationPlayableAsset 124 | m_EditorClassIdentifier: 125 | m_Clip: {fileID: 1827226128182048838, guid: 42e6a3e75c593b441a96b61c9cd97395, type: 3} 126 | m_Position: {x: 0, y: 0, z: 0} 127 | m_EulerAngles: {x: 0, y: 0, z: 0} 128 | m_UseTrackMatchFields: 1 129 | m_MatchTargetFields: 63 130 | m_RemoveStartOffset: 1 131 | m_ApplyFootIK: 1 132 | m_Loop: 0 133 | m_Version: 1 134 | m_Rotation: {x: 0, y: 0, z: 0, w: 1} 135 | --- !u!114 &11400000 136 | MonoBehaviour: 137 | m_ObjectHideFlags: 0 138 | m_CorrespondingSourceObject: {fileID: 0} 139 | m_PrefabInstance: {fileID: 0} 140 | m_PrefabAsset: {fileID: 0} 141 | m_GameObject: {fileID: 0} 142 | m_Enabled: 1 143 | m_EditorHideFlags: 0 144 | m_Script: {fileID: 11500000, guid: bfda56da833e2384a9677cd3c976a436, type: 3} 145 | m_Name: Timeline 146 | m_EditorClassIdentifier: 147 | m_Version: 0 148 | m_Tracks: 149 | - {fileID: -8984690489234356264} 150 | m_FixedDuration: 0 151 | m_EditorSettings: 152 | m_Framerate: 60 153 | m_ScenePreview: 1 154 | m_DurationMode: 0 155 | m_MarkerTrack: {fileID: 0} 156 | -------------------------------------------------------------------------------- /Samples~/MeshToSDF-sample/SceneAssets/SkinnedMesh/Timeline.playable.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d3b6ce58e60a08542ba4de10e274d0a1 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Samples~/MeshToSDF-sample/SceneAssets/SkinnedMesh/mannequin.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &-5885661498822542063 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 11 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: da692e001514ec24dbc4cca1949ff7e8, type: 3} 13 | m_Name: 14 | m_EditorClassIdentifier: 15 | version: 13 16 | hdPluginSubTargetMaterialVersions: 17 | m_Keys: [] 18 | m_Values: 19 | --- !u!21 &2100000 20 | Material: 21 | serializedVersion: 8 22 | m_ObjectHideFlags: 0 23 | m_CorrespondingSourceObject: {fileID: 0} 24 | m_PrefabInstance: {fileID: 0} 25 | m_PrefabAsset: {fileID: 0} 26 | m_Name: mannequin 27 | m_Shader: {fileID: 4800000, guid: 6e4ae4064600d784cac1e41a9e6f2e59, type: 3} 28 | m_Parent: {fileID: 0} 29 | m_ModifiedSerializedProperties: 0 30 | m_ValidKeywords: 31 | - _DISABLE_SSR_TRANSPARENT 32 | - _DOUBLESIDED_ON 33 | - _NORMALMAP_TANGENT_SPACE 34 | m_InvalidKeywords: [] 35 | m_LightmapFlags: 4 36 | m_EnableInstancingVariants: 0 37 | m_DoubleSidedGI: 1 38 | m_CustomRenderQueue: 2225 39 | stringTagMap: {} 40 | disabledShaderPasses: 41 | - TransparentDepthPrepass 42 | - TransparentDepthPostpass 43 | - TransparentBackface 44 | - RayTracingPrepass 45 | - MOTIONVECTORS 46 | m_LockedProperties: 47 | m_SavedProperties: 48 | serializedVersion: 3 49 | m_TexEnvs: 50 | - _AnisotropyMap: 51 | m_Texture: {fileID: 0} 52 | m_Scale: {x: 1, y: 1} 53 | m_Offset: {x: 0, y: 0} 54 | - _BaseColorMap: 55 | m_Texture: {fileID: 0} 56 | m_Scale: {x: 1, y: 1} 57 | m_Offset: {x: 0, y: 0} 58 | - _BentNormalMap: 59 | m_Texture: {fileID: 0} 60 | m_Scale: {x: 1, y: 1} 61 | m_Offset: {x: 0, y: 0} 62 | - _BentNormalMapOS: 63 | m_Texture: {fileID: 0} 64 | m_Scale: {x: 1, y: 1} 65 | m_Offset: {x: 0, y: 0} 66 | - _CoatMaskMap: 67 | m_Texture: {fileID: 0} 68 | m_Scale: {x: 1, y: 1} 69 | m_Offset: {x: 0, y: 0} 70 | - _DetailMap: 71 | m_Texture: {fileID: 0} 72 | m_Scale: {x: 1, y: 1} 73 | m_Offset: {x: 0, y: 0} 74 | - _EmissiveColorMap: 75 | m_Texture: {fileID: 0} 76 | m_Scale: {x: 1, y: 1} 77 | m_Offset: {x: 0, y: 0} 78 | - _HeightMap: 79 | m_Texture: {fileID: 0} 80 | m_Scale: {x: 1, y: 1} 81 | m_Offset: {x: 0, y: 0} 82 | - _IridescenceMaskMap: 83 | m_Texture: {fileID: 0} 84 | m_Scale: {x: 1, y: 1} 85 | m_Offset: {x: 0, y: 0} 86 | - _IridescenceThicknessMap: 87 | m_Texture: {fileID: 0} 88 | m_Scale: {x: 1, y: 1} 89 | m_Offset: {x: 0, y: 0} 90 | - _MainTex: 91 | m_Texture: {fileID: 0} 92 | m_Scale: {x: 1, y: 1} 93 | m_Offset: {x: 0, y: 0} 94 | - _MaskMap: 95 | m_Texture: {fileID: 0} 96 | m_Scale: {x: 1, y: 1} 97 | m_Offset: {x: 0, y: 0} 98 | - _NormalMap: 99 | m_Texture: {fileID: 0} 100 | m_Scale: {x: 1, y: 1} 101 | m_Offset: {x: 0, y: 0} 102 | - _NormalMapOS: 103 | m_Texture: {fileID: 0} 104 | m_Scale: {x: 1, y: 1} 105 | m_Offset: {x: 0, y: 0} 106 | - _SpecularColorMap: 107 | m_Texture: {fileID: 0} 108 | m_Scale: {x: 1, y: 1} 109 | m_Offset: {x: 0, y: 0} 110 | - _SubsurfaceMaskMap: 111 | m_Texture: {fileID: 0} 112 | m_Scale: {x: 1, y: 1} 113 | m_Offset: {x: 0, y: 0} 114 | - _TangentMap: 115 | m_Texture: {fileID: 0} 116 | m_Scale: {x: 1, y: 1} 117 | m_Offset: {x: 0, y: 0} 118 | - _TangentMapOS: 119 | m_Texture: {fileID: 0} 120 | m_Scale: {x: 1, y: 1} 121 | m_Offset: {x: 0, y: 0} 122 | - _ThicknessMap: 123 | m_Texture: {fileID: 0} 124 | m_Scale: {x: 1, y: 1} 125 | m_Offset: {x: 0, y: 0} 126 | - _TransmissionMaskMap: 127 | m_Texture: {fileID: 0} 128 | m_Scale: {x: 1, y: 1} 129 | m_Offset: {x: 0, y: 0} 130 | - _TransmittanceColorMap: 131 | m_Texture: {fileID: 0} 132 | m_Scale: {x: 1, y: 1} 133 | m_Offset: {x: 0, y: 0} 134 | - unity_Lightmaps: 135 | m_Texture: {fileID: 0} 136 | m_Scale: {x: 1, y: 1} 137 | m_Offset: {x: 0, y: 0} 138 | - unity_LightmapsInd: 139 | m_Texture: {fileID: 0} 140 | m_Scale: {x: 1, y: 1} 141 | m_Offset: {x: 0, y: 0} 142 | - unity_ShadowMasks: 143 | m_Texture: {fileID: 0} 144 | m_Scale: {x: 1, y: 1} 145 | m_Offset: {x: 0, y: 0} 146 | m_Ints: [] 147 | m_Floats: 148 | - _AORemapMax: 1 149 | - _AORemapMin: 0 150 | - _ATDistance: 1 151 | - _AddPrecomputedVelocity: 0 152 | - _AlbedoAffectEmissive: 0 153 | - _AlphaCutoff: 0.5 154 | - _AlphaCutoffEnable: 0 155 | - _AlphaCutoffPostpass: 0.5 156 | - _AlphaCutoffPrepass: 0.5 157 | - _AlphaCutoffShadow: 0.5 158 | - _AlphaDstBlend: 0 159 | - _AlphaRemapMax: 1 160 | - _AlphaRemapMin: 0 161 | - _AlphaSrcBlend: 1 162 | - _Anisotropy: 0 163 | - _BlendMode: 0 164 | - _CoatMask: 0 165 | - _CullMode: 0 166 | - _CullModeForward: 0 167 | - _Cutoff: 0.5 168 | - _DepthOffsetEnable: 0 169 | - _DetailAlbedoScale: 1 170 | - _DetailNormalScale: 1 171 | - _DetailSmoothnessScale: 1 172 | - _DiffusionProfile: 0 173 | - _DiffusionProfileHash: 0 174 | - _DisplacementLockObjectScale: 1 175 | - _DisplacementLockTilingScale: 1 176 | - _DisplacementMode: 0 177 | - _DoubleSidedEnable: 1 178 | - _DoubleSidedGIMode: 0 179 | - _DoubleSidedNormalMode: 1 180 | - _DstBlend: 0 181 | - _EmissiveColorMode: 1 182 | - _EmissiveExposureWeight: 1 183 | - _EmissiveIntensity: 1 184 | - _EmissiveIntensityUnit: 0 185 | - _EnableBlendModePreserveSpecularLighting: 1 186 | - _EnableFogOnTransparent: 1 187 | - _EnableGeometricSpecularAA: 0 188 | - _EnergyConservingSpecularColor: 1 189 | - _HeightAmplitude: 0.02 190 | - _HeightCenter: 0.5 191 | - _HeightMapParametrization: 0 192 | - _HeightMax: 1 193 | - _HeightMin: -1 194 | - _HeightOffset: 0 195 | - _HeightPoMAmplitude: 2 196 | - _HeightTessAmplitude: 2 197 | - _HeightTessCenter: 0.5 198 | - _InvTilingScale: 1 199 | - _Ior: 1.5 200 | - _IridescenceMask: 1 201 | - _IridescenceThickness: 1 202 | - _LinkDetailsWithBase: 1 203 | - _MaterialID: 1 204 | - _Metallic: 0 205 | - _MetallicRemapMax: 1 206 | - _MetallicRemapMin: 0 207 | - _NormalMapSpace: 0 208 | - _NormalScale: 1 209 | - _ObjectSpaceUVMapping: 0 210 | - _ObjectSpaceUVMappingEmissive: 0 211 | - _OpaqueCullMode: 2 212 | - _PPDLodThreshold: 5 213 | - _PPDMaxSamples: 15 214 | - _PPDMinSamples: 5 215 | - _PPDPrimitiveLength: 1 216 | - _PPDPrimitiveWidth: 1 217 | - _RayTracing: 0 218 | - _ReceivesSSR: 1 219 | - _ReceivesSSRTransparent: 0 220 | - _RefractionModel: 0 221 | - _Smoothness: 0.5 222 | - _SmoothnessRemapMax: 1 223 | - _SmoothnessRemapMin: 0 224 | - _SpecularAAScreenSpaceVariance: 0.1 225 | - _SpecularAAThreshold: 0.2 226 | - _SpecularOcclusionMode: 1 227 | - _SrcBlend: 1 228 | - _StencilRef: 0 229 | - _StencilRefDepth: 8 230 | - _StencilRefGBuffer: 10 231 | - _StencilRefMV: 40 232 | - _StencilWriteMask: 6 233 | - _StencilWriteMaskDepth: 9 234 | - _StencilWriteMaskGBuffer: 15 235 | - _StencilWriteMaskMV: 41 236 | - _SubsurfaceMask: 1 237 | - _SupportDecals: 1 238 | - _SurfaceType: 0 239 | - _TexWorldScale: 1 240 | - _TexWorldScaleEmissive: 1 241 | - _Thickness: 1 242 | - _TransmissionEnable: 1 243 | - _TransmissionMask: 1 244 | - _TransparentBackfaceEnable: 0 245 | - _TransparentCullMode: 2 246 | - _TransparentDepthPostpassEnable: 0 247 | - _TransparentDepthPrepassEnable: 0 248 | - _TransparentSortPriority: 0 249 | - _TransparentWritingMotionVec: 0 250 | - _TransparentZWrite: 0 251 | - _UVBase: 0 252 | - _UVDetail: 0 253 | - _UVEmissive: 0 254 | - _UseEmissiveIntensity: 0 255 | - _UseShadowThreshold: 0 256 | - _ZTestDepthEqualForOpaque: 3 257 | - _ZTestGBuffer: 4 258 | - _ZTestTransparent: 4 259 | - _ZWrite: 1 260 | m_Colors: 261 | - _BaseColor: {r: 0.5283019, g: 0.5283019, b: 0.5283019, a: 1} 262 | - _BaseColorMap_MipInfo: {r: 0, g: 0, b: 0, a: 0} 263 | - _Color: {r: 0.5283019, g: 0.5283019, b: 0.5283019, a: 1} 264 | - _DiffusionProfileAsset: {r: 0, g: 0, b: 0, a: 0} 265 | - _DoubleSidedConstants: {r: 1, g: 1, b: -1, a: 0} 266 | - _EmissionColor: {r: 1, g: 1, b: 1, a: 1} 267 | - _EmissiveColor: {r: 0, g: 0, b: 0, a: 1} 268 | - _EmissiveColorLDR: {r: 0, g: 0, b: 0, a: 1} 269 | - _InvPrimScale: {r: 1, g: 1, b: 0, a: 0} 270 | - _IridescenceThicknessRemap: {r: 0, g: 1, b: 0, a: 0} 271 | - _SpecularColor: {r: 1, g: 1, b: 1, a: 1} 272 | - _ThicknessRemap: {r: 0, g: 1, b: 0, a: 0} 273 | - _TransmittanceColor: {r: 1, g: 1, b: 1, a: 1} 274 | - _UVDetailsMappingMask: {r: 1, g: 0, b: 0, a: 0} 275 | - _UVMappingMask: {r: 1, g: 0, b: 0, a: 0} 276 | - _UVMappingMaskEmissive: {r: 1, g: 0, b: 0, a: 0} 277 | m_BuildTextureStacks: [] 278 | -------------------------------------------------------------------------------- /Samples~/MeshToSDF-sample/SceneAssets/SkinnedMesh/mannequin.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f541f85185aa94f42b26602a40a5cbd1 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Samples~/MeshToSDF-sample/SceneAssets/SkinnedMesh/plane.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &-2946108546149936067 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 11 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: da692e001514ec24dbc4cca1949ff7e8, type: 3} 13 | m_Name: 14 | m_EditorClassIdentifier: 15 | version: 12 16 | hdPluginSubTargetMaterialVersions: 17 | m_Keys: [] 18 | m_Values: 19 | --- !u!21 &2100000 20 | Material: 21 | serializedVersion: 8 22 | m_ObjectHideFlags: 0 23 | m_CorrespondingSourceObject: {fileID: 0} 24 | m_PrefabInstance: {fileID: 0} 25 | m_PrefabAsset: {fileID: 0} 26 | m_Name: plane 27 | m_Shader: {fileID: 4800000, guid: 6e4ae4064600d784cac1e41a9e6f2e59, type: 3} 28 | m_Parent: {fileID: 0} 29 | m_ModifiedSerializedProperties: 0 30 | m_ValidKeywords: 31 | - _DISABLE_SSR_TRANSPARENT 32 | - _ENABLE_FOG_ON_TRANSPARENT 33 | - _NORMALMAP_TANGENT_SPACE 34 | - _SURFACE_TYPE_TRANSPARENT 35 | m_InvalidKeywords: [] 36 | m_LightmapFlags: 4 37 | m_EnableInstancingVariants: 0 38 | m_DoubleSidedGI: 0 39 | m_CustomRenderQueue: 3000 40 | stringTagMap: 41 | RenderType: Transparent 42 | disabledShaderPasses: 43 | - TransparentDepthPrepass 44 | - TransparentDepthPostpass 45 | - TransparentBackface 46 | - RayTracingPrepass 47 | - MOTIONVECTORS 48 | m_LockedProperties: 49 | m_SavedProperties: 50 | serializedVersion: 3 51 | m_TexEnvs: 52 | - _AnisotropyMap: 53 | m_Texture: {fileID: 0} 54 | m_Scale: {x: 1, y: 1} 55 | m_Offset: {x: 0, y: 0} 56 | - _BaseColorMap: 57 | m_Texture: {fileID: 0} 58 | m_Scale: {x: 1, y: 1} 59 | m_Offset: {x: 0, y: 0} 60 | - _BentNormalMap: 61 | m_Texture: {fileID: 0} 62 | m_Scale: {x: 1, y: 1} 63 | m_Offset: {x: 0, y: 0} 64 | - _BentNormalMapOS: 65 | m_Texture: {fileID: 0} 66 | m_Scale: {x: 1, y: 1} 67 | m_Offset: {x: 0, y: 0} 68 | - _CoatMaskMap: 69 | m_Texture: {fileID: 0} 70 | m_Scale: {x: 1, y: 1} 71 | m_Offset: {x: 0, y: 0} 72 | - _DetailMap: 73 | m_Texture: {fileID: 0} 74 | m_Scale: {x: 1, y: 1} 75 | m_Offset: {x: 0, y: 0} 76 | - _EmissiveColorMap: 77 | m_Texture: {fileID: 0} 78 | m_Scale: {x: 1, y: 1} 79 | m_Offset: {x: 0, y: 0} 80 | - _HeightMap: 81 | m_Texture: {fileID: 0} 82 | m_Scale: {x: 1, y: 1} 83 | m_Offset: {x: 0, y: 0} 84 | - _IridescenceMaskMap: 85 | m_Texture: {fileID: 0} 86 | m_Scale: {x: 1, y: 1} 87 | m_Offset: {x: 0, y: 0} 88 | - _IridescenceThicknessMap: 89 | m_Texture: {fileID: 0} 90 | m_Scale: {x: 1, y: 1} 91 | m_Offset: {x: 0, y: 0} 92 | - _MainTex: 93 | m_Texture: {fileID: 0} 94 | m_Scale: {x: 1, y: 1} 95 | m_Offset: {x: 0, y: 0} 96 | - _MaskMap: 97 | m_Texture: {fileID: 0} 98 | m_Scale: {x: 1, y: 1} 99 | m_Offset: {x: 0, y: 0} 100 | - _NormalMap: 101 | m_Texture: {fileID: 0} 102 | m_Scale: {x: 1, y: 1} 103 | m_Offset: {x: 0, y: 0} 104 | - _NormalMapOS: 105 | m_Texture: {fileID: 0} 106 | m_Scale: {x: 1, y: 1} 107 | m_Offset: {x: 0, y: 0} 108 | - _SpecularColorMap: 109 | m_Texture: {fileID: 0} 110 | m_Scale: {x: 1, y: 1} 111 | m_Offset: {x: 0, y: 0} 112 | - _SubsurfaceMaskMap: 113 | m_Texture: {fileID: 0} 114 | m_Scale: {x: 1, y: 1} 115 | m_Offset: {x: 0, y: 0} 116 | - _TangentMap: 117 | m_Texture: {fileID: 0} 118 | m_Scale: {x: 1, y: 1} 119 | m_Offset: {x: 0, y: 0} 120 | - _TangentMapOS: 121 | m_Texture: {fileID: 0} 122 | m_Scale: {x: 1, y: 1} 123 | m_Offset: {x: 0, y: 0} 124 | - _ThicknessMap: 125 | m_Texture: {fileID: 0} 126 | m_Scale: {x: 1, y: 1} 127 | m_Offset: {x: 0, y: 0} 128 | - _TransmissionMaskMap: 129 | m_Texture: {fileID: 0} 130 | m_Scale: {x: 1, y: 1} 131 | m_Offset: {x: 0, y: 0} 132 | - _TransmittanceColorMap: 133 | m_Texture: {fileID: 0} 134 | m_Scale: {x: 1, y: 1} 135 | m_Offset: {x: 0, y: 0} 136 | - unity_Lightmaps: 137 | m_Texture: {fileID: 0} 138 | m_Scale: {x: 1, y: 1} 139 | m_Offset: {x: 0, y: 0} 140 | - unity_LightmapsInd: 141 | m_Texture: {fileID: 0} 142 | m_Scale: {x: 1, y: 1} 143 | m_Offset: {x: 0, y: 0} 144 | - unity_ShadowMasks: 145 | m_Texture: {fileID: 0} 146 | m_Scale: {x: 1, y: 1} 147 | m_Offset: {x: 0, y: 0} 148 | m_Ints: [] 149 | m_Floats: 150 | - _AORemapMax: 1 151 | - _AORemapMin: 0 152 | - _ATDistance: 1 153 | - _AddPrecomputedVelocity: 0 154 | - _AlbedoAffectEmissive: 0 155 | - _AlphaCutoff: 0.5 156 | - _AlphaCutoffEnable: 0 157 | - _AlphaCutoffPostpass: 0.5 158 | - _AlphaCutoffPrepass: 0.5 159 | - _AlphaCutoffShadow: 0.5 160 | - _AlphaDstBlend: 10 161 | - _AlphaRemapMax: 1 162 | - _AlphaRemapMin: 0 163 | - _AlphaSrcBlend: 1 164 | - _Anisotropy: 0 165 | - _BlendMode: 0 166 | - _CoatMask: 0 167 | - _CullMode: 2 168 | - _CullModeForward: 2 169 | - _Cutoff: 0.5 170 | - _DepthOffsetEnable: 0 171 | - _DetailAlbedoScale: 1 172 | - _DetailNormalScale: 1 173 | - _DetailSmoothnessScale: 1 174 | - _DiffusionProfile: 0 175 | - _DiffusionProfileHash: 0 176 | - _DisplacementLockObjectScale: 1 177 | - _DisplacementLockTilingScale: 1 178 | - _DisplacementMode: 0 179 | - _DoubleSidedEnable: 0 180 | - _DoubleSidedGIMode: 0 181 | - _DoubleSidedNormalMode: 1 182 | - _DstBlend: 10 183 | - _EmissiveColorMode: 1 184 | - _EmissiveExposureWeight: 1 185 | - _EmissiveIntensity: 1 186 | - _EmissiveIntensityUnit: 0 187 | - _EnableBlendModePreserveSpecularLighting: 1 188 | - _EnableFogOnTransparent: 1 189 | - _EnableGeometricSpecularAA: 0 190 | - _EnergyConservingSpecularColor: 1 191 | - _HeightAmplitude: 0.02 192 | - _HeightCenter: 0.5 193 | - _HeightMapParametrization: 0 194 | - _HeightMax: 1 195 | - _HeightMin: -1 196 | - _HeightOffset: 0 197 | - _HeightPoMAmplitude: 2 198 | - _HeightTessAmplitude: 2 199 | - _HeightTessCenter: 0.5 200 | - _InvTilingScale: 1 201 | - _Ior: 1.5 202 | - _IridescenceMask: 1 203 | - _IridescenceThickness: 1 204 | - _LinkDetailsWithBase: 1 205 | - _MaterialID: 1 206 | - _Metallic: 0 207 | - _MetallicRemapMax: 1 208 | - _MetallicRemapMin: 0 209 | - _NormalMapSpace: 0 210 | - _NormalScale: 1 211 | - _ObjectSpaceUVMapping: 0 212 | - _ObjectSpaceUVMappingEmissive: 0 213 | - _OpaqueCullMode: 2 214 | - _PPDLodThreshold: 5 215 | - _PPDMaxSamples: 15 216 | - _PPDMinSamples: 5 217 | - _PPDPrimitiveLength: 1 218 | - _PPDPrimitiveWidth: 1 219 | - _RayTracing: 0 220 | - _ReceivesSSR: 1 221 | - _ReceivesSSRTransparent: 0 222 | - _RefractionModel: 0 223 | - _Smoothness: 0 224 | - _SmoothnessRemapMax: 1 225 | - _SmoothnessRemapMin: 0 226 | - _SpecularAAScreenSpaceVariance: 0.1 227 | - _SpecularAAThreshold: 0.2 228 | - _SpecularOcclusionMode: 1 229 | - _SrcBlend: 1 230 | - _StencilRef: 0 231 | - _StencilRefDepth: 0 232 | - _StencilRefGBuffer: 2 233 | - _StencilRefMV: 32 234 | - _StencilWriteMask: 6 235 | - _StencilWriteMaskDepth: 8 236 | - _StencilWriteMaskGBuffer: 14 237 | - _StencilWriteMaskMV: 40 238 | - _SubsurfaceMask: 1 239 | - _SupportDecals: 1 240 | - _SurfaceType: 1 241 | - _TexWorldScale: 1 242 | - _TexWorldScaleEmissive: 1 243 | - _Thickness: 1 244 | - _TransmissionEnable: 1 245 | - _TransmissionMask: 1 246 | - _TransparentBackfaceEnable: 0 247 | - _TransparentCullMode: 2 248 | - _TransparentDepthPostpassEnable: 0 249 | - _TransparentDepthPrepassEnable: 0 250 | - _TransparentSortPriority: 0 251 | - _TransparentWritingMotionVec: 0 252 | - _TransparentZWrite: 0 253 | - _UVBase: 0 254 | - _UVDetail: 0 255 | - _UVEmissive: 0 256 | - _UseEmissiveIntensity: 0 257 | - _UseShadowThreshold: 0 258 | - _ZTestDepthEqualForOpaque: 4 259 | - _ZTestGBuffer: 4 260 | - _ZTestTransparent: 4 261 | - _ZWrite: 0 262 | m_Colors: 263 | - _BaseColor: {r: 0.12302715, g: 0.23205175, b: 0.2735849, a: 1} 264 | - _BaseColorMap_MipInfo: {r: 0, g: 0, b: 0, a: 0} 265 | - _Color: {r: 0.12302712, g: 0.2320517, b: 0.27358484, a: 1} 266 | - _DiffusionProfileAsset: {r: 0, g: 0, b: 0, a: 0} 267 | - _DoubleSidedConstants: {r: 1, g: 1, b: -1, a: 0} 268 | - _EmissionColor: {r: 1, g: 1, b: 1, a: 1} 269 | - _EmissiveColor: {r: 0, g: 0, b: 0, a: 1} 270 | - _EmissiveColorLDR: {r: 0, g: 0, b: 0, a: 1} 271 | - _InvPrimScale: {r: 1, g: 1, b: 0, a: 0} 272 | - _IridescenceThicknessRemap: {r: 0, g: 1, b: 0, a: 0} 273 | - _SpecularColor: {r: 1, g: 1, b: 1, a: 1} 274 | - _ThicknessRemap: {r: 0, g: 1, b: 0, a: 0} 275 | - _TransmittanceColor: {r: 1, g: 1, b: 1, a: 1} 276 | - _UVDetailsMappingMask: {r: 1, g: 0, b: 0, a: 0} 277 | - _UVMappingMask: {r: 1, g: 0, b: 0, a: 0} 278 | - _UVMappingMaskEmissive: {r: 1, g: 0, b: 0, a: 0} 279 | m_BuildTextureStacks: [] 280 | -------------------------------------------------------------------------------- /Samples~/MeshToSDF-sample/SceneAssets/SkinnedMesh/plane.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e775131e46354ae4c96071295c976ed2 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Samples~/MeshToSDF-sample/SceneAssets/StaticMesh.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0c9c5da40a84a49418126cd2ea1b604d 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Samples~/MeshToSDF-sample/SceneAssets/StaticMesh/Capsule-BuiltInRP.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 8 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: Capsule-BuiltInRP 11 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 12 | m_Parent: {fileID: 0} 13 | m_ModifiedSerializedProperties: 0 14 | m_ValidKeywords: 15 | - _ALPHATEST_ON 16 | m_InvalidKeywords: [] 17 | m_LightmapFlags: 4 18 | m_EnableInstancingVariants: 0 19 | m_DoubleSidedGI: 0 20 | m_CustomRenderQueue: 2450 21 | stringTagMap: 22 | RenderType: TransparentCutout 23 | disabledShaderPasses: [] 24 | m_LockedProperties: 25 | m_SavedProperties: 26 | serializedVersion: 3 27 | m_TexEnvs: 28 | - _BumpMap: 29 | m_Texture: {fileID: 0} 30 | m_Scale: {x: 1, y: 1} 31 | m_Offset: {x: 0, y: 0} 32 | - _DetailAlbedoMap: 33 | m_Texture: {fileID: 0} 34 | m_Scale: {x: 1, y: 1} 35 | m_Offset: {x: 0, y: 0} 36 | - _DetailMask: 37 | m_Texture: {fileID: 0} 38 | m_Scale: {x: 1, y: 1} 39 | m_Offset: {x: 0, y: 0} 40 | - _DetailNormalMap: 41 | m_Texture: {fileID: 0} 42 | m_Scale: {x: 1, y: 1} 43 | m_Offset: {x: 0, y: 0} 44 | - _EmissionMap: 45 | m_Texture: {fileID: 0} 46 | m_Scale: {x: 5, y: 1} 47 | m_Offset: {x: 0, y: 0} 48 | - _MainTex: 49 | m_Texture: {fileID: 2800000, guid: 7f3d7ac7833de0947a029f2bfd076591, type: 3} 50 | m_Scale: {x: 5, y: 1} 51 | m_Offset: {x: 0, y: 0} 52 | - _MetallicGlossMap: 53 | m_Texture: {fileID: 0} 54 | m_Scale: {x: 1, y: 1} 55 | m_Offset: {x: 0, y: 0} 56 | - _OcclusionMap: 57 | m_Texture: {fileID: 0} 58 | m_Scale: {x: 1, y: 1} 59 | m_Offset: {x: 0, y: 0} 60 | - _ParallaxMap: 61 | m_Texture: {fileID: 0} 62 | m_Scale: {x: 1, y: 1} 63 | m_Offset: {x: 0, y: 0} 64 | m_Ints: [] 65 | m_Floats: 66 | - _BumpScale: 1 67 | - _Cutoff: 0.978 68 | - _DetailNormalMapScale: 1 69 | - _DstBlend: 0 70 | - _GlossMapScale: 1 71 | - _Glossiness: 0.5 72 | - _GlossyReflections: 1 73 | - _Metallic: 0 74 | - _Mode: 1 75 | - _OcclusionStrength: 1 76 | - _Parallax: 0.02 77 | - _SmoothnessTextureChannel: 0 78 | - _SpecularHighlights: 1 79 | - _SrcBlend: 1 80 | - _UVSec: 0 81 | - _ZWrite: 1 82 | m_Colors: 83 | - _Color: {r: 0.83434767, g: 0.042452812, b: 1, a: 1} 84 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 85 | m_BuildTextureStacks: [] 86 | -------------------------------------------------------------------------------- /Samples~/MeshToSDF-sample/SceneAssets/StaticMesh/Capsule-BuiltInRP.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 06617b352d88e904a8ce85c839ee11ed 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Samples~/MeshToSDF-sample/SceneAssets/StaticMesh/Capsule-HDRP.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 8 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: Capsule-HDRP 11 | m_Shader: {fileID: 4800000, guid: 6e4ae4064600d784cac1e41a9e6f2e59, type: 3} 12 | m_Parent: {fileID: 0} 13 | m_ModifiedSerializedProperties: 0 14 | m_ValidKeywords: 15 | - _ALPHATEST_ON 16 | - _DISABLE_SSR_TRANSPARENT 17 | - _NORMALMAP_TANGENT_SPACE 18 | m_InvalidKeywords: [] 19 | m_LightmapFlags: 4 20 | m_EnableInstancingVariants: 0 21 | m_DoubleSidedGI: 0 22 | m_CustomRenderQueue: 2475 23 | stringTagMap: 24 | RenderType: TransparentCutout 25 | disabledShaderPasses: 26 | - TransparentDepthPrepass 27 | - TransparentDepthPostpass 28 | - TransparentBackface 29 | - RayTracingPrepass 30 | - MOTIONVECTORS 31 | m_LockedProperties: 32 | m_SavedProperties: 33 | serializedVersion: 3 34 | m_TexEnvs: 35 | - _AnisotropyMap: 36 | m_Texture: {fileID: 0} 37 | m_Scale: {x: 1, y: 1} 38 | m_Offset: {x: 0, y: 0} 39 | - _BaseColorMap: 40 | m_Texture: {fileID: 2800000, guid: 7f3d7ac7833de0947a029f2bfd076591, type: 3} 41 | m_Scale: {x: 5, y: 1} 42 | m_Offset: {x: 0, y: 0} 43 | - _BentNormalMap: 44 | m_Texture: {fileID: 0} 45 | m_Scale: {x: 1, y: 1} 46 | m_Offset: {x: 0, y: 0} 47 | - _BentNormalMapOS: 48 | m_Texture: {fileID: 0} 49 | m_Scale: {x: 1, y: 1} 50 | m_Offset: {x: 0, y: 0} 51 | - _CoatMaskMap: 52 | m_Texture: {fileID: 0} 53 | m_Scale: {x: 1, y: 1} 54 | m_Offset: {x: 0, y: 0} 55 | - _DetailMap: 56 | m_Texture: {fileID: 0} 57 | m_Scale: {x: 1, y: 1} 58 | m_Offset: {x: 0, y: 0} 59 | - _EmissiveColorMap: 60 | m_Texture: {fileID: 0} 61 | m_Scale: {x: 1, y: 1} 62 | m_Offset: {x: 0, y: 0} 63 | - _HeightMap: 64 | m_Texture: {fileID: 0} 65 | m_Scale: {x: 1, y: 1} 66 | m_Offset: {x: 0, y: 0} 67 | - _IridescenceMaskMap: 68 | m_Texture: {fileID: 0} 69 | m_Scale: {x: 1, y: 1} 70 | m_Offset: {x: 0, y: 0} 71 | - _IridescenceThicknessMap: 72 | m_Texture: {fileID: 0} 73 | m_Scale: {x: 1, y: 1} 74 | m_Offset: {x: 0, y: 0} 75 | - _MainTex: 76 | m_Texture: {fileID: 2800000, guid: 7f3d7ac7833de0947a029f2bfd076591, type: 3} 77 | m_Scale: {x: 5, y: 1} 78 | m_Offset: {x: 0, y: 0} 79 | - _MaskMap: 80 | m_Texture: {fileID: 0} 81 | m_Scale: {x: 1, y: 1} 82 | m_Offset: {x: 0, y: 0} 83 | - _NormalMap: 84 | m_Texture: {fileID: 0} 85 | m_Scale: {x: 1, y: 1} 86 | m_Offset: {x: 0, y: 0} 87 | - _NormalMapOS: 88 | m_Texture: {fileID: 0} 89 | m_Scale: {x: 1, y: 1} 90 | m_Offset: {x: 0, y: 0} 91 | - _SpecularColorMap: 92 | m_Texture: {fileID: 0} 93 | m_Scale: {x: 1, y: 1} 94 | m_Offset: {x: 0, y: 0} 95 | - _SubsurfaceMaskMap: 96 | m_Texture: {fileID: 0} 97 | m_Scale: {x: 1, y: 1} 98 | m_Offset: {x: 0, y: 0} 99 | - _TangentMap: 100 | m_Texture: {fileID: 0} 101 | m_Scale: {x: 1, y: 1} 102 | m_Offset: {x: 0, y: 0} 103 | - _TangentMapOS: 104 | m_Texture: {fileID: 0} 105 | m_Scale: {x: 1, y: 1} 106 | m_Offset: {x: 0, y: 0} 107 | - _ThicknessMap: 108 | m_Texture: {fileID: 0} 109 | m_Scale: {x: 1, y: 1} 110 | m_Offset: {x: 0, y: 0} 111 | - _TransmittanceColorMap: 112 | m_Texture: {fileID: 0} 113 | m_Scale: {x: 1, y: 1} 114 | m_Offset: {x: 0, y: 0} 115 | - unity_Lightmaps: 116 | m_Texture: {fileID: 0} 117 | m_Scale: {x: 1, y: 1} 118 | m_Offset: {x: 0, y: 0} 119 | - unity_LightmapsInd: 120 | m_Texture: {fileID: 0} 121 | m_Scale: {x: 1, y: 1} 122 | m_Offset: {x: 0, y: 0} 123 | - unity_ShadowMasks: 124 | m_Texture: {fileID: 0} 125 | m_Scale: {x: 1, y: 1} 126 | m_Offset: {x: 0, y: 0} 127 | m_Ints: [] 128 | m_Floats: 129 | - _AORemapMax: 1 130 | - _AORemapMin: 0 131 | - _ATDistance: 1 132 | - _AddPrecomputedVelocity: 0 133 | - _AlbedoAffectEmissive: 0 134 | - _AlphaCutoff: 0.978 135 | - _AlphaCutoffEnable: 1 136 | - _AlphaCutoffPostpass: 0.5 137 | - _AlphaCutoffPrepass: 0.5 138 | - _AlphaCutoffShadow: 0.5 139 | - _AlphaDstBlend: 0 140 | - _AlphaSrcBlend: 1 141 | - _AlphaToMask: 0 142 | - _AlphaToMaskInspectorValue: 0 143 | - _Anisotropy: 0 144 | - _BlendMode: 0 145 | - _CoatMask: 0 146 | - _CullMode: 2 147 | - _CullModeForward: 2 148 | - _Cutoff: 0.978 149 | - _DepthOffsetEnable: 0 150 | - _DetailAlbedoScale: 1 151 | - _DetailNormalScale: 1 152 | - _DetailSmoothnessScale: 1 153 | - _DiffusionProfile: 0 154 | - _DiffusionProfileHash: 0 155 | - _DisplacementLockObjectScale: 1 156 | - _DisplacementLockTilingScale: 1 157 | - _DisplacementMode: 0 158 | - _DoubleSidedEnable: 0 159 | - _DoubleSidedGIMode: 0 160 | - _DoubleSidedNormalMode: 1 161 | - _DstBlend: 0 162 | - _EmissiveColorMode: 1 163 | - _EmissiveExposureWeight: 1 164 | - _EmissiveIntensity: 1 165 | - _EmissiveIntensityUnit: 0 166 | - _EnableBlendModePreserveSpecularLighting: 1 167 | - _EnableFogOnTransparent: 1 168 | - _EnableGeometricSpecularAA: 0 169 | - _EnergyConservingSpecularColor: 1 170 | - _HeightAmplitude: 0.02 171 | - _HeightCenter: 0.5 172 | - _HeightMapParametrization: 0 173 | - _HeightMax: 1 174 | - _HeightMin: -1 175 | - _HeightOffset: 0 176 | - _HeightPoMAmplitude: 2 177 | - _HeightTessAmplitude: 2 178 | - _HeightTessCenter: 0.5 179 | - _InvTilingScale: 0.33333334 180 | - _Ior: 1.5 181 | - _IridescenceMask: 1 182 | - _IridescenceThickness: 1 183 | - _LinkDetailsWithBase: 1 184 | - _MaterialID: 1 185 | - _Metallic: 0 186 | - _MetallicRemapMax: 1 187 | - _MetallicRemapMin: 0 188 | - _NormalMapSpace: 0 189 | - _NormalScale: 1 190 | - _OpaqueCullMode: 2 191 | - _PPDLodThreshold: 5 192 | - _PPDMaxSamples: 15 193 | - _PPDMinSamples: 5 194 | - _PPDPrimitiveLength: 1 195 | - _PPDPrimitiveWidth: 1 196 | - _RayTracing: 0 197 | - _ReceivesSSR: 1 198 | - _ReceivesSSRTransparent: 0 199 | - _RefractionModel: 0 200 | - _Smoothness: 0.5 201 | - _SmoothnessRemapMax: 1 202 | - _SmoothnessRemapMin: 0 203 | - _SpecularAAScreenSpaceVariance: 0.1 204 | - _SpecularAAThreshold: 0.2 205 | - _SpecularOcclusionMode: 1 206 | - _SrcBlend: 1 207 | - _StencilRef: 0 208 | - _StencilRefDepth: 8 209 | - _StencilRefGBuffer: 10 210 | - _StencilRefMV: 40 211 | - _StencilWriteMask: 6 212 | - _StencilWriteMaskDepth: 8 213 | - _StencilWriteMaskGBuffer: 14 214 | - _StencilWriteMaskMV: 40 215 | - _SubsurfaceMask: 1 216 | - _SupportDecals: 1 217 | - _SurfaceType: 0 218 | - _TexWorldScale: 1 219 | - _TexWorldScaleEmissive: 1 220 | - _Thickness: 1 221 | - _TransmissionEnable: 1 222 | - _TransparentBackfaceEnable: 0 223 | - _TransparentCullMode: 2 224 | - _TransparentDepthPostpassEnable: 0 225 | - _TransparentDepthPrepassEnable: 0 226 | - _TransparentSortPriority: 0 227 | - _TransparentWritingMotionVec: 0 228 | - _TransparentZWrite: 0 229 | - _UVBase: 0 230 | - _UVDetail: 0 231 | - _UVEmissive: 0 232 | - _UseEmissiveIntensity: 0 233 | - _UseShadowThreshold: 0 234 | - _ZTestDepthEqualForOpaque: 3 235 | - _ZTestGBuffer: 3 236 | - _ZTestTransparent: 4 237 | - _ZWrite: 1 238 | m_Colors: 239 | - _BaseColor: {r: 0.8352942, g: 0.043137256, b: 1, a: 1} 240 | - _BaseColorMap_MipInfo: {r: 0, g: 0, b: 0, a: 0} 241 | - _Color: {r: 0.8352942, g: 0.043137237, b: 1, a: 1} 242 | - _DiffusionProfileAsset: {r: 0, g: 0, b: 0, a: 0} 243 | - _DoubleSidedConstants: {r: 1, g: 1, b: -1, a: 0} 244 | - _EmissionColor: {r: 1, g: 1, b: 1, a: 1} 245 | - _EmissiveColor: {r: 0, g: 0, b: 0, a: 1} 246 | - _EmissiveColorLDR: {r: 0, g: 0, b: 0, a: 1} 247 | - _InvPrimScale: {r: 1, g: 1, b: 0, a: 0} 248 | - _IridescenceThicknessRemap: {r: 0, g: 1, b: 0, a: 0} 249 | - _SpecularColor: {r: 1, g: 1, b: 1, a: 1} 250 | - _ThicknessRemap: {r: 0, g: 1, b: 0, a: 0} 251 | - _TransmittanceColor: {r: 1, g: 1, b: 1, a: 1} 252 | - _UVDetailsMappingMask: {r: 1, g: 0, b: 0, a: 0} 253 | - _UVMappingMask: {r: 1, g: 0, b: 0, a: 0} 254 | - _UVMappingMaskEmissive: {r: 1, g: 0, b: 0, a: 0} 255 | m_BuildTextureStacks: [] 256 | --- !u!114 &7573455835032853099 257 | MonoBehaviour: 258 | m_ObjectHideFlags: 11 259 | m_CorrespondingSourceObject: {fileID: 0} 260 | m_PrefabInstance: {fileID: 0} 261 | m_PrefabAsset: {fileID: 0} 262 | m_GameObject: {fileID: 0} 263 | m_Enabled: 1 264 | m_EditorHideFlags: 0 265 | m_Script: {fileID: 11500000, guid: da692e001514ec24dbc4cca1949ff7e8, type: 3} 266 | m_Name: 267 | m_EditorClassIdentifier: 268 | version: 12 269 | hdPluginSubTargetMaterialVersions: 270 | m_Keys: [] 271 | m_Values: 272 | -------------------------------------------------------------------------------- /Samples~/MeshToSDF-sample/SceneAssets/StaticMesh/Capsule-HDRP.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 150fb2dd1f1efa34badc1c8265538168 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Samples~/MeshToSDF-sample/SceneAssets/StaticMesh/Capsule-URP.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &-1570597878067051744 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 11 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} 13 | m_Name: 14 | m_EditorClassIdentifier: 15 | version: 6 16 | --- !u!21 &2100000 17 | Material: 18 | serializedVersion: 8 19 | m_ObjectHideFlags: 0 20 | m_CorrespondingSourceObject: {fileID: 0} 21 | m_PrefabInstance: {fileID: 0} 22 | m_PrefabAsset: {fileID: 0} 23 | m_Name: Capsule-URP 24 | m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3} 25 | m_Parent: {fileID: 0} 26 | m_ModifiedSerializedProperties: 0 27 | m_ValidKeywords: 28 | - _ALPHATEST_ON 29 | m_InvalidKeywords: [] 30 | m_LightmapFlags: 4 31 | m_EnableInstancingVariants: 0 32 | m_DoubleSidedGI: 0 33 | m_CustomRenderQueue: 2450 34 | stringTagMap: 35 | RenderType: TransparentCutout 36 | disabledShaderPasses: [] 37 | m_LockedProperties: 38 | m_SavedProperties: 39 | serializedVersion: 3 40 | m_TexEnvs: 41 | - _BaseMap: 42 | m_Texture: {fileID: 2800000, guid: 7f3d7ac7833de0947a029f2bfd076591, type: 3} 43 | m_Scale: {x: 5, y: 1} 44 | m_Offset: {x: 0, y: 0} 45 | - _BumpMap: 46 | m_Texture: {fileID: 0} 47 | m_Scale: {x: 1, y: 1} 48 | m_Offset: {x: 0, y: 0} 49 | - _DetailAlbedoMap: 50 | m_Texture: {fileID: 0} 51 | m_Scale: {x: 1, y: 1} 52 | m_Offset: {x: 0, y: 0} 53 | - _DetailMask: 54 | m_Texture: {fileID: 0} 55 | m_Scale: {x: 1, y: 1} 56 | m_Offset: {x: 0, y: 0} 57 | - _DetailNormalMap: 58 | m_Texture: {fileID: 0} 59 | m_Scale: {x: 1, y: 1} 60 | m_Offset: {x: 0, y: 0} 61 | - _EmissionMap: 62 | m_Texture: {fileID: 0} 63 | m_Scale: {x: 1, y: 1} 64 | m_Offset: {x: 0, y: 0} 65 | - _MainTex: 66 | m_Texture: {fileID: 2800000, guid: 7f3d7ac7833de0947a029f2bfd076591, type: 3} 67 | m_Scale: {x: 5, y: 1} 68 | m_Offset: {x: 0, y: 0} 69 | - _MetallicGlossMap: 70 | m_Texture: {fileID: 0} 71 | m_Scale: {x: 1, y: 1} 72 | m_Offset: {x: 0, y: 0} 73 | - _OcclusionMap: 74 | m_Texture: {fileID: 0} 75 | m_Scale: {x: 1, y: 1} 76 | m_Offset: {x: 0, y: 0} 77 | - _ParallaxMap: 78 | m_Texture: {fileID: 0} 79 | m_Scale: {x: 1, y: 1} 80 | m_Offset: {x: 0, y: 0} 81 | - _SpecGlossMap: 82 | m_Texture: {fileID: 0} 83 | m_Scale: {x: 1, y: 1} 84 | m_Offset: {x: 0, y: 0} 85 | - unity_Lightmaps: 86 | m_Texture: {fileID: 0} 87 | m_Scale: {x: 1, y: 1} 88 | m_Offset: {x: 0, y: 0} 89 | - unity_LightmapsInd: 90 | m_Texture: {fileID: 0} 91 | m_Scale: {x: 1, y: 1} 92 | m_Offset: {x: 0, y: 0} 93 | - unity_ShadowMasks: 94 | m_Texture: {fileID: 0} 95 | m_Scale: {x: 1, y: 1} 96 | m_Offset: {x: 0, y: 0} 97 | m_Ints: [] 98 | m_Floats: 99 | - _AlphaClip: 1 100 | - _Blend: 0 101 | - _BlendModePreserveSpecular: 1 102 | - _BumpScale: 1 103 | - _ClearCoatMask: 0 104 | - _ClearCoatSmoothness: 0 105 | - _Cull: 2 106 | - _Cutoff: 0.978 107 | - _DetailAlbedoMapScale: 1 108 | - _DetailNormalMapScale: 1 109 | - _DstBlend: 0 110 | - _DstBlendAlpha: 0 111 | - _EnvironmentReflections: 1 112 | - _GlossMapScale: 0 113 | - _Glossiness: 0 114 | - _GlossyReflections: 0 115 | - _Metallic: 0 116 | - _OcclusionStrength: 1 117 | - _Parallax: 0.005 118 | - _QueueOffset: 0 119 | - _ReceiveShadows: 1 120 | - _Smoothness: 0.5 121 | - _SmoothnessTextureChannel: 0 122 | - _SpecularHighlights: 1 123 | - _SrcBlend: 1 124 | - _SrcBlendAlpha: 1 125 | - _Surface: 0 126 | - _WorkflowMode: 1 127 | - _ZWrite: 1 128 | m_Colors: 129 | - _BaseColor: {r: 0.8352941, g: 0.043137256, b: 1, a: 1} 130 | - _Color: {r: 0.8352941, g: 0.043137237, b: 1, a: 1} 131 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 132 | - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} 133 | m_BuildTextureStacks: [] 134 | -------------------------------------------------------------------------------- /Samples~/MeshToSDF-sample/SceneAssets/StaticMesh/Capsule-URP.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 347dc93730433e941a38a06145405473 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Samples~/MeshToSDF-sample/SceneAssets/StaticMesh/Capsule.controller: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1107 &-3093914181849193945 4 | AnimatorStateMachine: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 1 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: Base Layer 11 | m_ChildStates: 12 | - serializedVersion: 1 13 | m_State: {fileID: 4454581456451556656} 14 | m_Position: {x: 40, y: 220, z: 0} 15 | m_ChildStateMachines: [] 16 | m_AnyStateTransitions: [] 17 | m_EntryTransitions: [] 18 | m_StateMachineTransitions: {} 19 | m_StateMachineBehaviours: [] 20 | m_AnyStatePosition: {x: 50, y: 20, z: 0} 21 | m_EntryPosition: {x: 50, y: 120, z: 0} 22 | m_ExitPosition: {x: 800, y: 120, z: 0} 23 | m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} 24 | m_DefaultState: {fileID: 4454581456451556656} 25 | --- !u!91 &9100000 26 | AnimatorController: 27 | m_ObjectHideFlags: 0 28 | m_CorrespondingSourceObject: {fileID: 0} 29 | m_PrefabInstance: {fileID: 0} 30 | m_PrefabAsset: {fileID: 0} 31 | m_Name: Capsule 32 | serializedVersion: 5 33 | m_AnimatorParameters: [] 34 | m_AnimatorLayers: 35 | - serializedVersion: 5 36 | m_Name: Base Layer 37 | m_StateMachine: {fileID: -3093914181849193945} 38 | m_Mask: {fileID: 0} 39 | m_Motions: [] 40 | m_Behaviours: [] 41 | m_BlendingMode: 0 42 | m_SyncedLayerIndex: -1 43 | m_DefaultWeight: 0 44 | m_IKPass: 0 45 | m_SyncedLayerAffectsTiming: 0 46 | m_Controller: {fileID: 9100000} 47 | --- !u!1102 &4454581456451556656 48 | AnimatorState: 49 | serializedVersion: 6 50 | m_ObjectHideFlags: 1 51 | m_CorrespondingSourceObject: {fileID: 0} 52 | m_PrefabInstance: {fileID: 0} 53 | m_PrefabAsset: {fileID: 0} 54 | m_Name: capsule 55 | m_Speed: 0.3 56 | m_CycleOffset: 0 57 | m_Transitions: [] 58 | m_StateMachineBehaviours: [] 59 | m_Position: {x: 50, y: 50, z: 0} 60 | m_IKOnFeet: 0 61 | m_WriteDefaultValues: 1 62 | m_Mirror: 0 63 | m_SpeedParameterActive: 0 64 | m_MirrorParameterActive: 0 65 | m_CycleOffsetParameterActive: 0 66 | m_TimeParameterActive: 0 67 | m_Motion: {fileID: 7400000, guid: 6f5c7f25b7ef34343b44c32b95154531, type: 2} 68 | m_Tag: 69 | m_SpeedParameter: 70 | m_MirrorParameter: 71 | m_CycleOffsetParameter: 72 | m_TimeParameter: 73 | -------------------------------------------------------------------------------- /Samples~/MeshToSDF-sample/SceneAssets/StaticMesh/Capsule.controller.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ede3960e5320fb5428daf27f21c01652 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 9100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Samples~/MeshToSDF-sample/SceneAssets/StaticMesh/Checker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/com.unity.demoteam.mesh-to-sdf/1f8ee658aabe2b588aae7d0b635a9941266a52ef/Samples~/MeshToSDF-sample/SceneAssets/StaticMesh/Checker.png -------------------------------------------------------------------------------- /Samples~/MeshToSDF-sample/SceneAssets/StaticMesh/Checker.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7f3d7ac7833de0947a029f2bfd076591 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 11 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 1 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | flipGreenChannel: 0 24 | isReadable: 0 25 | streamingMipmaps: 0 26 | streamingMipmapsPriority: 0 27 | vTOnly: 0 28 | ignoreMasterTextureLimit: 0 29 | grayScaleToAlpha: 0 30 | generateCubemap: 6 31 | cubemapConvolution: 0 32 | seamlessCubemap: 0 33 | textureFormat: 1 34 | maxTextureSize: 2048 35 | textureSettings: 36 | serializedVersion: 2 37 | filterMode: 1 38 | aniso: 1 39 | mipBias: 0 40 | wrapU: 0 41 | wrapV: 0 42 | wrapW: 0 43 | nPOTScale: 1 44 | lightmap: 0 45 | compressionQuality: 50 46 | spriteMode: 0 47 | spriteExtrude: 1 48 | spriteMeshType: 1 49 | alignment: 0 50 | spritePivot: {x: 0.5, y: 0.5} 51 | spritePixelsToUnits: 100 52 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 53 | spriteGenerateFallbackPhysicsShape: 1 54 | alphaUsage: 2 55 | alphaIsTransparency: 1 56 | spriteTessellationDetail: -1 57 | textureType: 0 58 | textureShape: 1 59 | singleChannelComponent: 0 60 | flipbookRows: 1 61 | flipbookColumns: 1 62 | maxTextureSizeSet: 0 63 | compressionQualitySet: 0 64 | textureFormatSet: 0 65 | ignorePngGamma: 0 66 | applyGammaDecoding: 0 67 | swizzle: 50462976 68 | platformSettings: 69 | - serializedVersion: 3 70 | buildTarget: DefaultTexturePlatform 71 | maxTextureSize: 2048 72 | resizeAlgorithm: 0 73 | textureFormat: -1 74 | textureCompression: 1 75 | compressionQuality: 50 76 | crunchedCompression: 0 77 | allowsAlphaSplitting: 0 78 | overridden: 0 79 | androidETC2FallbackOverride: 0 80 | forceMaximumCompressionQuality_BC6H_BC7: 0 81 | - serializedVersion: 3 82 | buildTarget: Standalone 83 | maxTextureSize: 2048 84 | resizeAlgorithm: 0 85 | textureFormat: -1 86 | textureCompression: 1 87 | compressionQuality: 50 88 | crunchedCompression: 0 89 | allowsAlphaSplitting: 0 90 | overridden: 0 91 | androidETC2FallbackOverride: 0 92 | forceMaximumCompressionQuality_BC6H_BC7: 0 93 | - serializedVersion: 3 94 | buildTarget: Server 95 | maxTextureSize: 2048 96 | resizeAlgorithm: 0 97 | textureFormat: -1 98 | textureCompression: 1 99 | compressionQuality: 50 100 | crunchedCompression: 0 101 | allowsAlphaSplitting: 0 102 | overridden: 0 103 | androidETC2FallbackOverride: 0 104 | forceMaximumCompressionQuality_BC6H_BC7: 0 105 | spriteSheet: 106 | serializedVersion: 2 107 | sprites: [] 108 | outline: [] 109 | physicsShape: [] 110 | bones: [] 111 | spriteID: 112 | internalID: 0 113 | vertices: [] 114 | indices: 115 | edges: [] 116 | weights: [] 117 | secondaryTextures: [] 118 | nameFileIdTable: {} 119 | spritePackingTag: 120 | pSDRemoveMatte: 0 121 | userData: 122 | assetBundleName: 123 | assetBundleVariant: 124 | -------------------------------------------------------------------------------- /Samples~/MeshToSDF-sample/SceneAssets/StaticMesh/MeshToSDF-StaticMesh-HDRP.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9235c120976e01c448f39a805f1ca196 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Samples~/MeshToSDF-sample/SceneAssets/StaticMesh/MeshToSDF-StaticMesh-HDRP/HDAdditionalLightData.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/com.unity.demoteam.mesh-to-sdf/1f8ee658aabe2b588aae7d0b635a9941266a52ef/Samples~/MeshToSDF-sample/SceneAssets/StaticMesh/MeshToSDF-StaticMesh-HDRP/HDAdditionalLightData.png -------------------------------------------------------------------------------- /Samples~/MeshToSDF-sample/SceneAssets/StaticMesh/MeshToSDF-StaticMesh-HDRP/HDAdditionalLightData.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8d1fedd91d223d44ca56dbfe1217148e 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 10 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 1 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -100 37 | wrapU: -1 38 | wrapV: -1 39 | wrapW: -1 40 | nPOTScale: 1 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 0 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 0 53 | spriteTessellationDetail: -1 54 | textureType: 0 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | ignorePngGamma: 0 61 | platformSettings: 62 | - serializedVersion: 3 63 | buildTarget: DefaultTexturePlatform 64 | maxTextureSize: 2048 65 | resizeAlgorithm: 0 66 | textureFormat: -1 67 | textureCompression: 1 68 | compressionQuality: 50 69 | crunchedCompression: 0 70 | allowsAlphaSplitting: 0 71 | overridden: 0 72 | androidETC2FallbackOverride: 0 73 | forceMaximumCompressionQuality_BC6H_BC7: 0 74 | spriteSheet: 75 | serializedVersion: 2 76 | sprites: [] 77 | outline: [] 78 | physicsShape: [] 79 | bones: [] 80 | spriteID: 81 | internalID: 0 82 | vertices: [] 83 | indices: 84 | edges: [] 85 | weights: [] 86 | secondaryTextures: [] 87 | spritePackingTag: 88 | pSDRemoveMatte: 0 89 | pSDShowRemoveMatteOption: 0 90 | userData: 91 | assetBundleName: 92 | assetBundleVariant: 93 | -------------------------------------------------------------------------------- /Samples~/MeshToSDF-sample/SceneAssets/StaticMesh/MeshToSDF-StaticMesh-HDRP/SkyandFogSettingsProfile.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &-4151792930034644520 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 3 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: 953beb541740ddc499d005ee80c9ff29, type: 3} 13 | m_Name: 14 | m_EditorClassIdentifier: 15 | active: 1 16 | quality: 17 | m_OverrideState: 0 18 | m_Value: 1 19 | enabled: 20 | m_OverrideState: 1 21 | m_Value: 1 22 | colorMode: 23 | m_OverrideState: 0 24 | m_Value: 1 25 | color: 26 | m_OverrideState: 0 27 | m_Value: {r: 0.5, g: 0.5, b: 0.5, a: 1} 28 | tint: 29 | m_OverrideState: 0 30 | m_Value: {r: 1, g: 1, b: 1, a: 1} 31 | maxFogDistance: 32 | m_OverrideState: 0 33 | m_Value: 5000 34 | mipFogMaxMip: 35 | m_OverrideState: 0 36 | m_Value: 0.5 37 | mipFogNear: 38 | m_OverrideState: 0 39 | m_Value: 0 40 | mipFogFar: 41 | m_OverrideState: 0 42 | m_Value: 1000 43 | baseHeight: 44 | m_OverrideState: 0 45 | m_Value: 0 46 | maximumHeight: 47 | m_OverrideState: 0 48 | m_Value: 50 49 | meanFreePath: 50 | m_OverrideState: 0 51 | m_Value: 400 52 | enableVolumetricFog: 53 | m_OverrideState: 1 54 | m_Value: 1 55 | albedo: 56 | m_OverrideState: 0 57 | m_Value: {r: 1, g: 1, b: 1, a: 1} 58 | globalLightProbeDimmer: 59 | m_OverrideState: 0 60 | m_Value: 1 61 | depthExtent: 62 | m_OverrideState: 0 63 | m_Value: 64 64 | denoisingMode: 65 | m_OverrideState: 0 66 | m_Value: 2 67 | anisotropy: 68 | m_OverrideState: 1 69 | m_Value: 0.65 70 | sliceDistributionUniformity: 71 | m_OverrideState: 0 72 | m_Value: 0.75 73 | m_FogControlMode: 74 | m_OverrideState: 0 75 | m_Value: 0 76 | screenResolutionPercentage: 77 | m_OverrideState: 0 78 | m_Value: 12.5 79 | volumeSliceCount: 80 | m_OverrideState: 0 81 | m_Value: 64 82 | m_VolumetricFogBudget: 83 | m_OverrideState: 0 84 | m_Value: 0.5 85 | m_ResolutionDepthRatio: 86 | m_OverrideState: 0 87 | m_Value: 0.5 88 | directionalLightsOnly: 89 | m_OverrideState: 0 90 | m_Value: 0 91 | --- !u!114 &11400000 92 | MonoBehaviour: 93 | m_ObjectHideFlags: 0 94 | m_CorrespondingSourceObject: {fileID: 0} 95 | m_PrefabInstance: {fileID: 0} 96 | m_PrefabAsset: {fileID: 0} 97 | m_GameObject: {fileID: 0} 98 | m_Enabled: 1 99 | m_EditorHideFlags: 0 100 | m_Script: {fileID: 11500000, guid: d7fd9488000d3734a9e00ee676215985, type: 3} 101 | m_Name: SkyandFogSettingsProfile 102 | m_EditorClassIdentifier: 103 | components: 104 | - {fileID: 1142777632297148762} 105 | - {fileID: -4151792930034644520} 106 | - {fileID: 7642060734654139733} 107 | - {fileID: 8774238449485992992} 108 | --- !u!114 &1142777632297148762 109 | MonoBehaviour: 110 | m_ObjectHideFlags: 3 111 | m_CorrespondingSourceObject: {fileID: 0} 112 | m_PrefabInstance: {fileID: 0} 113 | m_PrefabAsset: {fileID: 0} 114 | m_GameObject: {fileID: 0} 115 | m_Enabled: 1 116 | m_EditorHideFlags: 0 117 | m_Script: {fileID: 11500000, guid: 0d7593b3a9277ac4696b20006c21dde2, type: 3} 118 | m_Name: 119 | m_EditorClassIdentifier: 120 | active: 1 121 | skyType: 122 | m_OverrideState: 1 123 | m_Value: 3 124 | cloudType: 125 | m_OverrideState: 0 126 | m_Value: 0 127 | skyAmbientMode: 128 | m_OverrideState: 1 129 | m_Value: 0 130 | windOrientation: 131 | m_OverrideState: 0 132 | m_Value: 0 133 | windSpeed: 134 | m_OverrideState: 0 135 | m_Value: 100 136 | fogType: 137 | m_OverrideState: 1 138 | m_Value: 0 139 | --- !u!114 &7642060734654139733 140 | MonoBehaviour: 141 | m_ObjectHideFlags: 3 142 | m_CorrespondingSourceObject: {fileID: 0} 143 | m_PrefabInstance: {fileID: 0} 144 | m_PrefabAsset: {fileID: 0} 145 | m_GameObject: {fileID: 0} 146 | m_Enabled: 1 147 | m_EditorHideFlags: 0 148 | m_Script: {fileID: 11500000, guid: 2d08ce26990eb1a4a9177b860541e702, type: 3} 149 | m_Name: Exposure 150 | m_EditorClassIdentifier: 151 | active: 1 152 | mode: 153 | m_OverrideState: 1 154 | m_Value: 1 155 | meteringMode: 156 | m_OverrideState: 0 157 | m_Value: 2 158 | luminanceSource: 159 | m_OverrideState: 0 160 | m_Value: 1 161 | fixedExposure: 162 | m_OverrideState: 1 163 | m_Value: 11.831256 164 | compensation: 165 | m_OverrideState: 1 166 | m_Value: 2.6 167 | limitMin: 168 | m_OverrideState: 1 169 | m_Value: 2 170 | limitMax: 171 | m_OverrideState: 1 172 | m_Value: 14 173 | curveMap: 174 | m_OverrideState: 0 175 | m_Value: 176 | serializedVersion: 2 177 | m_Curve: 178 | - serializedVersion: 3 179 | time: -10 180 | value: -10 181 | inSlope: 0 182 | outSlope: 1 183 | tangentMode: 0 184 | weightedMode: 0 185 | inWeight: 0 186 | outWeight: 0 187 | - serializedVersion: 3 188 | time: 20 189 | value: 20 190 | inSlope: 1 191 | outSlope: 0 192 | tangentMode: 0 193 | weightedMode: 0 194 | inWeight: 0 195 | outWeight: 0 196 | m_PreInfinity: 2 197 | m_PostInfinity: 2 198 | m_RotationOrder: 4 199 | limitMinCurveMap: 200 | m_OverrideState: 0 201 | m_Value: 202 | serializedVersion: 2 203 | m_Curve: 204 | - serializedVersion: 3 205 | time: -10 206 | value: -12 207 | inSlope: 0 208 | outSlope: 1 209 | tangentMode: 0 210 | weightedMode: 0 211 | inWeight: 0 212 | outWeight: 0 213 | - serializedVersion: 3 214 | time: 20 215 | value: 18 216 | inSlope: 1 217 | outSlope: 0 218 | tangentMode: 0 219 | weightedMode: 0 220 | inWeight: 0 221 | outWeight: 0 222 | m_PreInfinity: 2 223 | m_PostInfinity: 2 224 | m_RotationOrder: 4 225 | limitMaxCurveMap: 226 | m_OverrideState: 0 227 | m_Value: 228 | serializedVersion: 2 229 | m_Curve: 230 | - serializedVersion: 3 231 | time: -10 232 | value: -8 233 | inSlope: 0 234 | outSlope: 1 235 | tangentMode: 0 236 | weightedMode: 0 237 | inWeight: 0 238 | outWeight: 0 239 | - serializedVersion: 3 240 | time: 20 241 | value: 22 242 | inSlope: 1 243 | outSlope: 0 244 | tangentMode: 0 245 | weightedMode: 0 246 | inWeight: 0 247 | outWeight: 0 248 | m_PreInfinity: 2 249 | m_PostInfinity: 2 250 | m_RotationOrder: 4 251 | adaptationMode: 252 | m_OverrideState: 0 253 | m_Value: 1 254 | adaptationSpeedDarkToLight: 255 | m_OverrideState: 0 256 | m_Value: 3 257 | adaptationSpeedLightToDark: 258 | m_OverrideState: 0 259 | m_Value: 1 260 | weightTextureMask: 261 | m_OverrideState: 0 262 | m_Value: {fileID: 0} 263 | histogramPercentages: 264 | m_OverrideState: 0 265 | m_Value: {x: 40, y: 90} 266 | histogramUseCurveRemapping: 267 | m_OverrideState: 0 268 | m_Value: 0 269 | targetMidGray: 270 | m_OverrideState: 0 271 | m_Value: 0 272 | centerAroundExposureTarget: 273 | m_OverrideState: 0 274 | m_Value: 0 275 | proceduralCenter: 276 | m_OverrideState: 0 277 | m_Value: {x: 0.5, y: 0.5} 278 | proceduralRadii: 279 | m_OverrideState: 0 280 | m_Value: {x: 0.15, y: 0.15} 281 | maskMinIntensity: 282 | m_OverrideState: 0 283 | m_Value: -30 284 | maskMaxIntensity: 285 | m_OverrideState: 0 286 | m_Value: 30 287 | proceduralSoftness: 288 | m_OverrideState: 0 289 | m_Value: 0.5 290 | --- !u!114 &8774238449485992992 291 | MonoBehaviour: 292 | m_ObjectHideFlags: 3 293 | m_CorrespondingSourceObject: {fileID: 0} 294 | m_PrefabInstance: {fileID: 0} 295 | m_PrefabAsset: {fileID: 0} 296 | m_GameObject: {fileID: 0} 297 | m_Enabled: 1 298 | m_EditorHideFlags: 0 299 | m_Script: {fileID: 11500000, guid: a81bcacc415a1f743bfdf703afc52027, type: 3} 300 | m_Name: GradientSky 301 | m_EditorClassIdentifier: 302 | active: 1 303 | rotation: 304 | m_OverrideState: 0 305 | m_Value: 0 306 | skyIntensityMode: 307 | m_OverrideState: 1 308 | m_Value: 0 309 | exposure: 310 | m_OverrideState: 1 311 | m_Value: 11.8 312 | multiplier: 313 | m_OverrideState: 0 314 | m_Value: 1 315 | upperHemisphereLuxValue: 316 | m_OverrideState: 0 317 | m_Value: 1 318 | upperHemisphereLuxColor: 319 | m_OverrideState: 0 320 | m_Value: {x: 0, y: 0, z: 0} 321 | desiredLuxValue: 322 | m_OverrideState: 0 323 | m_Value: 20000 324 | updateMode: 325 | m_OverrideState: 0 326 | m_Value: 0 327 | updatePeriod: 328 | m_OverrideState: 0 329 | m_Value: 0 330 | includeSunInBaking: 331 | m_OverrideState: 0 332 | m_Value: 0 333 | top: 334 | m_OverrideState: 1 335 | m_Value: {r: 0.046665095, g: 1, b: 0.26635566, a: 1} 336 | middle: 337 | m_OverrideState: 1 338 | m_Value: {r: 0.046665095, g: 1, b: 0.26635566, a: 1} 339 | bottom: 340 | m_OverrideState: 1 341 | m_Value: {r: 0.046665095, g: 1, b: 0.26635566, a: 1} 342 | gradientDiffusion: 343 | m_OverrideState: 0 344 | m_Value: 1 345 | -------------------------------------------------------------------------------- /Samples~/MeshToSDF-sample/SceneAssets/StaticMesh/MeshToSDF-StaticMesh-HDRP/SkyandFogSettingsProfile.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 27a9ca6c05f869a459b73c65a867ccc4 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Samples~/MeshToSDF-sample/SceneAssets/StaticMesh/MeshToSDF-StaticMesh-HDRP/Volume.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/com.unity.demoteam.mesh-to-sdf/1f8ee658aabe2b588aae7d0b635a9941266a52ef/Samples~/MeshToSDF-sample/SceneAssets/StaticMesh/MeshToSDF-StaticMesh-HDRP/Volume.png -------------------------------------------------------------------------------- /Samples~/MeshToSDF-sample/SceneAssets/StaticMesh/MeshToSDF-StaticMesh-HDRP/Volume.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6ed7c11a85b239842b21adebf8d8b915 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | externalObjects: {} 6 | serializedVersion: 7 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 1 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -100 37 | wrapU: -1 38 | wrapV: -1 39 | wrapW: -1 40 | nPOTScale: 1 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 0 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 1 53 | spriteTessellationDetail: -1 54 | textureType: 0 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | platformSettings: 61 | - serializedVersion: 2 62 | buildTarget: DefaultTexturePlatform 63 | maxTextureSize: 2048 64 | resizeAlgorithm: 0 65 | textureFormat: -1 66 | textureCompression: 0 67 | compressionQuality: 50 68 | crunchedCompression: 0 69 | allowsAlphaSplitting: 0 70 | overridden: 0 71 | androidETC2FallbackOverride: 0 72 | - serializedVersion: 2 73 | buildTarget: Standalone 74 | maxTextureSize: 2048 75 | resizeAlgorithm: 0 76 | textureFormat: -1 77 | textureCompression: 0 78 | compressionQuality: 50 79 | crunchedCompression: 0 80 | allowsAlphaSplitting: 0 81 | overridden: 0 82 | androidETC2FallbackOverride: 0 83 | - serializedVersion: 2 84 | buildTarget: iPhone 85 | maxTextureSize: 2048 86 | resizeAlgorithm: 0 87 | textureFormat: -1 88 | textureCompression: 0 89 | compressionQuality: 50 90 | crunchedCompression: 0 91 | allowsAlphaSplitting: 0 92 | overridden: 0 93 | androidETC2FallbackOverride: 0 94 | - serializedVersion: 2 95 | buildTarget: Windows Store Apps 96 | maxTextureSize: 2048 97 | resizeAlgorithm: 0 98 | textureFormat: -1 99 | textureCompression: 0 100 | compressionQuality: 50 101 | crunchedCompression: 0 102 | allowsAlphaSplitting: 0 103 | overridden: 0 104 | androidETC2FallbackOverride: 0 105 | spriteSheet: 106 | serializedVersion: 2 107 | sprites: [] 108 | outline: [] 109 | physicsShape: [] 110 | bones: [] 111 | spriteID: 112 | vertices: [] 113 | indices: 114 | edges: [] 115 | weights: [] 116 | spritePackingTag: 117 | pSDRemoveMatte: 0 118 | pSDShowRemoveMatteOption: 0 119 | userData: 120 | assetBundleName: 121 | assetBundleVariant: 122 | -------------------------------------------------------------------------------- /Samples~/MeshToSDF-sample/SceneAssets/StaticMesh/MeshToSDF-StaticMesh-HDRP/VolumeProfileAsset.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/com.unity.demoteam.mesh-to-sdf/1f8ee658aabe2b588aae7d0b635a9941266a52ef/Samples~/MeshToSDF-sample/SceneAssets/StaticMesh/MeshToSDF-StaticMesh-HDRP/VolumeProfileAsset.png -------------------------------------------------------------------------------- /Samples~/MeshToSDF-sample/SceneAssets/StaticMesh/MeshToSDF-StaticMesh-HDRP/VolumeProfileAsset.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ec0b6364b5e9c074eafd63c7a035cea6 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 8 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 1 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -100 37 | wrapU: -1 38 | wrapV: -1 39 | wrapW: -1 40 | nPOTScale: 1 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 0 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 1 53 | spriteTessellationDetail: -1 54 | textureType: 0 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | platformSettings: 61 | - serializedVersion: 2 62 | buildTarget: DefaultTexturePlatform 63 | maxTextureSize: 2048 64 | resizeAlgorithm: 0 65 | textureFormat: -1 66 | textureCompression: 1 67 | compressionQuality: 50 68 | crunchedCompression: 0 69 | allowsAlphaSplitting: 0 70 | overridden: 0 71 | androidETC2FallbackOverride: 0 72 | - serializedVersion: 2 73 | buildTarget: Standalone 74 | maxTextureSize: 2048 75 | resizeAlgorithm: 0 76 | textureFormat: -1 77 | textureCompression: 1 78 | compressionQuality: 50 79 | crunchedCompression: 0 80 | allowsAlphaSplitting: 0 81 | overridden: 0 82 | androidETC2FallbackOverride: 0 83 | - serializedVersion: 2 84 | buildTarget: Windows Store Apps 85 | maxTextureSize: 2048 86 | resizeAlgorithm: 0 87 | textureFormat: -1 88 | textureCompression: 1 89 | compressionQuality: 50 90 | crunchedCompression: 0 91 | allowsAlphaSplitting: 0 92 | overridden: 0 93 | androidETC2FallbackOverride: 0 94 | - serializedVersion: 2 95 | buildTarget: iPhone 96 | maxTextureSize: 2048 97 | resizeAlgorithm: 0 98 | textureFormat: -1 99 | textureCompression: 1 100 | compressionQuality: 50 101 | crunchedCompression: 0 102 | allowsAlphaSplitting: 0 103 | overridden: 0 104 | androidETC2FallbackOverride: 0 105 | spriteSheet: 106 | serializedVersion: 2 107 | sprites: [] 108 | outline: [] 109 | physicsShape: [] 110 | bones: [] 111 | spriteID: 112 | internalID: 0 113 | vertices: [] 114 | indices: 115 | edges: [] 116 | weights: [] 117 | secondaryTextures: [] 118 | spritePackingTag: 119 | pSDRemoveMatte: 0 120 | pSDShowRemoveMatteOption: 0 121 | userData: 122 | assetBundleName: 123 | assetBundleVariant: 124 | -------------------------------------------------------------------------------- /Samples~/MeshToSDF-sample/SceneAssets/StaticMesh/MeshToSDF-StaticMesh-URP.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 929d0c7ac2e325441b6d7aa48469df25 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Samples~/MeshToSDF-sample/SceneAssets/StaticMesh/MeshToSDF-StaticMesh-URP/GlobalVolumeProfile.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: d7fd9488000d3734a9e00ee676215985, type: 3} 13 | m_Name: GlobalVolumeProfile 14 | m_EditorClassIdentifier: 15 | components: 16 | - {fileID: 1881579288749618558} 17 | - {fileID: 7620287545779713884} 18 | --- !u!114 &1881579288749618558 19 | MonoBehaviour: 20 | m_ObjectHideFlags: 3 21 | m_CorrespondingSourceObject: {fileID: 0} 22 | m_PrefabInstance: {fileID: 0} 23 | m_PrefabAsset: {fileID: 0} 24 | m_GameObject: {fileID: 0} 25 | m_Enabled: 1 26 | m_EditorHideFlags: 0 27 | m_Script: {fileID: 11500000, guid: 97c23e3b12dc18c42a140437e53d3951, type: 3} 28 | m_Name: Tonemapping 29 | m_EditorClassIdentifier: 30 | active: 1 31 | mode: 32 | m_OverrideState: 1 33 | m_Value: 1 34 | --- !u!114 &7620287545779713884 35 | MonoBehaviour: 36 | m_ObjectHideFlags: 3 37 | m_CorrespondingSourceObject: {fileID: 0} 38 | m_PrefabInstance: {fileID: 0} 39 | m_PrefabAsset: {fileID: 0} 40 | m_GameObject: {fileID: 0} 41 | m_Enabled: 1 42 | m_EditorHideFlags: 0 43 | m_Script: {fileID: 11500000, guid: 66f335fb1ffd8684294ad653bf1c7564, type: 3} 44 | m_Name: ColorAdjustments 45 | m_EditorClassIdentifier: 46 | active: 1 47 | postExposure: 48 | m_OverrideState: 1 49 | m_Value: 0.3 50 | contrast: 51 | m_OverrideState: 0 52 | m_Value: 0 53 | colorFilter: 54 | m_OverrideState: 0 55 | m_Value: {r: 1, g: 1, b: 1, a: 1} 56 | hueShift: 57 | m_OverrideState: 0 58 | m_Value: 0 59 | saturation: 60 | m_OverrideState: 0 61 | m_Value: 0 62 | -------------------------------------------------------------------------------- /Samples~/MeshToSDF-sample/SceneAssets/StaticMesh/MeshToSDF-StaticMesh-URP/GlobalVolumeProfile.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4c8c1cab3fe450a4a8adb564e6be0239 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Samples~/MeshToSDF-sample/SceneAssets/StaticMesh/MeshToSDF-StaticMesh-URP/Volume.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/com.unity.demoteam.mesh-to-sdf/1f8ee658aabe2b588aae7d0b635a9941266a52ef/Samples~/MeshToSDF-sample/SceneAssets/StaticMesh/MeshToSDF-StaticMesh-URP/Volume.png -------------------------------------------------------------------------------- /Samples~/MeshToSDF-sample/SceneAssets/StaticMesh/MeshToSDF-StaticMesh-URP/Volume.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 72d66e1605a9e8f4287c6688b2725450 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | externalObjects: {} 6 | serializedVersion: 7 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 1 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -100 37 | wrapU: -1 38 | wrapV: -1 39 | wrapW: -1 40 | nPOTScale: 1 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 0 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 1 53 | spriteTessellationDetail: -1 54 | textureType: 0 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | platformSettings: 61 | - serializedVersion: 2 62 | buildTarget: DefaultTexturePlatform 63 | maxTextureSize: 2048 64 | resizeAlgorithm: 0 65 | textureFormat: -1 66 | textureCompression: 0 67 | compressionQuality: 50 68 | crunchedCompression: 0 69 | allowsAlphaSplitting: 0 70 | overridden: 0 71 | androidETC2FallbackOverride: 0 72 | - serializedVersion: 2 73 | buildTarget: Standalone 74 | maxTextureSize: 2048 75 | resizeAlgorithm: 0 76 | textureFormat: -1 77 | textureCompression: 0 78 | compressionQuality: 50 79 | crunchedCompression: 0 80 | allowsAlphaSplitting: 0 81 | overridden: 0 82 | androidETC2FallbackOverride: 0 83 | - serializedVersion: 2 84 | buildTarget: iPhone 85 | maxTextureSize: 2048 86 | resizeAlgorithm: 0 87 | textureFormat: -1 88 | textureCompression: 0 89 | compressionQuality: 50 90 | crunchedCompression: 0 91 | allowsAlphaSplitting: 0 92 | overridden: 0 93 | androidETC2FallbackOverride: 0 94 | - serializedVersion: 2 95 | buildTarget: Windows Store Apps 96 | maxTextureSize: 2048 97 | resizeAlgorithm: 0 98 | textureFormat: -1 99 | textureCompression: 0 100 | compressionQuality: 50 101 | crunchedCompression: 0 102 | allowsAlphaSplitting: 0 103 | overridden: 0 104 | androidETC2FallbackOverride: 0 105 | spriteSheet: 106 | serializedVersion: 2 107 | sprites: [] 108 | outline: [] 109 | physicsShape: [] 110 | bones: [] 111 | spriteID: 112 | vertices: [] 113 | indices: 114 | edges: [] 115 | weights: [] 116 | spritePackingTag: 117 | pSDRemoveMatte: 0 118 | pSDShowRemoveMatteOption: 0 119 | userData: 120 | assetBundleName: 121 | assetBundleVariant: 122 | -------------------------------------------------------------------------------- /Samples~/MeshToSDF-sample/SceneAssets/StaticMesh/MeshToSDF-StaticMesh-URP/VolumeProfileAsset.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/com.unity.demoteam.mesh-to-sdf/1f8ee658aabe2b588aae7d0b635a9941266a52ef/Samples~/MeshToSDF-sample/SceneAssets/StaticMesh/MeshToSDF-StaticMesh-URP/VolumeProfileAsset.png -------------------------------------------------------------------------------- /Samples~/MeshToSDF-sample/SceneAssets/StaticMesh/MeshToSDF-StaticMesh-URP/VolumeProfileAsset.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7ef17aba6f15f184fa4964f88e91dc2e 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 8 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 1 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -100 37 | wrapU: -1 38 | wrapV: -1 39 | wrapW: -1 40 | nPOTScale: 1 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 0 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 1 53 | spriteTessellationDetail: -1 54 | textureType: 0 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | platformSettings: 61 | - serializedVersion: 2 62 | buildTarget: DefaultTexturePlatform 63 | maxTextureSize: 2048 64 | resizeAlgorithm: 0 65 | textureFormat: -1 66 | textureCompression: 1 67 | compressionQuality: 50 68 | crunchedCompression: 0 69 | allowsAlphaSplitting: 0 70 | overridden: 0 71 | androidETC2FallbackOverride: 0 72 | - serializedVersion: 2 73 | buildTarget: Standalone 74 | maxTextureSize: 2048 75 | resizeAlgorithm: 0 76 | textureFormat: -1 77 | textureCompression: 1 78 | compressionQuality: 50 79 | crunchedCompression: 0 80 | allowsAlphaSplitting: 0 81 | overridden: 0 82 | androidETC2FallbackOverride: 0 83 | - serializedVersion: 2 84 | buildTarget: Windows Store Apps 85 | maxTextureSize: 2048 86 | resizeAlgorithm: 0 87 | textureFormat: -1 88 | textureCompression: 1 89 | compressionQuality: 50 90 | crunchedCompression: 0 91 | allowsAlphaSplitting: 0 92 | overridden: 0 93 | androidETC2FallbackOverride: 0 94 | - serializedVersion: 2 95 | buildTarget: iPhone 96 | maxTextureSize: 2048 97 | resizeAlgorithm: 0 98 | textureFormat: -1 99 | textureCompression: 1 100 | compressionQuality: 50 101 | crunchedCompression: 0 102 | allowsAlphaSplitting: 0 103 | overridden: 0 104 | androidETC2FallbackOverride: 0 105 | spriteSheet: 106 | serializedVersion: 2 107 | sprites: [] 108 | outline: [] 109 | physicsShape: [] 110 | bones: [] 111 | spriteID: 112 | internalID: 0 113 | vertices: [] 114 | indices: 115 | edges: [] 116 | weights: [] 117 | secondaryTextures: [] 118 | spritePackingTag: 119 | pSDRemoveMatte: 0 120 | pSDShowRemoveMatteOption: 0 121 | userData: 122 | assetBundleName: 123 | assetBundleVariant: 124 | -------------------------------------------------------------------------------- /Samples~/MeshToSDF-sample/SceneAssets/StaticMesh/Sky-Unlit.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 8 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: Sky-Unlit 11 | m_Shader: {fileID: 10755, guid: 0000000000000000f000000000000000, type: 0} 12 | m_Parent: {fileID: 0} 13 | m_ModifiedSerializedProperties: 0 14 | m_ValidKeywords: [] 15 | m_InvalidKeywords: [] 16 | m_LightmapFlags: 4 17 | m_EnableInstancingVariants: 0 18 | m_DoubleSidedGI: 0 19 | m_CustomRenderQueue: -1 20 | stringTagMap: {} 21 | disabledShaderPasses: [] 22 | m_LockedProperties: 23 | m_SavedProperties: 24 | serializedVersion: 3 25 | m_TexEnvs: 26 | - _BumpMap: 27 | m_Texture: {fileID: 0} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - _DetailAlbedoMap: 31 | m_Texture: {fileID: 0} 32 | m_Scale: {x: 1, y: 1} 33 | m_Offset: {x: 0, y: 0} 34 | - _DetailMask: 35 | m_Texture: {fileID: 0} 36 | m_Scale: {x: 1, y: 1} 37 | m_Offset: {x: 0, y: 0} 38 | - _DetailNormalMap: 39 | m_Texture: {fileID: 0} 40 | m_Scale: {x: 1, y: 1} 41 | m_Offset: {x: 0, y: 0} 42 | - _EmissionMap: 43 | m_Texture: {fileID: 0} 44 | m_Scale: {x: 1, y: 1} 45 | m_Offset: {x: 0, y: 0} 46 | - _MainTex: 47 | m_Texture: {fileID: 0} 48 | m_Scale: {x: 1, y: 1} 49 | m_Offset: {x: 0, y: 0} 50 | - _MetallicGlossMap: 51 | m_Texture: {fileID: 0} 52 | m_Scale: {x: 1, y: 1} 53 | m_Offset: {x: 0, y: 0} 54 | - _OcclusionMap: 55 | m_Texture: {fileID: 0} 56 | m_Scale: {x: 1, y: 1} 57 | m_Offset: {x: 0, y: 0} 58 | - _ParallaxMap: 59 | m_Texture: {fileID: 0} 60 | m_Scale: {x: 1, y: 1} 61 | m_Offset: {x: 0, y: 0} 62 | m_Ints: [] 63 | m_Floats: 64 | - _BumpScale: 1 65 | - _Cutoff: 0.5 66 | - _DetailNormalMapScale: 1 67 | - _DstBlend: 0 68 | - _GlossMapScale: 1 69 | - _Glossiness: 0.5 70 | - _GlossyReflections: 1 71 | - _Metallic: 0 72 | - _Mode: 0 73 | - _OcclusionStrength: 1 74 | - _Parallax: 0.02 75 | - _SmoothnessTextureChannel: 0 76 | - _SpecularHighlights: 1 77 | - _SrcBlend: 1 78 | - _UVSec: 0 79 | - _ZWrite: 1 80 | m_Colors: 81 | - _Color: {r: 0.23921567, g: 1, b: 0.5529412, a: 1} 82 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 83 | m_BuildTextureStacks: [] 84 | -------------------------------------------------------------------------------- /Samples~/MeshToSDF-sample/SceneAssets/StaticMesh/Sky-Unlit.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 96b7f3436aa1f6a4988dde414c10748c 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Samples~/MeshToSDF-sample/SceneAssets/StaticMesh/capsule.anim: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!74 &7400000 4 | AnimationClip: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_Name: capsule 10 | serializedVersion: 7 11 | m_Legacy: 0 12 | m_Compressed: 0 13 | m_UseHighQualityCurve: 1 14 | m_RotationCurves: [] 15 | m_CompressedRotationCurves: [] 16 | m_EulerCurves: 17 | - curve: 18 | serializedVersion: 2 19 | m_Curve: 20 | - serializedVersion: 3 21 | time: 0 22 | value: {x: 0, y: 0, z: 0} 23 | inSlope: {x: 0, y: 0, z: 0} 24 | outSlope: {x: 0, y: 0, z: 0} 25 | tangentMode: 0 26 | weightedMode: 0 27 | inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} 28 | outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} 29 | - serializedVersion: 3 30 | time: 0.5 31 | value: {x: 90, y: 0, z: 0} 32 | inSlope: {x: 0, y: 0, z: 0} 33 | outSlope: {x: 0, y: 0, z: 0} 34 | tangentMode: 0 35 | weightedMode: 0 36 | inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} 37 | outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} 38 | - serializedVersion: 3 39 | time: 1 40 | value: {x: 0, y: 0, z: 0} 41 | inSlope: {x: 0, y: 0, z: 0} 42 | outSlope: {x: 0, y: 0, z: 0} 43 | tangentMode: 0 44 | weightedMode: 0 45 | inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} 46 | outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} 47 | m_PreInfinity: 2 48 | m_PostInfinity: 2 49 | m_RotationOrder: 4 50 | path: 51 | m_PositionCurves: [] 52 | m_ScaleCurves: [] 53 | m_FloatCurves: [] 54 | m_PPtrCurves: [] 55 | m_SampleRate: 60 56 | m_WrapMode: 0 57 | m_Bounds: 58 | m_Center: {x: 0, y: 0, z: 0} 59 | m_Extent: {x: 0, y: 0, z: 0} 60 | m_ClipBindingConstant: 61 | genericBindings: 62 | - serializedVersion: 2 63 | path: 0 64 | attribute: 4 65 | script: {fileID: 0} 66 | typeID: 4 67 | customType: 4 68 | isPPtrCurve: 0 69 | isIntCurve: 0 70 | pptrCurveMapping: [] 71 | m_AnimationClipSettings: 72 | serializedVersion: 2 73 | m_AdditiveReferencePoseClip: {fileID: 0} 74 | m_AdditiveReferencePoseTime: 0 75 | m_StartTime: 0 76 | m_StopTime: 1 77 | m_OrientationOffsetY: 0 78 | m_Level: 0 79 | m_CycleOffset: 0 80 | m_HasAdditiveReferencePose: 0 81 | m_LoopTime: 1 82 | m_LoopBlend: 0 83 | m_LoopBlendOrientation: 0 84 | m_LoopBlendPositionY: 0 85 | m_LoopBlendPositionXZ: 0 86 | m_KeepOriginalOrientation: 0 87 | m_KeepOriginalPositionY: 1 88 | m_KeepOriginalPositionXZ: 0 89 | m_HeightFromFeet: 0 90 | m_Mirror: 0 91 | m_EditorCurves: 92 | - curve: 93 | serializedVersion: 2 94 | m_Curve: 95 | - serializedVersion: 3 96 | time: 0 97 | value: 0 98 | inSlope: 0 99 | outSlope: 0 100 | tangentMode: 136 101 | weightedMode: 0 102 | inWeight: 0.33333334 103 | outWeight: 0.33333334 104 | - serializedVersion: 3 105 | time: 0.5 106 | value: 90 107 | inSlope: 0 108 | outSlope: 0 109 | tangentMode: 136 110 | weightedMode: 0 111 | inWeight: 0.33333334 112 | outWeight: 0.33333334 113 | - serializedVersion: 3 114 | time: 1 115 | value: 0 116 | inSlope: 0 117 | outSlope: 0 118 | tangentMode: 136 119 | weightedMode: 0 120 | inWeight: 0.33333334 121 | outWeight: 0.33333334 122 | m_PreInfinity: 2 123 | m_PostInfinity: 2 124 | m_RotationOrder: 4 125 | attribute: localEulerAnglesRaw.x 126 | path: 127 | classID: 4 128 | script: {fileID: 0} 129 | - curve: 130 | serializedVersion: 2 131 | m_Curve: 132 | - serializedVersion: 3 133 | time: 0 134 | value: 0 135 | inSlope: 0 136 | outSlope: 0 137 | tangentMode: 136 138 | weightedMode: 0 139 | inWeight: 0.33333334 140 | outWeight: 0.33333334 141 | - serializedVersion: 3 142 | time: 0.5 143 | value: 0 144 | inSlope: 0 145 | outSlope: 0 146 | tangentMode: 136 147 | weightedMode: 0 148 | inWeight: 0.33333334 149 | outWeight: 0.33333334 150 | - serializedVersion: 3 151 | time: 1 152 | value: 0 153 | inSlope: 0 154 | outSlope: 0 155 | tangentMode: 136 156 | weightedMode: 0 157 | inWeight: 0.33333334 158 | outWeight: 0.33333334 159 | m_PreInfinity: 2 160 | m_PostInfinity: 2 161 | m_RotationOrder: 4 162 | attribute: localEulerAnglesRaw.y 163 | path: 164 | classID: 4 165 | script: {fileID: 0} 166 | - curve: 167 | serializedVersion: 2 168 | m_Curve: 169 | - serializedVersion: 3 170 | time: 0 171 | value: 0 172 | inSlope: 0 173 | outSlope: 0 174 | tangentMode: 136 175 | weightedMode: 0 176 | inWeight: 0.33333334 177 | outWeight: 0.33333334 178 | - serializedVersion: 3 179 | time: 0.5 180 | value: 0 181 | inSlope: 0 182 | outSlope: 0 183 | tangentMode: 136 184 | weightedMode: 0 185 | inWeight: 0.33333334 186 | outWeight: 0.33333334 187 | - serializedVersion: 3 188 | time: 1 189 | value: 0 190 | inSlope: 0 191 | outSlope: 0 192 | tangentMode: 136 193 | weightedMode: 0 194 | inWeight: 0.33333334 195 | outWeight: 0.33333334 196 | m_PreInfinity: 2 197 | m_PostInfinity: 2 198 | m_RotationOrder: 4 199 | attribute: localEulerAnglesRaw.z 200 | path: 201 | classID: 4 202 | script: {fileID: 0} 203 | m_EulerEditorCurves: 204 | - curve: 205 | serializedVersion: 2 206 | m_Curve: [] 207 | m_PreInfinity: 2 208 | m_PostInfinity: 2 209 | m_RotationOrder: 4 210 | attribute: m_LocalEulerAngles.x 211 | path: 212 | classID: 4 213 | script: {fileID: 0} 214 | - curve: 215 | serializedVersion: 2 216 | m_Curve: [] 217 | m_PreInfinity: 2 218 | m_PostInfinity: 2 219 | m_RotationOrder: 4 220 | attribute: m_LocalEulerAngles.y 221 | path: 222 | classID: 4 223 | script: {fileID: 0} 224 | - curve: 225 | serializedVersion: 2 226 | m_Curve: [] 227 | m_PreInfinity: 2 228 | m_PostInfinity: 2 229 | m_RotationOrder: 4 230 | attribute: m_LocalEulerAngles.z 231 | path: 232 | classID: 4 233 | script: {fileID: 0} 234 | m_HasGenericRootTransform: 1 235 | m_HasMotionFloatCurves: 0 236 | m_Events: [] 237 | -------------------------------------------------------------------------------- /Samples~/MeshToSDF-sample/SceneAssets/StaticMesh/capsule.anim.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6f5c7f25b7ef34343b44c32b95154531 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 7400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /THIRD PARTY NOTICES.md: -------------------------------------------------------------------------------- 1 | This package contains third-party software components governed by the license(s) indicated below: 2 | --------- 3 | 4 | [TressFXSDF.hlsl](_External/TressFXSDF.hlsl) from [TressFX](https://github.com/GPUOpen-Effects/TressFX) 5 | 6 | License Type: MIT 7 | 8 | Copyright (c) 2017 Advanced Micro Devices, Inc. All rights reserved. 9 | 10 | Permission is hereby granted, free of charge, to any person obtaining a copy 11 | of this software and associated documentation files (the "Software"), to deal 12 | in the Software without restriction, including without limitation the rights 13 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | copies of the Software, and to permit persons to whom the Software is 15 | furnished to do so, subject to the following conditions: 16 | 17 | The above copyright notice and this permission notice shall be included in 18 | all copies or substantial portions of the Software. 19 | 20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 21 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 23 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 24 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 25 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 26 | THE SOFTWARE. 27 | -------------------------------------------------------------------------------- /THIRD PARTY NOTICES.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b50af1a890d9bf449a6a7351b65097c4 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /_External.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 055d91f7ef488814f96b8f6e19b9ff07 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /_External/TressFXSDF.hlsl: -------------------------------------------------------------------------------- 1 | // Almost all code in this file from AMDs TressFx, MIT license - big thanks for sharing! 2 | // https://github.com/GPUOpen-Effects/TressFX 3 | // Notable additon in DistancePointToEdge() to fix numerical error artifacts. 4 | 5 | // Copyright (c) 2017 Advanced Micro Devices, Inc. All rights reserved. 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | // 25 | 26 | float3 g_Origin; 27 | float g_CellSize; 28 | int g_NumCellsX; 29 | int g_NumCellsY; 30 | int g_NumCellsZ; 31 | 32 | #define MARGIN g_CellSize 33 | #define GRID_MARGIN int3(1, 1, 1) 34 | 35 | //Actually contains floats; make sure to use asfloat() when accessing. uint is used to allow atomics. 36 | RWStructuredBuffer g_SignedDistanceField; 37 | 38 | uint FloatFlip3(float fl) 39 | { 40 | uint f = asuint(fl); 41 | return (f << 1) | (f >> 31); //Rotate sign bit to least significant 42 | } 43 | 44 | uint IFloatFlip3(uint f2) 45 | { 46 | return (f2 >> 1) | (f2 << 31); 47 | } 48 | 49 | int3 GetLocalCellPositionFromIndex(uint localCellIndex, int3 cellsPerDimensionLocal) 50 | { 51 | uint cellsPerLine = (uint)cellsPerDimensionLocal.x; 52 | uint cellsPerPlane = (uint)(cellsPerDimensionLocal.x * cellsPerDimensionLocal.y); 53 | 54 | uint numPlanesZ = localCellIndex / cellsPerPlane; 55 | uint remainder = localCellIndex % cellsPerPlane; 56 | 57 | uint numLinesY = remainder / cellsPerLine; 58 | uint numCellsX = remainder % cellsPerLine; 59 | 60 | return int3((int)numCellsX, (int)numLinesY, (int)numPlanesZ); 61 | } 62 | 63 | float3 GetSdfCellPosition(int3 gridPosition) 64 | { 65 | float3 cellCenter = float3(gridPosition.x, gridPosition.y, gridPosition.z); 66 | cellCenter += 0.5; 67 | cellCenter *= g_CellSize; 68 | cellCenter += g_Origin.xyz; 69 | 70 | return cellCenter; 71 | } 72 | 73 | // One thread for each cell. 74 | [numthreads(THREAD_GROUP_SIZE, 1, 1)] 75 | void Initialize(uint GIndex : SV_GroupIndex, uint3 GId : SV_GroupID, uint3 DTid : SV_DispatchThreadID) 76 | { 77 | int sdfCellIndex = GetVoxelIndex(GIndex, GId); 78 | if(sdfCellIndex >= _VoxelResolution.w) 79 | return; 80 | 81 | g_SignedDistanceField[sdfCellIndex] = FloatFlip3(INITIAL_DISTANCE); 82 | } 83 | 84 | // One thread per each cell. 85 | [numthreads(THREAD_GROUP_SIZE, 1, 1)] 86 | void Finalize(uint GIndex : SV_GroupIndex, uint3 GId : SV_GroupID, uint3 DTid : SV_DispatchThreadID) 87 | { 88 | int sdfCellIndex = GetVoxelIndex(GIndex, GId); 89 | if (sdfCellIndex >= _VoxelResolution.w) 90 | return; 91 | 92 | uint distance = g_SignedDistanceField[sdfCellIndex]; 93 | g_SignedDistanceField[sdfCellIndex] = IFloatFlip3(distance); 94 | } 95 | 96 | // Get SDF cell index coordinates (x, y and z) from a point position in world space 97 | int3 GetSdfCoordinates(float3 positionInWorld) 98 | { 99 | float3 sdfPosition = (positionInWorld - g_Origin.xyz) / g_CellSize; 100 | 101 | int3 result; 102 | result.x = (int)sdfPosition.x; 103 | result.y = (int)sdfPosition.y; 104 | result.z = (int)sdfPosition.z; 105 | 106 | return result; 107 | } 108 | 109 | int GetSdfCellIndex(int3 gridPosition) 110 | { 111 | int cellsPerLine = g_NumCellsX; 112 | int cellsPerPlane = g_NumCellsX * g_NumCellsY; 113 | 114 | return cellsPerPlane*gridPosition.z + cellsPerLine*gridPosition.y + gridPosition.x; 115 | } 116 | 117 | float DistancePointToEdge(float3 p, float3 x0, float3 x1, out float3 n) 118 | { 119 | //demo-team-begin 120 | // With finite numerical precision dist(P, AB) != dist(P, BA) 121 | // The above causes lots of issues with negative distance to edges winning over 122 | // positive distances to edges outside of the mesh, by being randomly ever so slightly smaller. 123 | // Fix by making sure they have a stable ordering (simplified to testing .x only) and then relying on the fact, 124 | // that the function encoding to uint gives preference to positive values. 125 | if (x0.x > x1.x) 126 | { 127 | float3 temp = x0; 128 | x0 = x1; 129 | x1 = temp; 130 | } 131 | //demo-team-end 132 | 133 | float3 x10 = x1 - x0; 134 | 135 | float t = dot(x1 - p, x10) / dot(x10, x10); 136 | t = max(0.0f, min(t, 1.0f)); 137 | 138 | float3 a = p - (t*x0 + (1.0f - t)*x1); 139 | float d = length(a); 140 | n = a / (d + 1e-30f); 141 | 142 | return d; 143 | } 144 | 145 | // Check if p is in the positive or negative side of triangle (x0, x1, x2) 146 | // Positive side is where the normal vector of triangle ( (x1-x0) x (x2-x0) ) is pointing to. 147 | float SignedDistancePointToTriangle(float3 p, float3 x0, float3 x1, float3 x2) 148 | { 149 | float d = 0; 150 | float3 x02 = x0 - x2; 151 | float l0 = length(x02) + 1e-30f; 152 | x02 = x02 / l0; 153 | float3 x12 = x1 - x2; 154 | float l1 = dot(x12, x02); 155 | x12 = x12 - l1*x02; 156 | float l2 = length(x12) + 1e-30f; 157 | x12 = x12 / l2; 158 | float3 px2 = p - x2; 159 | 160 | float b = dot(x12, px2) / l2; 161 | float a = (dot(x02, px2) - l1*b) / l0; 162 | float c = 1 - a - b; 163 | 164 | // normal vector of triangle. Don't need to normalize this yet. 165 | float3 nTri = cross((x1 - x0), (x2 - x0)); 166 | float3 n; 167 | 168 | float tol = 1e-8f; 169 | 170 | if (a >= -tol && b >= -tol && c >= -tol) 171 | { 172 | n = p - (a*x0 + b*x1 + c*x2); 173 | d = length(n); 174 | 175 | float3 n1 = n / d; 176 | float3 n2 = nTri / (length(nTri) + 1e-30f); // if d == 0 177 | 178 | n = (d > 0) ? n1 : n2; 179 | } 180 | else 181 | { 182 | float3 n_12; 183 | float3 n_02; 184 | d = DistancePointToEdge(p, x0, x1, n); 185 | 186 | float d12 = DistancePointToEdge(p, x1, x2, n_12); 187 | float d02 = DistancePointToEdge(p, x0, x2, n_02); 188 | 189 | d = min(d, d12); 190 | d = min(d, d02); 191 | 192 | n = (d == d12) ? n_12 : n; 193 | n = (d == d02) ? n_02 : n; 194 | } 195 | 196 | #ifdef SIGNED 197 | d = (dot(p - x0, nTri) < 0.f) ? -d : d; 198 | #endif 199 | 200 | return d; 201 | } 202 | 203 | // One thread per each triangle 204 | [numthreads(THREAD_GROUP_SIZE, 1, 1)] 205 | void SplatTriangleDistances(uint GIndex : SV_GroupIndex, uint3 GId : SV_GroupID, uint3 DTid : SV_DispatchThreadID) 206 | { 207 | uint triangleIndex = GId.x * THREAD_GROUP_SIZE + GIndex; 208 | 209 | //demo-team-begin 210 | triangleIndex *= 3; 211 | float3 tri0 = GetPos(GetIndex(triangleIndex + 0)); 212 | float3 tri1 = GetPos(GetIndex(triangleIndex + 1)); 213 | float3 tri2 = GetPos(GetIndex(triangleIndex + 2)); 214 | 215 | tri0 = mul(_WorldToLocal, float4(tri0, 1)).xyz; 216 | tri1 = mul(_WorldToLocal, float4(tri1, 1)).xyz; 217 | tri2 = mul(_WorldToLocal, float4(tri2, 1)).xyz; 218 | //demo-team-end 219 | 220 | float3 aabbMin = min(tri0, min(tri1, tri2)) - float3(MARGIN, MARGIN, MARGIN); 221 | float3 aabbMax = max(tri0, max(tri1, tri2)) + float3(MARGIN, MARGIN, MARGIN); 222 | 223 | int3 gridMin = GetSdfCoordinates(aabbMin) - GRID_MARGIN; 224 | int3 gridMax = GetSdfCoordinates(aabbMax) + GRID_MARGIN; 225 | 226 | gridMin.x = max(0, min(gridMin.x, g_NumCellsX - 1)); 227 | gridMin.y = max(0, min(gridMin.y, g_NumCellsY - 1)); 228 | gridMin.z = max(0, min(gridMin.z, g_NumCellsZ - 1)); 229 | 230 | gridMax.x = max(0, min(gridMax.x, g_NumCellsX - 1)); 231 | gridMax.y = max(0, min(gridMax.y, g_NumCellsY - 1)); 232 | gridMax.z = max(0, min(gridMax.z, g_NumCellsZ - 1)); 233 | 234 | for (int z = gridMin.z; z <= gridMax.z; ++z) 235 | for (int y = gridMin.y; y <= gridMax.y; ++y) 236 | for (int x = gridMin.x; x <= gridMax.x; ++x) 237 | { 238 | int3 gridCellCoordinate = int3(x, y, z); 239 | int gridCellIndex = GetSdfCellIndex(gridCellCoordinate); 240 | float3 cellPosition = GetSdfCellPosition(gridCellCoordinate); 241 | 242 | float distance = SignedDistancePointToTriangle(cellPosition, tri0, tri1, tri2); 243 | //distance -= MARGIN; 244 | uint distanceAsUint = FloatFlip3(distance); 245 | InterlockedMin(g_SignedDistanceField[gridCellIndex], distanceAsUint); 246 | } 247 | } -------------------------------------------------------------------------------- /_External/TressFXSDF.hlsl.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 34b9828a85f4cfd45963b8f546541db1 3 | ComputeShaderImporter: 4 | externalObjects: {} 5 | currentAPIMask: 4 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /catalog-info.yaml: -------------------------------------------------------------------------------- 1 | # For more information about the available options please visit: http://go/backstage (VPN required) 2 | apiVersion: backstage.io/v1alpha1 3 | kind: Component 4 | metadata: 5 | annotations: 6 | github.com/project-slug: Unity-Technologies/mesh-to-sdf 7 | name: mesh-to-sdf 8 | description: "A real-time SDF generator. Use a Mesh or a dynamically deforming SkinnedMesh as input to generate a 3D SDF texture." 9 | labels: 10 | costcenter: "3020" 11 | tags: 12 | - planned-public 13 | links: 14 | - url: https://unity.slack.com/messages/C070XDMU0/ 15 | title: "#marketing-demo-team" 16 | icon: chat 17 | spec: 18 | type: unity-package 19 | lifecycle: production 20 | owner: unity-technologies/unity-demo-team 21 | -------------------------------------------------------------------------------- /catalog-info.yaml.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 525d0ea077affe9469b0f8ab9a4a471f 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "com.unity.demoteam.mesh-to-sdf", 3 | "displayName": "Demo Team Mesh to SDF", 4 | "version": "1.1.0", 5 | "unity": "2021.2", 6 | "description": "A real-time SDF generator. Use a Mesh or a dynamically deforming SkinnedMesh as input to generate a 3D SDF texture.", 7 | "dependencies": { 8 | }, 9 | "samples": [ 10 | { 11 | "displayName": "MeshToSDF sample", 12 | "description": "Basic scenes with MeshToSDF generating SDFs for a skinned mesh, and a moving static mesh.", 13 | "path": "Samples~/MeshToSDF-sample" 14 | } 15 | ] 16 | } 17 | -------------------------------------------------------------------------------- /package.json.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 43852dc92813efa49886f24fe8c74b87 3 | PackageManifestImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | --------------------------------------------------------------------------------