├── .gitattributes ├── .gitignore ├── LICENSE ├── LICENSE.meta ├── README.md ├── README.md.meta ├── Runtime.meta ├── Runtime ├── TriangleSplatRenderer.cs ├── TriangleSplatRenderer.cs.meta ├── TriangleSplattingUnity.Runtime.asmdef └── TriangleSplattingUnity.Runtime.asmdef.meta ├── Samples~ └── BasicUsage │ ├── TriangleSplattingViewer.prefab │ └── TrianglesUnlitURP.mat ├── Shaders.meta ├── Shaders ├── TrianglesUnlit.shadergraph └── TrianglesUnlit.shadergraph.meta ├── docs.meta ├── docs ├── images.meta └── images │ ├── triangle_splat_example.png │ └── triangle_splat_example.png.meta ├── package.json └── package.json.meta /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # This .gitignore file should be placed at the root of your Unity project directory 2 | # 3 | # Get latest from https://github.com/github/gitignore/blob/main/Unity.gitignore 4 | # 5 | /[Ll]ibrary/ 6 | /[Tt]emp/ 7 | /[Oo]bj/ 8 | /[Bb]uild/ 9 | /[Bb]uilds/ 10 | /[Ll]ogs/ 11 | /[Uu]ser[Ss]ettings/ 12 | 13 | # MemoryCaptures can get excessive in size. 14 | # They also could contain extremely sensitive data 15 | /[Mm]emoryCaptures/ 16 | 17 | # Recordings can get excessive in size 18 | /[Rr]ecordings/ 19 | 20 | # Uncomment this line if you wish to ignore the asset store tools plugin 21 | # /[Aa]ssets/AssetStoreTools* 22 | 23 | # Autogenerated Jetbrains Rider plugin 24 | /[Aa]ssets/Plugins/Editor/JetBrains* 25 | 26 | # Visual Studio cache directory 27 | .vs/ 28 | 29 | # Gradle cache directory 30 | .gradle/ 31 | 32 | # Autogenerated VS/MD/Consulo solution and project files 33 | ExportedObj/ 34 | .consulo/ 35 | *.csproj 36 | *.unityproj 37 | *.sln 38 | *.suo 39 | *.tmp 40 | *.user 41 | *.userprefs 42 | *.pidb 43 | *.booproj 44 | *.svd 45 | *.pdb 46 | *.mdb 47 | *.opendb 48 | *.VC.db 49 | 50 | # Unity3D generated meta files 51 | *.pidb.meta 52 | *.pdb.meta 53 | *.mdb.meta 54 | 55 | # Unity3D generated file on crash reports 56 | sysinfo.txt 57 | 58 | # Builds 59 | *.apk 60 | *.aab 61 | *.app 62 | 63 | # Crashlytics generated file 64 | crashlytics-build.properties 65 | 66 | # Packed Addressables 67 | /[Aa]ssets/[Aa]ddressable[Aa]ssets[Dd]ata/*/*.bin* 68 | 69 | # Temporary auto-generated Android Assets 70 | /[Aa]ssets/[Ss]treamingAssets/aa.meta 71 | /[Aa]ssets/[Ss]treamingAssets/aa/* 72 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2025 KillianCartelier 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /LICENSE.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0e38bb03a69f6c04c816b7decef0147a 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # UnityTriangleSplatting 2 | 3 | ## Introduction 4 | 5 | **UnityTriangleSplatting** is a Unity package for visualizing triangle splats from COFF files, inspired by the [Triangle Splatting](https://github.com/trianglesplatting/triangle-splatting) project. It supports chunked loading, frustum culling, and optional mesh collider generation for interactive exploration of large triangle datasets. 6 | 7 | ## Features 8 | 9 | - Load and render `.off` (COFF) triangle files 10 | - Chunk-based loading for performance 11 | - Frustum culling for real-time optimization 12 | - Optional mesh collider generation 13 | - Vertex color support for per-vertex shading 14 | 15 | ## Example 16 | 17 | ![Triangle Splatting Example](docs/images/triangle_splat_example.png) 18 | 19 | > 💡 You can drag and drop the TriangleSplatRenderer prefab in your scene and your file will be loaded at runtime. 20 | 21 | ## Installation 22 | 23 | ### Option 1: Clone the repository 24 | 25 | 1. Clone this repository via UPM: 26 | `Install package from GIT url -> https://github.com/KillianCartelier/UnityTriangleSplatting.git` 27 | 2. Install Samples. 28 | 29 | ### Option 2: Import the Unity package 30 | 31 | 1. Download the `TriangleSplatUnity.unitypackage` file from the repository. 32 | 2. In Unity, go to `Assets > Import Package > Custom Package...` 33 | 3. Select the downloaded `.unitypackage` file and import all assets. 34 | 35 | ## Usage 36 | 1. Set your Unity Project in Gamma Color. (Thanks BarnabasTakacs for letting me know about this issue) 37 | 2. Drag and drop the TriangleSplatRenderer prefab in your scene. 38 | 3. Set the path to your `.off` file. 39 | 5. Press Play to visualize the triangle splats in the scene. 40 | 41 | ## Requirements 42 | 43 | - Unity 2022.3+ (tested with Unity 6 beta) 44 | - A COFF file with triangle and color data 45 | 46 | ## To-Do 47 | 48 | - [ ] Runtime `.off` file loader via UI 49 | - [ ] Support for mesh Export 50 | 51 | ## License 52 | 53 | This project is licensed under the MIT License. 54 | 55 | ## Contributing 56 | 57 | Contributions are welcome! Feel free to: 58 | - Open issues for bugs or suggestions 59 | - Submit pull requests with improvements 60 | - Share your use cases and feedback 61 | -------------------------------------------------------------------------------- /README.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e23985e4b22b4d848b61535a47ee22c1 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Runtime.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cd38186b8009b644abf074d3370c11ad 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Runtime/TriangleSplatRenderer.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using System.Globalization; 4 | using System.IO; 5 | using UnityEngine; 6 | 7 | public class TriangleSplatRenderer : MonoBehaviour 8 | { 9 | [Header("OFF File")] 10 | public string coffFilePath = "Assets/Models/your_model.off"; 11 | public Material triangleMaterial; 12 | 13 | [Header("Chunking")] 14 | public float chunkSize = 5f; 15 | public int maxTrianglesPerChunk = 10000; 16 | 17 | [Header("Culling")] 18 | public float cullingDistance = 50f; 19 | public float updateInterval = 0.5f; 20 | 21 | private List chunks = new List(); 22 | private Camera mainCamera; 23 | public bool GenerateColliders = false; 24 | public Vector3 InitRotation = new Vector3(151, 0, 0); 25 | void Start() 26 | { 27 | mainCamera = Camera.main; 28 | StartCoroutine(LoadCOFFInChunks()); 29 | StartCoroutine(UpdateChunkVisibility()); 30 | } 31 | 32 | IEnumerator LoadCOFFInChunks() 33 | { 34 | if (!File.Exists(coffFilePath)) 35 | { 36 | Debug.LogError("OFF File Not Found : " + coffFilePath); 37 | yield break; 38 | } 39 | 40 | string[] lines = File.ReadAllLines(coffFilePath); 41 | if (!lines[0].Trim().StartsWith("COFF")) 42 | { 43 | Debug.LogError("COFF Invalid"); 44 | yield break; 45 | } 46 | 47 | string[] counts = lines[1].Split(); 48 | int vertexCount = int.Parse(counts[0]); 49 | int faceCount = int.Parse(counts[1]); 50 | 51 | List originalVertices = new List(); 52 | for (int i = 0; i < vertexCount; i++) 53 | { 54 | string[] parts = lines[2 + i].Split(); 55 | float x = float.Parse(parts[0], CultureInfo.InvariantCulture); 56 | float y = float.Parse(parts[1], CultureInfo.InvariantCulture); 57 | float z = float.Parse(parts[2], CultureInfo.InvariantCulture); 58 | originalVertices.Add(new Vector3(x, y, z)); 59 | } 60 | 61 | Dictionary> chunkMap = new(); 62 | 63 | for (int i = 0; i < faceCount; i++) 64 | { 65 | string[] parts = lines[2 + vertexCount + i].Split(); 66 | if (int.Parse(parts[0]) != 3) continue; 67 | 68 | int i0 = int.Parse(parts[1]); 69 | int i1 = int.Parse(parts[2]); 70 | int i2 = int.Parse(parts[3]); 71 | 72 | float r = float.Parse(parts[4]) / 255f; 73 | float g = float.Parse(parts[5]) / 255f; 74 | float b = float.Parse(parts[6]) / 255f; 75 | float a = float.Parse(parts[7]) / 255f; 76 | Color faceColor = new Color(r, g, b, a); 77 | 78 | Vector3 v0 = originalVertices[i0]; 79 | Vector3 v1 = originalVertices[i1]; 80 | Vector3 v2 = originalVertices[i2]; 81 | 82 | Vector3 center = (v0 + v1 + v2) / 3f; 83 | Vector3Int chunkCoord = new Vector3Int( 84 | Mathf.FloorToInt(center.x / chunkSize), 85 | Mathf.FloorToInt(center.y / chunkSize), 86 | Mathf.FloorToInt(center.z / chunkSize) 87 | ); 88 | 89 | if (!chunkMap.ContainsKey(chunkCoord)) 90 | chunkMap[chunkCoord] = new List<(Vector3, Vector3, Vector3, Color)>(); 91 | 92 | chunkMap[chunkCoord].Add((v0, v1, v2, faceColor)); 93 | 94 | if (i % 10000 == 0) 95 | { 96 | float progress = (float)i / faceCount * 100f; 97 | Debug.Log($"Loading COFF : {progress:F1}% ({i}/{faceCount} faces)"); 98 | yield return null; 99 | } 100 | } 101 | 102 | foreach (var kvp in chunkMap) 103 | { 104 | GameObject chunk = new GameObject($"Chunk_{kvp.Key}"); 105 | chunk.transform.parent = this.transform; 106 | 107 | List verts = new(); 108 | List colors = new(); 109 | List tris = new(); 110 | 111 | foreach (var (v0, v1, v2, col) in kvp.Value) 112 | { 113 | int baseIndex = verts.Count; 114 | verts.Add(v0); verts.Add(v1); verts.Add(v2); 115 | colors.Add(col); colors.Add(col); colors.Add(col); 116 | tris.Add(baseIndex); tris.Add(baseIndex + 1); tris.Add(baseIndex + 2); 117 | } 118 | 119 | Mesh mesh = new Mesh(); 120 | mesh.indexFormat = UnityEngine.Rendering.IndexFormat.UInt32; 121 | mesh.SetVertices(verts); 122 | mesh.SetTriangles(tris, 0); 123 | mesh.SetColors(colors); 124 | mesh.RecalculateNormals(); 125 | 126 | var mf = chunk.AddComponent(); 127 | var mr = chunk.AddComponent(); 128 | mf.mesh = mesh; 129 | mr.material = triangleMaterial; 130 | 131 | chunks.Add(chunk); 132 | if (GenerateColliders) 133 | chunk.AddComponent(); 134 | } 135 | 136 | Debug.Log($"Loading ended : {chunks.Count} chunks created."); 137 | this.transform.localEulerAngles = InitRotation; 138 | } 139 | 140 | IEnumerator UpdateChunkVisibility() 141 | { 142 | while (true) 143 | { 144 | if (mainCamera == null) 145 | mainCamera = Camera.main; 146 | 147 | Plane[] frustumPlanes = GeometryUtility.CalculateFrustumPlanes(mainCamera); 148 | 149 | foreach (var chunk in chunks) 150 | { 151 | 152 | Renderer renderer = chunk.GetComponentInChildren(); 153 | if (renderer != null) 154 | { 155 | Bounds worldBounds = renderer.bounds; 156 | bool isVisible = GeometryUtility.TestPlanesAABB(frustumPlanes, worldBounds); 157 | float distance = Vector3.Distance(mainCamera.transform.position, worldBounds.center); 158 | chunk.SetActive(isVisible && distance < cullingDistance); 159 | } 160 | 161 | } 162 | 163 | yield return new WaitForSeconds(updateInterval); 164 | } 165 | } 166 | 167 | } 168 | -------------------------------------------------------------------------------- /Runtime/TriangleSplatRenderer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 84fae56a2a318964686687a594726a1d -------------------------------------------------------------------------------- /Runtime/TriangleSplattingUnity.Runtime.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "TriangleSplattingUnity.Runtime", 3 | "rootNamespace": "TriangleSplattingUnity", 4 | "references": [], 5 | "includePlatforms": [], 6 | "excludePlatforms": [], 7 | "allowUnsafeCode": false, 8 | "overrideReferences": false, 9 | "precompiledReferences": [], 10 | "autoReferenced": true, 11 | "defineConstraints": [], 12 | "versionDefines": [], 13 | "noEngineReferences": false 14 | } 15 | -------------------------------------------------------------------------------- /Runtime/TriangleSplattingUnity.Runtime.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ed632bace34dc7043b4d2ac4899e4ef2 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Samples~/BasicUsage/TriangleSplattingViewer.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &941420988883838800 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: 8995123222306876217} 12 | - component: {fileID: 1271575269688476091} 13 | m_Layer: 0 14 | m_Name: TriangleSplattingViewer 15 | m_TagString: Untagged 16 | m_Icon: {fileID: 0} 17 | m_NavMeshLayer: 0 18 | m_StaticEditorFlags: 0 19 | m_IsActive: 1 20 | --- !u!4 &8995123222306876217 21 | Transform: 22 | m_ObjectHideFlags: 0 23 | m_CorrespondingSourceObject: {fileID: 0} 24 | m_PrefabInstance: {fileID: 0} 25 | m_PrefabAsset: {fileID: 0} 26 | m_GameObject: {fileID: 941420988883838800} 27 | serializedVersion: 2 28 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 29 | m_LocalPosition: {x: 5.9827538, y: -3.6027236, z: -1.8347367} 30 | m_LocalScale: {x: 1, y: 1, z: 1} 31 | m_ConstrainProportionsScale: 0 32 | m_Children: [] 33 | m_Father: {fileID: 0} 34 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 35 | --- !u!114 &1271575269688476091 36 | MonoBehaviour: 37 | m_ObjectHideFlags: 0 38 | m_CorrespondingSourceObject: {fileID: 0} 39 | m_PrefabInstance: {fileID: 0} 40 | m_PrefabAsset: {fileID: 0} 41 | m_GameObject: {fileID: 941420988883838800} 42 | m_Enabled: 1 43 | m_EditorHideFlags: 0 44 | m_Script: {fileID: 11500000, guid: 84fae56a2a318964686687a594726a1d, type: 3} 45 | m_Name: 46 | m_EditorClassIdentifier: 47 | coffFilePath: Assets/Models/your_model.off 48 | triangleMaterial: {fileID: 2100000, guid: f98476c073bc76f4396f701020eb6a1e, type: 2} 49 | chunkSize: 5 50 | maxTrianglesPerChunk: 10000 51 | cullingDistance: 50 52 | updateInterval: 0.5 53 | GenerateColliders: 0 54 | InitRotation: {x: 151, y: 0, z: 0} 55 | -------------------------------------------------------------------------------- /Samples~/BasicUsage/TrianglesUnlitURP.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &-4584284222077431840 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: 9 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: TrianglesUnlitURP 24 | m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3} 25 | m_Parent: {fileID: 0} 26 | m_ModifiedSerializedProperties: 0 27 | m_ValidKeywords: [] 28 | m_InvalidKeywords: [] 29 | m_LightmapFlags: 4 30 | m_EnableInstancingVariants: 0 31 | m_DoubleSidedGI: 0 32 | m_CustomRenderQueue: -1 33 | stringTagMap: 34 | RenderType: Opaque 35 | disabledShaderPasses: 36 | - MOTIONVECTORS 37 | m_LockedProperties: 38 | m_SavedProperties: 39 | serializedVersion: 3 40 | m_TexEnvs: 41 | - _BaseMap: 42 | m_Texture: {fileID: 0} 43 | m_Scale: {x: 1, 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: 0} 67 | m_Scale: {x: 1, 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 | - _AddPrecomputedVelocity: 0 100 | - _AlphaClip: 0 101 | - _AlphaToMask: 0 102 | - _Blend: 0 103 | - _BlendModePreserveSpecular: 1 104 | - _BumpScale: 1 105 | - _ClearCoatMask: 0 106 | - _ClearCoatSmoothness: 0 107 | - _Cull: 2 108 | - _Cutoff: 0.5 109 | - _DetailAlbedoMapScale: 1 110 | - _DetailNormalMapScale: 1 111 | - _DstBlend: 0 112 | - _DstBlendAlpha: 0 113 | - _EnvironmentReflections: 1 114 | - _GlossMapScale: 0 115 | - _Glossiness: 0 116 | - _GlossyReflections: 0 117 | - _Metallic: 0 118 | - _OcclusionStrength: 1 119 | - _Parallax: 0.005 120 | - _QueueOffset: 0 121 | - _ReceiveShadows: 1 122 | - _Smoothness: 0.5 123 | - _SmoothnessTextureChannel: 0 124 | - _SpecularHighlights: 1 125 | - _SrcBlend: 1 126 | - _SrcBlendAlpha: 1 127 | - _Surface: 0 128 | - _WorkflowMode: 1 129 | - _ZWrite: 1 130 | m_Colors: 131 | - _BaseColor: {r: 1, g: 1, b: 1, a: 1} 132 | - _Color: {r: 1, g: 1, b: 1, a: 1} 133 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 134 | - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} 135 | m_BuildTextureStacks: [] 136 | m_AllowLocking: 1 137 | -------------------------------------------------------------------------------- /Shaders.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fc8b7e8786f04044fa0fe41cd45c865f 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Shaders/TrianglesUnlit.shadergraph: -------------------------------------------------------------------------------- 1 | { 2 | "m_SGVersion": 3, 3 | "m_Type": "UnityEditor.ShaderGraph.GraphData", 4 | "m_ObjectId": "038a79e0f8364e568082ba6f63635553", 5 | "m_Properties": [ 6 | { 7 | "m_Id": "2bf404383306495181273b9f060b9c8b" 8 | } 9 | ], 10 | "m_Keywords": [], 11 | "m_Dropdowns": [], 12 | "m_CategoryData": [ 13 | { 14 | "m_Id": "fb18270e4bcd4565be93fb327b9f6b1a" 15 | } 16 | ], 17 | "m_Nodes": [ 18 | { 19 | "m_Id": "a33bc175cfb14d50adf8945a0ce92c18" 20 | }, 21 | { 22 | "m_Id": "1a2a5be5ec72440da6f6e8d97df9f9bd" 23 | }, 24 | { 25 | "m_Id": "6b74758e2db0421aa6aa48a6856e3cdd" 26 | }, 27 | { 28 | "m_Id": "a89884bd85bd47908478b7a75e11c394" 29 | }, 30 | { 31 | "m_Id": "8e4cd9e73b61489fa95bd60a8b662b14" 32 | }, 33 | { 34 | "m_Id": "11d9157432ea450c81bfe8d75f0621d1" 35 | }, 36 | { 37 | "m_Id": "671df8ef89664c80b4468c8d82bf1560" 38 | } 39 | ], 40 | "m_GroupDatas": [], 41 | "m_StickyNoteDatas": [], 42 | "m_Edges": [ 43 | { 44 | "m_OutputSlot": { 45 | "m_Node": { 46 | "m_Id": "11d9157432ea450c81bfe8d75f0621d1" 47 | }, 48 | "m_SlotId": 0 49 | }, 50 | "m_InputSlot": { 51 | "m_Node": { 52 | "m_Id": "671df8ef89664c80b4468c8d82bf1560" 53 | }, 54 | "m_SlotId": 0 55 | } 56 | }, 57 | { 58 | "m_OutputSlot": { 59 | "m_Node": { 60 | "m_Id": "671df8ef89664c80b4468c8d82bf1560" 61 | }, 62 | "m_SlotId": 2 63 | }, 64 | "m_InputSlot": { 65 | "m_Node": { 66 | "m_Id": "a89884bd85bd47908478b7a75e11c394" 67 | }, 68 | "m_SlotId": 0 69 | } 70 | }, 71 | { 72 | "m_OutputSlot": { 73 | "m_Node": { 74 | "m_Id": "8e4cd9e73b61489fa95bd60a8b662b14" 75 | }, 76 | "m_SlotId": 0 77 | }, 78 | "m_InputSlot": { 79 | "m_Node": { 80 | "m_Id": "671df8ef89664c80b4468c8d82bf1560" 81 | }, 82 | "m_SlotId": 1 83 | } 84 | } 85 | ], 86 | "m_VertexContext": { 87 | "m_Position": { 88 | "x": 0.0, 89 | "y": 0.0 90 | }, 91 | "m_Blocks": [ 92 | { 93 | "m_Id": "a33bc175cfb14d50adf8945a0ce92c18" 94 | }, 95 | { 96 | "m_Id": "1a2a5be5ec72440da6f6e8d97df9f9bd" 97 | }, 98 | { 99 | "m_Id": "6b74758e2db0421aa6aa48a6856e3cdd" 100 | } 101 | ] 102 | }, 103 | "m_FragmentContext": { 104 | "m_Position": { 105 | "x": 0.0, 106 | "y": 200.0 107 | }, 108 | "m_Blocks": [ 109 | { 110 | "m_Id": "a89884bd85bd47908478b7a75e11c394" 111 | } 112 | ] 113 | }, 114 | "m_PreviewData": { 115 | "serializedMesh": { 116 | "m_SerializedMesh": "{\"mesh\":{\"instanceID\":0}}", 117 | "m_Guid": "" 118 | }, 119 | "preventRotation": false 120 | }, 121 | "m_Path": "Shader Graphs", 122 | "m_GraphPrecision": 1, 123 | "m_PreviewMode": 2, 124 | "m_OutputNode": { 125 | "m_Id": "" 126 | }, 127 | "m_SubDatas": [], 128 | "m_ActiveTargets": [ 129 | { 130 | "m_Id": "1d68e02d0ed749ba938e2d32d526dc2b" 131 | } 132 | ] 133 | } 134 | 135 | { 136 | "m_SGVersion": 0, 137 | "m_Type": "UnityEditor.ShaderGraph.PropertyNode", 138 | "m_ObjectId": "11d9157432ea450c81bfe8d75f0621d1", 139 | "m_Group": { 140 | "m_Id": "" 141 | }, 142 | "m_Name": "Property", 143 | "m_DrawState": { 144 | "m_Expanded": true, 145 | "m_Position": { 146 | "serializedVersion": "2", 147 | "x": -744.0, 148 | "y": 48.0, 149 | "width": 0.0, 150 | "height": 0.0 151 | } 152 | }, 153 | "m_Slots": [ 154 | { 155 | "m_Id": "fb2fb8f8555d4761bf33f62754394f27" 156 | } 157 | ], 158 | "synonyms": [], 159 | "m_Precision": 0, 160 | "m_PreviewExpanded": true, 161 | "m_DismissedVersion": 0, 162 | "m_PreviewMode": 0, 163 | "m_CustomColors": { 164 | "m_SerializableColors": [] 165 | }, 166 | "m_Property": { 167 | "m_Id": "2bf404383306495181273b9f060b9c8b" 168 | } 169 | } 170 | 171 | { 172 | "m_SGVersion": 0, 173 | "m_Type": "UnityEditor.ShaderGraph.BlockNode", 174 | "m_ObjectId": "1a2a5be5ec72440da6f6e8d97df9f9bd", 175 | "m_Group": { 176 | "m_Id": "" 177 | }, 178 | "m_Name": "VertexDescription.Normal", 179 | "m_DrawState": { 180 | "m_Expanded": true, 181 | "m_Position": { 182 | "serializedVersion": "2", 183 | "x": 0.0, 184 | "y": 0.0, 185 | "width": 0.0, 186 | "height": 0.0 187 | } 188 | }, 189 | "m_Slots": [ 190 | { 191 | "m_Id": "9a7ff96543134d869873e1fc832eb3a9" 192 | } 193 | ], 194 | "synonyms": [], 195 | "m_Precision": 0, 196 | "m_PreviewExpanded": true, 197 | "m_DismissedVersion": 0, 198 | "m_PreviewMode": 0, 199 | "m_CustomColors": { 200 | "m_SerializableColors": [] 201 | }, 202 | "m_SerializedDescriptor": "VertexDescription.Normal" 203 | } 204 | 205 | { 206 | "m_SGVersion": 0, 207 | "m_Type": "UnityEditor.ShaderGraph.DynamicValueMaterialSlot", 208 | "m_ObjectId": "1b5e81b3ce1c476aa88e69a91520fdec", 209 | "m_Id": 2, 210 | "m_DisplayName": "Out", 211 | "m_SlotType": 1, 212 | "m_Hidden": false, 213 | "m_ShaderOutputName": "Out", 214 | "m_StageCapability": 3, 215 | "m_Value": { 216 | "e00": 0.0, 217 | "e01": 0.0, 218 | "e02": 0.0, 219 | "e03": 0.0, 220 | "e10": 0.0, 221 | "e11": 0.0, 222 | "e12": 0.0, 223 | "e13": 0.0, 224 | "e20": 0.0, 225 | "e21": 0.0, 226 | "e22": 0.0, 227 | "e23": 0.0, 228 | "e30": 0.0, 229 | "e31": 0.0, 230 | "e32": 0.0, 231 | "e33": 0.0 232 | }, 233 | "m_DefaultValue": { 234 | "e00": 1.0, 235 | "e01": 0.0, 236 | "e02": 0.0, 237 | "e03": 0.0, 238 | "e10": 0.0, 239 | "e11": 1.0, 240 | "e12": 0.0, 241 | "e13": 0.0, 242 | "e20": 0.0, 243 | "e21": 0.0, 244 | "e22": 1.0, 245 | "e23": 0.0, 246 | "e30": 0.0, 247 | "e31": 0.0, 248 | "e32": 0.0, 249 | "e33": 1.0 250 | } 251 | } 252 | 253 | { 254 | "m_SGVersion": 1, 255 | "m_Type": "UnityEditor.Rendering.Universal.ShaderGraph.UniversalTarget", 256 | "m_ObjectId": "1d68e02d0ed749ba938e2d32d526dc2b", 257 | "m_Datas": [], 258 | "m_ActiveSubTarget": { 259 | "m_Id": "2ac7da84ddf94d7db58a597bac0c78b9" 260 | }, 261 | "m_AllowMaterialOverride": false, 262 | "m_SurfaceType": 0, 263 | "m_ZTestMode": 4, 264 | "m_ZWriteControl": 0, 265 | "m_AlphaMode": 0, 266 | "m_RenderFace": 2, 267 | "m_AlphaClip": false, 268 | "m_CastShadows": false, 269 | "m_ReceiveShadows": true, 270 | "m_DisableTint": false, 271 | "m_AdditionalMotionVectorMode": 0, 272 | "m_AlembicMotionVectors": false, 273 | "m_SupportsLODCrossFade": false, 274 | "m_CustomEditorGUI": "", 275 | "m_SupportVFX": false 276 | } 277 | 278 | { 279 | "m_SGVersion": 2, 280 | "m_Type": "UnityEditor.Rendering.Universal.ShaderGraph.UniversalUnlitSubTarget", 281 | "m_ObjectId": "2ac7da84ddf94d7db58a597bac0c78b9" 282 | } 283 | 284 | { 285 | "m_SGVersion": 3, 286 | "m_Type": "UnityEditor.ShaderGraph.Internal.ColorShaderProperty", 287 | "m_ObjectId": "2bf404383306495181273b9f060b9c8b", 288 | "m_Guid": { 289 | "m_GuidSerialized": "7303587b-d0d9-4727-ae06-0f491517c509" 290 | }, 291 | "m_Name": "Modifier", 292 | "m_DefaultRefNameVersion": 1, 293 | "m_RefNameGeneratedByDisplayName": "Modifier", 294 | "m_DefaultReferenceName": "_Modifier", 295 | "m_OverrideReferenceName": "", 296 | "m_GeneratePropertyBlock": true, 297 | "m_UseCustomSlotLabel": false, 298 | "m_CustomSlotLabel": "", 299 | "m_DismissedVersion": 0, 300 | "m_Precision": 0, 301 | "overrideHLSLDeclaration": false, 302 | "hlslDeclarationOverride": 0, 303 | "m_Hidden": false, 304 | "m_Value": { 305 | "r": 0.7075471878051758, 306 | "g": 0.7075471878051758, 307 | "b": 0.7075471878051758, 308 | "a": 0.0 309 | }, 310 | "isMainColor": false, 311 | "m_ColorMode": 0 312 | } 313 | 314 | { 315 | "m_SGVersion": 0, 316 | "m_Type": "UnityEditor.ShaderGraph.MultiplyNode", 317 | "m_ObjectId": "671df8ef89664c80b4468c8d82bf1560", 318 | "m_Group": { 319 | "m_Id": "" 320 | }, 321 | "m_Name": "Multiply", 322 | "m_DrawState": { 323 | "m_Expanded": true, 324 | "m_Position": { 325 | "serializedVersion": "2", 326 | "x": -559.0, 327 | "y": 125.0, 328 | "width": 0.0, 329 | "height": 0.0 330 | } 331 | }, 332 | "m_Slots": [ 333 | { 334 | "m_Id": "cbde55eefbb1422582595a9d363b4e5d" 335 | }, 336 | { 337 | "m_Id": "dba75dfbe26b4a8e9ea7963f978202b8" 338 | }, 339 | { 340 | "m_Id": "1b5e81b3ce1c476aa88e69a91520fdec" 341 | } 342 | ], 343 | "synonyms": [ 344 | "multiplication", 345 | "times", 346 | "x" 347 | ], 348 | "m_Precision": 0, 349 | "m_PreviewExpanded": true, 350 | "m_DismissedVersion": 0, 351 | "m_PreviewMode": 0, 352 | "m_CustomColors": { 353 | "m_SerializableColors": [] 354 | } 355 | } 356 | 357 | { 358 | "m_SGVersion": 0, 359 | "m_Type": "UnityEditor.ShaderGraph.BlockNode", 360 | "m_ObjectId": "6b74758e2db0421aa6aa48a6856e3cdd", 361 | "m_Group": { 362 | "m_Id": "" 363 | }, 364 | "m_Name": "VertexDescription.Tangent", 365 | "m_DrawState": { 366 | "m_Expanded": true, 367 | "m_Position": { 368 | "serializedVersion": "2", 369 | "x": 0.0, 370 | "y": 0.0, 371 | "width": 0.0, 372 | "height": 0.0 373 | } 374 | }, 375 | "m_Slots": [ 376 | { 377 | "m_Id": "c1f172401fa84b7da04a01132c9eb438" 378 | } 379 | ], 380 | "synonyms": [], 381 | "m_Precision": 0, 382 | "m_PreviewExpanded": true, 383 | "m_DismissedVersion": 0, 384 | "m_PreviewMode": 0, 385 | "m_CustomColors": { 386 | "m_SerializableColors": [] 387 | }, 388 | "m_SerializedDescriptor": "VertexDescription.Tangent" 389 | } 390 | 391 | { 392 | "m_SGVersion": 0, 393 | "m_Type": "UnityEditor.ShaderGraph.VertexColorNode", 394 | "m_ObjectId": "8e4cd9e73b61489fa95bd60a8b662b14", 395 | "m_Group": { 396 | "m_Id": "" 397 | }, 398 | "m_Name": "Vertex Color", 399 | "m_DrawState": { 400 | "m_Expanded": true, 401 | "m_Position": { 402 | "serializedVersion": "2", 403 | "x": -890.0, 404 | "y": 301.0, 405 | "width": 208.0, 406 | "height": 278.0 407 | } 408 | }, 409 | "m_Slots": [ 410 | { 411 | "m_Id": "96c2a301137c4b07916b4ff65aa545b4" 412 | } 413 | ], 414 | "synonyms": [], 415 | "m_Precision": 0, 416 | "m_PreviewExpanded": true, 417 | "m_DismissedVersion": 0, 418 | "m_PreviewMode": 2, 419 | "m_CustomColors": { 420 | "m_SerializableColors": [] 421 | } 422 | } 423 | 424 | { 425 | "m_SGVersion": 0, 426 | "m_Type": "UnityEditor.ShaderGraph.PositionMaterialSlot", 427 | "m_ObjectId": "94f1cd09ec9643f58032a153d289b755", 428 | "m_Id": 0, 429 | "m_DisplayName": "Position", 430 | "m_SlotType": 0, 431 | "m_Hidden": false, 432 | "m_ShaderOutputName": "Position", 433 | "m_StageCapability": 1, 434 | "m_Value": { 435 | "x": 0.0, 436 | "y": 0.0, 437 | "z": 0.0 438 | }, 439 | "m_DefaultValue": { 440 | "x": 0.0, 441 | "y": 0.0, 442 | "z": 0.0 443 | }, 444 | "m_Labels": [], 445 | "m_Space": 0 446 | } 447 | 448 | { 449 | "m_SGVersion": 0, 450 | "m_Type": "UnityEditor.ShaderGraph.Vector4MaterialSlot", 451 | "m_ObjectId": "96c2a301137c4b07916b4ff65aa545b4", 452 | "m_Id": 0, 453 | "m_DisplayName": "Out", 454 | "m_SlotType": 1, 455 | "m_Hidden": false, 456 | "m_ShaderOutputName": "Out", 457 | "m_StageCapability": 3, 458 | "m_Value": { 459 | "x": 1.0, 460 | "y": 1.0, 461 | "z": 1.0, 462 | "w": 1.0 463 | }, 464 | "m_DefaultValue": { 465 | "x": 1.0, 466 | "y": 1.0, 467 | "z": 1.0, 468 | "w": 1.0 469 | }, 470 | "m_Labels": [] 471 | } 472 | 473 | { 474 | "m_SGVersion": 0, 475 | "m_Type": "UnityEditor.ShaderGraph.ColorRGBMaterialSlot", 476 | "m_ObjectId": "970ece43519d439989bab42c11dcdfd0", 477 | "m_Id": 0, 478 | "m_DisplayName": "Base Color", 479 | "m_SlotType": 0, 480 | "m_Hidden": false, 481 | "m_ShaderOutputName": "BaseColor", 482 | "m_StageCapability": 2, 483 | "m_Value": { 484 | "x": 0.5, 485 | "y": 0.5, 486 | "z": 0.5 487 | }, 488 | "m_DefaultValue": { 489 | "x": 0.5, 490 | "y": 0.5, 491 | "z": 0.5 492 | }, 493 | "m_Labels": [], 494 | "m_ColorMode": 0, 495 | "m_DefaultColor": { 496 | "r": 0.5, 497 | "g": 0.5, 498 | "b": 0.5, 499 | "a": 1.0 500 | } 501 | } 502 | 503 | { 504 | "m_SGVersion": 0, 505 | "m_Type": "UnityEditor.ShaderGraph.NormalMaterialSlot", 506 | "m_ObjectId": "9a7ff96543134d869873e1fc832eb3a9", 507 | "m_Id": 0, 508 | "m_DisplayName": "Normal", 509 | "m_SlotType": 0, 510 | "m_Hidden": false, 511 | "m_ShaderOutputName": "Normal", 512 | "m_StageCapability": 1, 513 | "m_Value": { 514 | "x": 0.0, 515 | "y": 0.0, 516 | "z": 0.0 517 | }, 518 | "m_DefaultValue": { 519 | "x": 0.0, 520 | "y": 0.0, 521 | "z": 0.0 522 | }, 523 | "m_Labels": [], 524 | "m_Space": 0 525 | } 526 | 527 | { 528 | "m_SGVersion": 0, 529 | "m_Type": "UnityEditor.ShaderGraph.BlockNode", 530 | "m_ObjectId": "a33bc175cfb14d50adf8945a0ce92c18", 531 | "m_Group": { 532 | "m_Id": "" 533 | }, 534 | "m_Name": "VertexDescription.Position", 535 | "m_DrawState": { 536 | "m_Expanded": true, 537 | "m_Position": { 538 | "serializedVersion": "2", 539 | "x": 0.0, 540 | "y": 0.0, 541 | "width": 0.0, 542 | "height": 0.0 543 | } 544 | }, 545 | "m_Slots": [ 546 | { 547 | "m_Id": "94f1cd09ec9643f58032a153d289b755" 548 | } 549 | ], 550 | "synonyms": [], 551 | "m_Precision": 0, 552 | "m_PreviewExpanded": true, 553 | "m_DismissedVersion": 0, 554 | "m_PreviewMode": 0, 555 | "m_CustomColors": { 556 | "m_SerializableColors": [] 557 | }, 558 | "m_SerializedDescriptor": "VertexDescription.Position" 559 | } 560 | 561 | { 562 | "m_SGVersion": 0, 563 | "m_Type": "UnityEditor.ShaderGraph.BlockNode", 564 | "m_ObjectId": "a89884bd85bd47908478b7a75e11c394", 565 | "m_Group": { 566 | "m_Id": "" 567 | }, 568 | "m_Name": "SurfaceDescription.BaseColor", 569 | "m_DrawState": { 570 | "m_Expanded": true, 571 | "m_Position": { 572 | "serializedVersion": "2", 573 | "x": 0.0, 574 | "y": 0.0, 575 | "width": 0.0, 576 | "height": 0.0 577 | } 578 | }, 579 | "m_Slots": [ 580 | { 581 | "m_Id": "970ece43519d439989bab42c11dcdfd0" 582 | } 583 | ], 584 | "synonyms": [], 585 | "m_Precision": 0, 586 | "m_PreviewExpanded": true, 587 | "m_DismissedVersion": 0, 588 | "m_PreviewMode": 0, 589 | "m_CustomColors": { 590 | "m_SerializableColors": [] 591 | }, 592 | "m_SerializedDescriptor": "SurfaceDescription.BaseColor" 593 | } 594 | 595 | { 596 | "m_SGVersion": 0, 597 | "m_Type": "UnityEditor.ShaderGraph.TangentMaterialSlot", 598 | "m_ObjectId": "c1f172401fa84b7da04a01132c9eb438", 599 | "m_Id": 0, 600 | "m_DisplayName": "Tangent", 601 | "m_SlotType": 0, 602 | "m_Hidden": false, 603 | "m_ShaderOutputName": "Tangent", 604 | "m_StageCapability": 1, 605 | "m_Value": { 606 | "x": 0.0, 607 | "y": 0.0, 608 | "z": 0.0 609 | }, 610 | "m_DefaultValue": { 611 | "x": 0.0, 612 | "y": 0.0, 613 | "z": 0.0 614 | }, 615 | "m_Labels": [], 616 | "m_Space": 0 617 | } 618 | 619 | { 620 | "m_SGVersion": 0, 621 | "m_Type": "UnityEditor.ShaderGraph.DynamicValueMaterialSlot", 622 | "m_ObjectId": "cbde55eefbb1422582595a9d363b4e5d", 623 | "m_Id": 0, 624 | "m_DisplayName": "A", 625 | "m_SlotType": 0, 626 | "m_Hidden": false, 627 | "m_ShaderOutputName": "A", 628 | "m_StageCapability": 3, 629 | "m_Value": { 630 | "e00": 0.0, 631 | "e01": 0.0, 632 | "e02": 0.0, 633 | "e03": 0.0, 634 | "e10": 0.0, 635 | "e11": 0.0, 636 | "e12": 0.0, 637 | "e13": 0.0, 638 | "e20": 0.0, 639 | "e21": 0.0, 640 | "e22": 0.0, 641 | "e23": 0.0, 642 | "e30": 0.0, 643 | "e31": 0.0, 644 | "e32": 0.0, 645 | "e33": 0.0 646 | }, 647 | "m_DefaultValue": { 648 | "e00": 1.0, 649 | "e01": 0.0, 650 | "e02": 0.0, 651 | "e03": 0.0, 652 | "e10": 0.0, 653 | "e11": 1.0, 654 | "e12": 0.0, 655 | "e13": 0.0, 656 | "e20": 0.0, 657 | "e21": 0.0, 658 | "e22": 1.0, 659 | "e23": 0.0, 660 | "e30": 0.0, 661 | "e31": 0.0, 662 | "e32": 0.0, 663 | "e33": 1.0 664 | } 665 | } 666 | 667 | { 668 | "m_SGVersion": 0, 669 | "m_Type": "UnityEditor.ShaderGraph.DynamicValueMaterialSlot", 670 | "m_ObjectId": "dba75dfbe26b4a8e9ea7963f978202b8", 671 | "m_Id": 1, 672 | "m_DisplayName": "B", 673 | "m_SlotType": 0, 674 | "m_Hidden": false, 675 | "m_ShaderOutputName": "B", 676 | "m_StageCapability": 3, 677 | "m_Value": { 678 | "e00": 2.0, 679 | "e01": 2.0, 680 | "e02": 2.0, 681 | "e03": 2.0, 682 | "e10": 2.0, 683 | "e11": 2.0, 684 | "e12": 2.0, 685 | "e13": 2.0, 686 | "e20": 2.0, 687 | "e21": 2.0, 688 | "e22": 2.0, 689 | "e23": 2.0, 690 | "e30": 2.0, 691 | "e31": 2.0, 692 | "e32": 2.0, 693 | "e33": 2.0 694 | }, 695 | "m_DefaultValue": { 696 | "e00": 1.0, 697 | "e01": 0.0, 698 | "e02": 0.0, 699 | "e03": 0.0, 700 | "e10": 0.0, 701 | "e11": 1.0, 702 | "e12": 0.0, 703 | "e13": 0.0, 704 | "e20": 0.0, 705 | "e21": 0.0, 706 | "e22": 1.0, 707 | "e23": 0.0, 708 | "e30": 0.0, 709 | "e31": 0.0, 710 | "e32": 0.0, 711 | "e33": 1.0 712 | } 713 | } 714 | 715 | { 716 | "m_SGVersion": 0, 717 | "m_Type": "UnityEditor.ShaderGraph.CategoryData", 718 | "m_ObjectId": "fb18270e4bcd4565be93fb327b9f6b1a", 719 | "m_Name": "", 720 | "m_ChildObjectList": [ 721 | { 722 | "m_Id": "2bf404383306495181273b9f060b9c8b" 723 | } 724 | ] 725 | } 726 | 727 | { 728 | "m_SGVersion": 0, 729 | "m_Type": "UnityEditor.ShaderGraph.Vector4MaterialSlot", 730 | "m_ObjectId": "fb2fb8f8555d4761bf33f62754394f27", 731 | "m_Id": 0, 732 | "m_DisplayName": "Modifier", 733 | "m_SlotType": 1, 734 | "m_Hidden": false, 735 | "m_ShaderOutputName": "Out", 736 | "m_StageCapability": 3, 737 | "m_Value": { 738 | "x": 0.0, 739 | "y": 0.0, 740 | "z": 0.0, 741 | "w": 0.0 742 | }, 743 | "m_DefaultValue": { 744 | "x": 0.0, 745 | "y": 0.0, 746 | "z": 0.0, 747 | "w": 0.0 748 | }, 749 | "m_Labels": [] 750 | } 751 | 752 | -------------------------------------------------------------------------------- /Shaders/TrianglesUnlit.shadergraph.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1041687df7b2a564c9ec2bf4bec4d89b 3 | ScriptedImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 2 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | script: {fileID: 11500000, guid: 625f186215c104763be7675aa2d941aa, type: 3} 11 | -------------------------------------------------------------------------------- /docs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 941f406ad8e67a446a3391a199856d13 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /docs/images.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9e02e6d75018cc94981852114cff9112 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /docs/images/triangle_splat_example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KillianCartelier/TriangleSplattingUnity/eb74af1ae9a065354ddc44ac284f8e4d5a39c4bb/docs/images/triangle_splat_example.png -------------------------------------------------------------------------------- /docs/images/triangle_splat_example.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 940817bf4505b714f8b5706a71bbe282 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 13 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 | 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: 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 | cookieLightType: 0 69 | platformSettings: 70 | - serializedVersion: 4 71 | buildTarget: DefaultTexturePlatform 72 | maxTextureSize: 2048 73 | resizeAlgorithm: 0 74 | textureFormat: -1 75 | textureCompression: 1 76 | compressionQuality: 50 77 | crunchedCompression: 0 78 | allowsAlphaSplitting: 0 79 | overridden: 0 80 | ignorePlatformSupport: 0 81 | androidETC2FallbackOverride: 0 82 | forceMaximumCompressionQuality_BC6H_BC7: 0 83 | - serializedVersion: 4 84 | buildTarget: Standalone 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 | ignorePlatformSupport: 0 94 | androidETC2FallbackOverride: 0 95 | forceMaximumCompressionQuality_BC6H_BC7: 0 96 | - serializedVersion: 4 97 | buildTarget: Android 98 | maxTextureSize: 2048 99 | resizeAlgorithm: 0 100 | textureFormat: -1 101 | textureCompression: 1 102 | compressionQuality: 50 103 | crunchedCompression: 0 104 | allowsAlphaSplitting: 0 105 | overridden: 0 106 | ignorePlatformSupport: 0 107 | androidETC2FallbackOverride: 0 108 | forceMaximumCompressionQuality_BC6H_BC7: 0 109 | spriteSheet: 110 | serializedVersion: 2 111 | sprites: [] 112 | outline: [] 113 | customData: 114 | physicsShape: [] 115 | bones: [] 116 | spriteID: 117 | internalID: 0 118 | vertices: [] 119 | indices: 120 | edges: [] 121 | weights: [] 122 | secondaryTextures: [] 123 | spriteCustomMetadata: 124 | entries: [] 125 | nameFileIdTable: {} 126 | mipmapLimitGroupName: 127 | pSDRemoveMatte: 0 128 | userData: 129 | assetBundleName: 130 | assetBundleVariant: 131 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "com.killian.trianglesplattingunity", 3 | "version": "1.0.0", 4 | "displayName": "Unity Triangle Splatting", 5 | "description": "A lightweight Unity package for visualizing triangle splats in real time. Includes chunked loading, frustum culling, vertex color rendering, and optional mesh collider generation.", 6 | "unity": "2022.3", 7 | "samples": [ 8 | { 9 | "displayName": "Basic Usage", 10 | "description": "Example scene demonstrating triangle splat loading and rendering.", 11 | "path": "Samples~/BasicUsage" 12 | } 13 | ], 14 | 15 | "author": { 16 | "name": "KillianCartelier", 17 | "email": "", 18 | "url": "" 19 | }, 20 | "license": "MIT" 21 | } -------------------------------------------------------------------------------- /package.json.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f45c1587e73ce9743804faedf3be77d2 3 | PackageManifestImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | --------------------------------------------------------------------------------