com.warwlock.mtree 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/npm.yml +19 -0
- package/CHANGELOG.md +17 -0
- package/CHANGELOG.md.meta +7 -0
- package/Documentation~/Documentation.md +3 -0
- package/Editor/BranchEditor.cs +545 -0
- package/Editor/BranchEditor.cs.meta +16 -0
- package/Editor/EditorCallbacks.cs +69 -0
- package/Editor/EditorCallbacks.cs.meta +11 -0
- package/Editor/MTree.Editor.asmdef +18 -0
- package/Editor/MTree.Editor.asmdef.meta +7 -0
- package/Editor/MenuItem.cs +31 -0
- package/Editor/MenuItem.cs.meta +11 -0
- package/Editor/MtreeBezierInspector.cs +161 -0
- package/Editor/MtreeBezierInspector.cs.meta +11 -0
- package/Editor/MtreeEditor.cs +434 -0
- package/Editor/MtreeEditor.cs.meta +11 -0
- package/Editor/TemplateInspector.cs +66 -0
- package/Editor/TemplateInspector.cs.meta +12 -0
- package/Editor/ValuesEditor.cs +18 -0
- package/Editor/ValuesEditor.cs.meta +11 -0
- package/Editor/VertexColorAdjustmentEditor.cs +169 -0
- package/Editor/VertexColorAdjustmentEditor.cs.meta +11 -0
- package/Editor.meta +8 -0
- package/LICENSE +21 -0
- package/LICENSE.meta +7 -0
- package/README.md +68 -0
- package/README.md.meta +7 -0
- package/Resources/Mtree/MtreeBillboardCamera.prefab +204 -0
- package/Resources/Mtree/MtreeBillboardCamera.prefab.meta +8 -0
- package/Resources/Mtree/Sprites/DeleteCrossSprite.png +0 -0
- package/Resources/Mtree/Sprites/DeleteCrossSprite.png.meta +116 -0
- package/Resources/Mtree/Sprites/TreeFunctionSprite.png +0 -0
- package/Resources/Mtree/Sprites/TreeFunctionSprite.png.meta +116 -0
- package/Resources/Mtree/Sprites/TreeFunctionSpriteSelected.psd +0 -0
- package/Resources/Mtree/Sprites/TreeFunctionSpriteSelected.psd.meta +116 -0
- package/Resources/Mtree/Sprites.meta +8 -0
- package/Resources/Mtree/Vertex Color Editor/Mtree Vertex Color GameObject.prefab +104 -0
- package/Resources/Mtree/Vertex Color Editor/Mtree Vertex Color GameObject.prefab.meta +7 -0
- package/Resources/Mtree/Vertex Color Editor.meta +8 -0
- package/Resources/Mtree/branches.fbx +0 -0
- package/Resources/Mtree/branches.fbx.meta +137 -0
- package/Resources/Mtree.meta +8 -0
- package/Resources.meta +8 -0
- package/Runtime/AO/DensityAO.cs +203 -0
- package/Runtime/AO/DensityAO.cs.meta +11 -0
- package/Runtime/AO/KDTree.cs +169 -0
- package/Runtime/AO/KDTree.cs.meta +11 -0
- package/Runtime/AO/WeightedRandom.cs +74 -0
- package/Runtime/AO/WeightedRandom.cs.meta +11 -0
- package/Runtime/AO.meta +8 -0
- package/Runtime/Bezier/Bezier.cs +69 -0
- package/Runtime/Bezier/Bezier.cs.meta +11 -0
- package/Runtime/Bezier/MtreeBezier.cs +185 -0
- package/Runtime/Bezier/MtreeBezier.cs.meta +11 -0
- package/Runtime/Bezier.meta +8 -0
- package/Runtime/ExampleSceneManager.cs +165 -0
- package/Runtime/ExampleSceneManager.cs.meta +11 -0
- package/Runtime/LODValues.cs +44 -0
- package/Runtime/LODValues.cs.meta +11 -0
- package/Runtime/LeafPoint.cs +135 -0
- package/Runtime/LeafPoint.cs.meta +11 -0
- package/Runtime/MTree.Runtime.asmdef +3 -0
- package/Runtime/MTree.Runtime.asmdef.meta +7 -0
- package/Runtime/MTree.cs +569 -0
- package/Runtime/MTree.cs.meta +11 -0
- package/Runtime/MtreeComponent.cs +482 -0
- package/Runtime/MtreeComponent.cs.meta +11 -0
- package/Runtime/MtreeVariables.cs +11 -0
- package/Runtime/MtreeVariables.cs.meta +11 -0
- package/Runtime/MtreeWind.cs +94 -0
- package/Runtime/MtreeWind.cs.meta +11 -0
- package/Runtime/Node.cs +331 -0
- package/Runtime/Node.cs.meta +11 -0
- package/Runtime/SimplexNoise.cs +166 -0
- package/Runtime/SimplexNoise.cs.meta +11 -0
- package/Runtime/Splines.cs +379 -0
- package/Runtime/Splines.cs.meta +11 -0
- package/Runtime/TreeBilboard.cs +290 -0
- package/Runtime/TreeBilboard.cs.meta +11 -0
- package/Runtime/TreeFunctions/BranchFunction.cs +92 -0
- package/Runtime/TreeFunctions/BranchFunction.cs.meta +11 -0
- package/Runtime/TreeFunctions/GrowFunction.cs +81 -0
- package/Runtime/TreeFunctions/GrowFunction.cs.meta +11 -0
- package/Runtime/TreeFunctions/LeafFunction.cs +111 -0
- package/Runtime/TreeFunctions/LeafFunction.cs.meta +11 -0
- package/Runtime/TreeFunctions/RootsFunction.cs +77 -0
- package/Runtime/TreeFunctions/RootsFunction.cs.meta +11 -0
- package/Runtime/TreeFunctions/SplitFunction.cs +50 -0
- package/Runtime/TreeFunctions/SplitFunction.cs.meta +11 -0
- package/Runtime/TreeFunctions/TreeFunctionAsset.cs +105 -0
- package/Runtime/TreeFunctions/TreeFunctionAsset.cs.meta +11 -0
- package/Runtime/TreeFunctions/TrunkFunction.cs +88 -0
- package/Runtime/TreeFunctions/TrunkFunction.cs.meta +11 -0
- package/Runtime/TreeFunctions.meta +8 -0
- package/Runtime/TreePoint.cs +27 -0
- package/Runtime/TreePoint.cs.meta +11 -0
- package/Runtime/TreeTemplate.cs +50 -0
- package/Runtime/TreeTemplate.cs.meta +12 -0
- package/Runtime/Utils.cs +268 -0
- package/Runtime/Utils.cs.meta +11 -0
- package/Runtime/VSProIntegration.cs +132 -0
- package/Runtime/VSProIntegration.cs.meta +11 -0
- package/Runtime.meta +8 -0
- package/Samples~/ExampleTemplates/Examples/Birch.asset +364 -0
- package/Samples~/ExampleTemplates/Examples/Birch.asset.meta +8 -0
- package/Samples~/ExampleTemplates/Examples/Bush.asset +385 -0
- package/Samples~/ExampleTemplates/Examples/Bush.asset.meta +8 -0
- package/Samples~/ExampleTemplates/Examples/Eastern Pine.asset +482 -0
- package/Samples~/ExampleTemplates/Examples/Eastern Pine.asset.meta +8 -0
- package/Samples~/ExampleTemplates/Examples/FantasyTree.asset +406 -0
- package/Samples~/ExampleTemplates/Examples/FantasyTree.asset.meta +8 -0
- package/Samples~/ExampleTemplates/Examples/Fern.asset +291 -0
- package/Samples~/ExampleTemplates/Examples/Fern.asset.meta +8 -0
- package/Samples~/ExampleTemplates/Examples/High Poly.asset +300 -0
- package/Samples~/ExampleTemplates/Examples/High Poly.asset.meta +8 -0
- package/Samples~/ExampleTemplates/Examples/LightingData.asset +0 -0
- package/Samples~/ExampleTemplates/Examples/LightingData.asset.meta +8 -0
- package/Samples~/ExampleTemplates/Examples/Materials/Bark/Bark Birch Outline.mat +196 -0
- package/Samples~/ExampleTemplates/Examples/Materials/Bark/Bark Birch Outline.mat.meta +8 -0
- package/Samples~/ExampleTemplates/Examples/Materials/Bark/Bark Birch.mat +196 -0
- package/Samples~/ExampleTemplates/Examples/Materials/Bark/Bark Birch.mat.meta +8 -0
- package/Samples~/ExampleTemplates/Examples/Materials/Bark/Bark Fern.mat +181 -0
- package/Samples~/ExampleTemplates/Examples/Materials/Bark/Bark Fern.mat.meta +8 -0
- package/Samples~/ExampleTemplates/Examples/Materials/Bark/Bark HighPoly.mat +201 -0
- package/Samples~/ExampleTemplates/Examples/Materials/Bark/Bark HighPoly.mat.meta +8 -0
- package/Samples~/ExampleTemplates/Examples/Materials/Bark/Bark Oak.mat +208 -0
- package/Samples~/ExampleTemplates/Examples/Materials/Bark/Bark Oak.mat.meta +8 -0
- package/Samples~/ExampleTemplates/Examples/Materials/Bark/Bark Palm.mat +180 -0
- package/Samples~/ExampleTemplates/Examples/Materials/Bark/Bark Palm.mat.meta +8 -0
- package/Samples~/ExampleTemplates/Examples/Materials/Bark/Bark Pine.mat +206 -0
- package/Samples~/ExampleTemplates/Examples/Materials/Bark/Bark Pine.mat.meta +8 -0
- package/Samples~/ExampleTemplates/Examples/Materials/Bark/Bark Ponderossa.mat +206 -0
- package/Samples~/ExampleTemplates/Examples/Materials/Bark/Bark Ponderossa.mat.meta +8 -0
- package/Samples~/ExampleTemplates/Examples/Materials/Bark/Bark Poplar.mat +172 -0
- package/Samples~/ExampleTemplates/Examples/Materials/Bark/Bark Poplar.mat.meta +8 -0
- package/Samples~/ExampleTemplates/Examples/Materials/Bark.meta +8 -0
- package/Samples~/ExampleTemplates/Examples/Materials/Example Scene/Floor.mat +392 -0
- package/Samples~/ExampleTemplates/Examples/Materials/Example Scene/Floor.mat.meta +8 -0
- package/Samples~/ExampleTemplates/Examples/Materials/Example Scene.meta +8 -0
- package/Samples~/ExampleTemplates/Examples/Materials/Leafs/Leafs Fern.mat +202 -0
- package/Samples~/ExampleTemplates/Examples/Materials/Leafs/Leafs Fern.mat.meta +8 -0
- package/Samples~/ExampleTemplates/Examples/Materials/Leafs/Leafs HighPoly.mat +265 -0
- package/Samples~/ExampleTemplates/Examples/Materials/Leafs/Leafs HighPoly.mat.meta +8 -0
- package/Samples~/ExampleTemplates/Examples/Materials/Leafs/Leafs Needles.mat +267 -0
- package/Samples~/ExampleTemplates/Examples/Materials/Leafs/Leafs Needles.mat.meta +8 -0
- package/Samples~/ExampleTemplates/Examples/Materials/Leafs/Leafs Palm.mat +232 -0
- package/Samples~/ExampleTemplates/Examples/Materials/Leafs/Leafs Palm.mat.meta +8 -0
- package/Samples~/ExampleTemplates/Examples/Materials/Leafs/Leafs Palmate.mat +250 -0
- package/Samples~/ExampleTemplates/Examples/Materials/Leafs/Leafs Palmate.mat.meta +8 -0
- package/Samples~/ExampleTemplates/Examples/Materials/Leafs/Leafs Pine.mat +247 -0
- package/Samples~/ExampleTemplates/Examples/Materials/Leafs/Leafs Pine.mat.meta +8 -0
- package/Samples~/ExampleTemplates/Examples/Materials/Leafs/Leafs Poplar.mat +223 -0
- package/Samples~/ExampleTemplates/Examples/Materials/Leafs/Leafs Poplar.mat.meta +8 -0
- package/Samples~/ExampleTemplates/Examples/Materials/Leafs/Leafs Serrate Outline.mat +262 -0
- package/Samples~/ExampleTemplates/Examples/Materials/Leafs/Leafs Serrate Outline.mat.meta +8 -0
- package/Samples~/ExampleTemplates/Examples/Materials/Leafs/Leafs Serrate.mat +281 -0
- package/Samples~/ExampleTemplates/Examples/Materials/Leafs/Leafs Serrate.mat.meta +8 -0
- package/Samples~/ExampleTemplates/Examples/Materials/Leafs/Leafs Stone Pine.mat +267 -0
- package/Samples~/ExampleTemplates/Examples/Materials/Leafs/Leafs Stone Pine.mat.meta +8 -0
- package/Samples~/ExampleTemplates/Examples/Materials/Leafs/Leafs Willow.mat +236 -0
- package/Samples~/ExampleTemplates/Examples/Materials/Leafs/Leafs Willow.mat.meta +8 -0
- package/Samples~/ExampleTemplates/Examples/Materials/Leafs.meta +8 -0
- package/Samples~/ExampleTemplates/Examples/Materials.meta +8 -0
- package/Samples~/ExampleTemplates/Examples/Oak.asset +364 -0
- package/Samples~/ExampleTemplates/Examples/Oak.asset.meta +8 -0
- package/Samples~/ExampleTemplates/Examples/Old Oak.asset +364 -0
- package/Samples~/ExampleTemplates/Examples/Old Oak.asset.meta +8 -0
- package/Samples~/ExampleTemplates/Examples/Palm.asset +500 -0
- package/Samples~/ExampleTemplates/Examples/Palm.asset.meta +8 -0
- package/Samples~/ExampleTemplates/Examples/Pine 2.asset +387 -0
- package/Samples~/ExampleTemplates/Examples/Pine 2.asset.meta +8 -0
- package/Samples~/ExampleTemplates/Examples/Pine.asset +405 -0
- package/Samples~/ExampleTemplates/Examples/Pine.asset.meta +8 -0
- package/Samples~/ExampleTemplates/Examples/Ponderossa Pine.asset +478 -0
- package/Samples~/ExampleTemplates/Examples/Ponderossa Pine.asset.meta +8 -0
- package/Samples~/ExampleTemplates/Examples/Poplar.asset +309 -0
- package/Samples~/ExampleTemplates/Examples/Poplar.asset.meta +8 -0
- package/Samples~/ExampleTemplates/Examples/ReflectionProbe-0.exr +0 -0
- package/Samples~/ExampleTemplates/Examples/ReflectionProbe-0.exr.meta +117 -0
- package/Samples~/ExampleTemplates/Examples/Small Pine.asset +273 -0
- package/Samples~/ExampleTemplates/Examples/Small Pine.asset.meta +8 -0
- package/Samples~/ExampleTemplates/Examples/Small Tree.asset +364 -0
- package/Samples~/ExampleTemplates/Examples/Small Tree.asset.meta +8 -0
- package/Samples~/ExampleTemplates/Examples/Textures/Bark/Bark_Birch_C.png +0 -0
- package/Samples~/ExampleTemplates/Examples/Textures/Bark/Bark_Birch_C.png.meta +74 -0
- package/Samples~/ExampleTemplates/Examples/Textures/Bark/Bark_Birch_N.png +0 -0
- package/Samples~/ExampleTemplates/Examples/Textures/Bark/Bark_Birch_N.png.meta +96 -0
- package/Samples~/ExampleTemplates/Examples/Textures/Bark/Bark_Damaged_C.png +0 -0
- package/Samples~/ExampleTemplates/Examples/Textures/Bark/Bark_Damaged_C.png.meta +116 -0
- package/Samples~/ExampleTemplates/Examples/Textures/Bark/Bark_Damaged_N.png +0 -0
- package/Samples~/ExampleTemplates/Examples/Textures/Bark/Bark_Damaged_N.png.meta +116 -0
- package/Samples~/ExampleTemplates/Examples/Textures/Bark/Bark_Decidious_1_C.png +0 -0
- package/Samples~/ExampleTemplates/Examples/Textures/Bark/Bark_Decidious_1_C.png.meta +132 -0
- package/Samples~/ExampleTemplates/Examples/Textures/Bark/Bark_Decidious_1_N.png +0 -0
- package/Samples~/ExampleTemplates/Examples/Textures/Bark/Bark_Decidious_1_N.png.meta +116 -0
- package/Samples~/ExampleTemplates/Examples/Textures/Bark/Bark_Decidious_2_C.png +0 -0
- package/Samples~/ExampleTemplates/Examples/Textures/Bark/Bark_Decidious_2_C.png.meta +132 -0
- package/Samples~/ExampleTemplates/Examples/Textures/Bark/Bark_Decidious_3_C.png +0 -0
- package/Samples~/ExampleTemplates/Examples/Textures/Bark/Bark_Decidious_3_C.png.meta +132 -0
- package/Samples~/ExampleTemplates/Examples/Textures/Bark/Bark_Decidious_3_N.png +0 -0
- package/Samples~/ExampleTemplates/Examples/Textures/Bark/Bark_Decidious_3_N.png.meta +116 -0
- package/Samples~/ExampleTemplates/Examples/Textures/Bark/Bark_Decidious_4_C.png +0 -0
- package/Samples~/ExampleTemplates/Examples/Textures/Bark/Bark_Decidious_4_C.png.meta +132 -0
- package/Samples~/ExampleTemplates/Examples/Textures/Bark/Bark_Decidious_4_N.png +0 -0
- package/Samples~/ExampleTemplates/Examples/Textures/Bark/Bark_Decidious_4_N.png.meta +116 -0
- package/Samples~/ExampleTemplates/Examples/Textures/Bark/Bark_Oak_C.png +0 -0
- package/Samples~/ExampleTemplates/Examples/Textures/Bark/Bark_Oak_C.png.meta +74 -0
- package/Samples~/ExampleTemplates/Examples/Textures/Bark/Bark_Oak_N.png +0 -0
- package/Samples~/ExampleTemplates/Examples/Textures/Bark/Bark_Oak_N.png.meta +96 -0
- package/Samples~/ExampleTemplates/Examples/Textures/Bark/Bark_Palm_C.png +0 -0
- package/Samples~/ExampleTemplates/Examples/Textures/Bark/Bark_Palm_C.png.meta +74 -0
- package/Samples~/ExampleTemplates/Examples/Textures/Bark/Bark_Palm_N.bmp +0 -0
- package/Samples~/ExampleTemplates/Examples/Textures/Bark/Bark_Palm_N.bmp.meta +96 -0
- package/Samples~/ExampleTemplates/Examples/Textures/Bark/Bark_Pine_C.png +0 -0
- package/Samples~/ExampleTemplates/Examples/Textures/Bark/Bark_Pine_C.png.meta +74 -0
- package/Samples~/ExampleTemplates/Examples/Textures/Bark/Bark_Pine_N.png +0 -0
- package/Samples~/ExampleTemplates/Examples/Textures/Bark/Bark_Pine_N.png.meta +96 -0
- package/Samples~/ExampleTemplates/Examples/Textures/Bark.meta +8 -0
- package/Samples~/ExampleTemplates/Examples/Textures/Branch/Branch Serrate_C.png +0 -0
- package/Samples~/ExampleTemplates/Examples/Textures/Branch/Branch Serrate_C.png.meta +96 -0
- package/Samples~/ExampleTemplates/Examples/Textures/Branch/Branch Serrate_N.png +0 -0
- package/Samples~/ExampleTemplates/Examples/Textures/Branch/Branch Serrate_N.png.meta +96 -0
- package/Samples~/ExampleTemplates/Examples/Textures/Branch/Branch_Needles_C.png +0 -0
- package/Samples~/ExampleTemplates/Examples/Textures/Branch/Branch_Needles_C.png.meta +99 -0
- package/Samples~/ExampleTemplates/Examples/Textures/Branch/Branch_Needles_N.png +0 -0
- package/Samples~/ExampleTemplates/Examples/Textures/Branch/Branch_Needles_N.png.meta +96 -0
- package/Samples~/ExampleTemplates/Examples/Textures/Branch/Branch_Palmate_C.png +0 -0
- package/Samples~/ExampleTemplates/Examples/Textures/Branch/Branch_Palmate_C.png.meta +99 -0
- package/Samples~/ExampleTemplates/Examples/Textures/Branch/Branch_Palmate_N.png +0 -0
- package/Samples~/ExampleTemplates/Examples/Textures/Branch/Branch_Palmate_N.png.meta +96 -0
- package/Samples~/ExampleTemplates/Examples/Textures/Branch/Branch_Pine_1_C.png +0 -0
- package/Samples~/ExampleTemplates/Examples/Textures/Branch/Branch_Pine_1_C.png.meta +88 -0
- package/Samples~/ExampleTemplates/Examples/Textures/Branch/Branch_Pine_1_N.png +0 -0
- package/Samples~/ExampleTemplates/Examples/Textures/Branch/Branch_Pine_1_N.png.meta +96 -0
- package/Samples~/ExampleTemplates/Examples/Textures/Branch/Branch_Pine_2_C.png +0 -0
- package/Samples~/ExampleTemplates/Examples/Textures/Branch/Branch_Pine_2_C.png.meta +96 -0
- package/Samples~/ExampleTemplates/Examples/Textures/Branch/Branch_Pine_2_N.png +0 -0
- package/Samples~/ExampleTemplates/Examples/Textures/Branch/Branch_Pine_2_N.png.meta +96 -0
- package/Samples~/ExampleTemplates/Examples/Textures/Branch/Branch_Poplar_C.png +0 -0
- package/Samples~/ExampleTemplates/Examples/Textures/Branch/Branch_Poplar_C.png.meta +96 -0
- package/Samples~/ExampleTemplates/Examples/Textures/Branch/Branch_Poplar_N.png +0 -0
- package/Samples~/ExampleTemplates/Examples/Textures/Branch/Branch_Poplar_N.png.meta +96 -0
- package/Samples~/ExampleTemplates/Examples/Textures/Branch.meta +8 -0
- package/Samples~/ExampleTemplates/Examples/Textures/Color Ramp/Ramp_PSD.psd +0 -0
- package/Samples~/ExampleTemplates/Examples/Textures/Color Ramp/Ramp_PSD.psd.meta +76 -0
- package/Samples~/ExampleTemplates/Examples/Textures/Color Ramp/Ramp_Toon.png +0 -0
- package/Samples~/ExampleTemplates/Examples/Textures/Color Ramp/Ramp_Toon.png.meta +76 -0
- package/Samples~/ExampleTemplates/Examples/Textures/Color Ramp.meta +8 -0
- package/Samples~/ExampleTemplates/Examples/Textures/Single Leafs/Leaf_Fern_C.png +0 -0
- package/Samples~/ExampleTemplates/Examples/Textures/Single Leafs/Leaf_Fern_C.png.meta +99 -0
- package/Samples~/ExampleTemplates/Examples/Textures/Single Leafs/Leaf_Fern_N.png +0 -0
- package/Samples~/ExampleTemplates/Examples/Textures/Single Leafs/Leaf_Fern_N.png.meta +88 -0
- package/Samples~/ExampleTemplates/Examples/Textures/Single Leafs/Leaf_Palm_C.png +0 -0
- package/Samples~/ExampleTemplates/Examples/Textures/Single Leafs/Leaf_Palm_C.png.meta +88 -0
- package/Samples~/ExampleTemplates/Examples/Textures/Single Leafs/Leaf_Palm_N.png +0 -0
- package/Samples~/ExampleTemplates/Examples/Textures/Single Leafs/Leaf_Palm_N.png.meta +88 -0
- package/Samples~/ExampleTemplates/Examples/Textures/Single Leafs/Leaf_Willow_C.png +0 -0
- package/Samples~/ExampleTemplates/Examples/Textures/Single Leafs/Leaf_Willow_C.png.meta +99 -0
- package/Samples~/ExampleTemplates/Examples/Textures/Single Leafs/Leaf_Willow_N.png +0 -0
- package/Samples~/ExampleTemplates/Examples/Textures/Single Leafs/Leaf_Willow_N.png.meta +88 -0
- package/Samples~/ExampleTemplates/Examples/Textures/Single Leafs/Single_Serrated_C.png +0 -0
- package/Samples~/ExampleTemplates/Examples/Textures/Single Leafs/Single_Serrated_C.png.meta +96 -0
- package/Samples~/ExampleTemplates/Examples/Textures/Single Leafs/Single_Serrated_N.png +0 -0
- package/Samples~/ExampleTemplates/Examples/Textures/Single Leafs/Single_Serrated_N.png.meta +96 -0
- package/Samples~/ExampleTemplates/Examples/Textures/Single Leafs.meta +8 -0
- package/Samples~/ExampleTemplates/Examples/Textures.meta +8 -0
- package/Samples~/ExampleTemplates/Examples/Willow.asset +364 -0
- package/Samples~/ExampleTemplates/Examples/Willow.asset.meta +8 -0
- package/Samples~/ExampleTemplates/Examples.meta +8 -0
- package/Samples~/ExampleTemplates/Examples.unity +12660 -0
- package/Samples~/ExampleTemplates/Examples.unity.meta +7 -0
- package/Samples~/ExampleTemplates.meta +8 -0
- package/Shaders/BarkShader.shadergraph +17215 -0
- package/Shaders/BarkShader.shadergraph.meta +10 -0
- package/Shaders/Editor/BarkEditor.cs +100 -0
- package/Shaders/Editor/BarkEditor.cs.meta +11 -0
- package/Shaders/Editor/LeafEditor.cs +173 -0
- package/Shaders/Editor/LeafEditor.cs.meta +11 -0
- package/Shaders/Editor.meta +8 -0
- package/Shaders/LeafShader.shadergraph +34803 -0
- package/Shaders/LeafShader.shadergraph.meta +10 -0
- package/Shaders/MTree.Shaders.asmdef +3 -0
- package/Shaders/MTree.Shaders.asmdef.meta +7 -0
- package/Shaders/leafFunctions.hlsl +201 -0
- package/Shaders/leafFunctions.hlsl.meta +7 -0
- package/Shaders/vertexFunc.hlsl +55 -0
- package/Shaders/vertexFunc.hlsl.meta +7 -0
- package/Shaders.meta +8 -0
- package/package.json +36 -0
- package/package.json.meta +7 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
fileFormatVersion: 2
|
|
2
|
+
guid: 2139360011e9319499772e0bfe994b7e
|
|
3
|
+
ScriptedImporter:
|
|
4
|
+
internalIDToNameTable: []
|
|
5
|
+
externalObjects: {}
|
|
6
|
+
serializedVersion: 2
|
|
7
|
+
userData:
|
|
8
|
+
assetBundleName:
|
|
9
|
+
assetBundleVariant:
|
|
10
|
+
script: {fileID: 11500000, guid: 625f186215c104763be7675aa2d941aa, type: 3}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
using System.Collections;
|
|
2
|
+
using System.Collections.Generic;
|
|
3
|
+
using UnityEditor;
|
|
4
|
+
using UnityEngine;
|
|
5
|
+
using UnityEngine.Rendering;
|
|
6
|
+
|
|
7
|
+
public class BarkEditor : ShaderGUI
|
|
8
|
+
{
|
|
9
|
+
enum DetailSettings
|
|
10
|
+
{
|
|
11
|
+
On,
|
|
12
|
+
Off
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
DetailSettings dSets;
|
|
16
|
+
|
|
17
|
+
public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] properties)
|
|
18
|
+
{
|
|
19
|
+
Material targetMat = materialEditor.target as Material;
|
|
20
|
+
//materialEditor.PropertiesDefaultGUI(properties);
|
|
21
|
+
|
|
22
|
+
//base.OnGUI(materialEditor, properties);
|
|
23
|
+
for (int i = 0; i < properties.Length; i++)
|
|
24
|
+
{
|
|
25
|
+
var property = properties[i];
|
|
26
|
+
|
|
27
|
+
DrawHeaders(i);
|
|
28
|
+
if ((property.propertyFlags & ShaderPropertyFlags.HideInInspector) == 0)
|
|
29
|
+
{
|
|
30
|
+
CheckProperty(materialEditor, property);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
EditorGUILayout.Space();
|
|
35
|
+
EditorGUILayout.Space();
|
|
36
|
+
if (SupportedRenderingFeatures.active.editableMaterialRenderQueue)
|
|
37
|
+
{
|
|
38
|
+
materialEditor.RenderQueueField();
|
|
39
|
+
}
|
|
40
|
+
materialEditor.EnableInstancingField();
|
|
41
|
+
materialEditor.DoubleSidedGIField();
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
void CheckProperty(MaterialEditor materialEditor, MaterialProperty property)
|
|
45
|
+
{
|
|
46
|
+
if (property.name == "_CullMode")
|
|
47
|
+
{
|
|
48
|
+
//mode = (CullMode)property.floatValue;
|
|
49
|
+
//mode = (CullMode)DrawEnum(mode, property.displayName);
|
|
50
|
+
//property.floatValue = (int)mode;
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
if (property.name == "_BaseDetail")
|
|
54
|
+
{
|
|
55
|
+
dSets = (DetailSettings)property.floatValue;
|
|
56
|
+
dSets = (DetailSettings)DrawEnum(dSets, property.displayName);
|
|
57
|
+
property.floatValue = (int)dSets;
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
materialEditor.ShaderProperty(property, property.displayName);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
System.Enum DrawEnum(System.Enum mode, string label)
|
|
64
|
+
{
|
|
65
|
+
EditorGUILayout.BeginHorizontal();
|
|
66
|
+
EditorGUILayout.LabelField(label);
|
|
67
|
+
mode = EditorGUILayout.EnumPopup(mode);
|
|
68
|
+
EditorGUILayout.EndHorizontal();
|
|
69
|
+
return mode;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
void DrawHeaders(int index)
|
|
73
|
+
{
|
|
74
|
+
GUIStyle headerStyle = new GUIStyle(EditorStyles.boldLabel);
|
|
75
|
+
headerStyle.fontSize = 14;
|
|
76
|
+
|
|
77
|
+
if (index == 0)
|
|
78
|
+
{
|
|
79
|
+
EditorGUILayout.LabelField("General Settings", headerStyle);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
if (index == 5)
|
|
83
|
+
{
|
|
84
|
+
EditorGUILayout.Space();
|
|
85
|
+
EditorGUILayout.LabelField("Detail Settings", headerStyle);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
if (index == 12)
|
|
89
|
+
{
|
|
90
|
+
EditorGUILayout.Space();
|
|
91
|
+
EditorGUILayout.LabelField("Other Settings", headerStyle);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
if (index == 15)
|
|
95
|
+
{
|
|
96
|
+
EditorGUILayout.Space();
|
|
97
|
+
EditorGUILayout.LabelField("Wind Settings", headerStyle);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
using System.Collections;
|
|
2
|
+
using System.Collections.Generic;
|
|
3
|
+
using UnityEngine;
|
|
4
|
+
using UnityEditor;
|
|
5
|
+
using UnityEngine.Rendering;
|
|
6
|
+
|
|
7
|
+
public class LeafEditor : ShaderGUI
|
|
8
|
+
{
|
|
9
|
+
enum CullMode
|
|
10
|
+
{
|
|
11
|
+
Off,
|
|
12
|
+
Front,
|
|
13
|
+
Back
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
enum DoubleSidedNormal
|
|
17
|
+
{
|
|
18
|
+
Flip,
|
|
19
|
+
Mirror,
|
|
20
|
+
None
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
enum ColorShifting
|
|
24
|
+
{
|
|
25
|
+
On,
|
|
26
|
+
Off
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
enum TranslucencyEnum
|
|
30
|
+
{
|
|
31
|
+
Off,
|
|
32
|
+
On
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
enum ColorSource
|
|
36
|
+
{
|
|
37
|
+
Global,
|
|
38
|
+
Custom
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
enum WindModeLeaves
|
|
42
|
+
{
|
|
43
|
+
Leaves,
|
|
44
|
+
Palm,
|
|
45
|
+
Grass,
|
|
46
|
+
Off
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
CullMode mode;
|
|
50
|
+
DoubleSidedNormal dsNorm;
|
|
51
|
+
ColorShifting colShift;
|
|
52
|
+
TranslucencyEnum transEnum;
|
|
53
|
+
ColorSource colSource;
|
|
54
|
+
WindModeLeaves windMode;
|
|
55
|
+
|
|
56
|
+
public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] properties)
|
|
57
|
+
{
|
|
58
|
+
Material targetMat = materialEditor.target as Material;
|
|
59
|
+
//materialEditor.PropertiesDefaultGUI(properties);
|
|
60
|
+
|
|
61
|
+
//base.OnGUI(materialEditor, properties);
|
|
62
|
+
for (int i = 0; i < properties.Length; i++)
|
|
63
|
+
{
|
|
64
|
+
var property = properties[i];
|
|
65
|
+
|
|
66
|
+
DrawHeaders(i);
|
|
67
|
+
if ((property.propertyFlags & ShaderPropertyFlags.HideInInspector) == 0)
|
|
68
|
+
{
|
|
69
|
+
CheckProperty(materialEditor, property);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
EditorGUILayout.Space();
|
|
74
|
+
EditorGUILayout.Space();
|
|
75
|
+
if (SupportedRenderingFeatures.active.editableMaterialRenderQueue)
|
|
76
|
+
{
|
|
77
|
+
materialEditor.RenderQueueField();
|
|
78
|
+
}
|
|
79
|
+
materialEditor.EnableInstancingField();
|
|
80
|
+
materialEditor.DoubleSidedGIField();
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
void CheckProperty(MaterialEditor materialEditor, MaterialProperty property)
|
|
84
|
+
{
|
|
85
|
+
if(property.name == "_CullMode")
|
|
86
|
+
{
|
|
87
|
+
mode = (CullMode)property.floatValue;
|
|
88
|
+
mode = (CullMode)DrawEnum(mode, property.displayName);
|
|
89
|
+
property.floatValue = (int)mode;
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
if (property.name == "_DoubleSidedNormalMode")
|
|
93
|
+
{
|
|
94
|
+
dsNorm = (DoubleSidedNormal)property.floatValue;
|
|
95
|
+
dsNorm = (DoubleSidedNormal)DrawEnum(dsNorm, property.displayName);
|
|
96
|
+
property.floatValue = (int)dsNorm;
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
if (property.name == "_ColorShifting")
|
|
100
|
+
{
|
|
101
|
+
colShift = (ColorShifting)property.floatValue;
|
|
102
|
+
colShift = (ColorShifting)DrawEnum(colShift, property.displayName);
|
|
103
|
+
property.floatValue = (int)colShift;
|
|
104
|
+
return;
|
|
105
|
+
}
|
|
106
|
+
if (property.name == "_TranslucencyEnum")
|
|
107
|
+
{
|
|
108
|
+
transEnum = (TranslucencyEnum)property.floatValue;
|
|
109
|
+
transEnum = (TranslucencyEnum)DrawEnum(transEnum, property.displayName);
|
|
110
|
+
property.floatValue = (int)transEnum;
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
if (property.name == "_ColorSource")
|
|
114
|
+
{
|
|
115
|
+
colSource = (ColorSource)property.floatValue;
|
|
116
|
+
colSource = (ColorSource)DrawEnum(colSource, property.displayName);
|
|
117
|
+
property.floatValue = (int)colSource;
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
if (property.name == "_WindModeLeaves")
|
|
121
|
+
{
|
|
122
|
+
windMode = (WindModeLeaves)property.floatValue;
|
|
123
|
+
windMode = (WindModeLeaves)DrawEnum(windMode, property.displayName);
|
|
124
|
+
property.floatValue = (int)windMode;
|
|
125
|
+
return;
|
|
126
|
+
}
|
|
127
|
+
materialEditor.ShaderProperty(property, property.displayName);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
System.Enum DrawEnum(System.Enum mode, string label)
|
|
131
|
+
{
|
|
132
|
+
EditorGUILayout.BeginHorizontal();
|
|
133
|
+
EditorGUILayout.LabelField(label);
|
|
134
|
+
mode = EditorGUILayout.EnumPopup(mode);
|
|
135
|
+
EditorGUILayout.EndHorizontal();
|
|
136
|
+
return mode;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
void DrawHeaders(int index)
|
|
140
|
+
{
|
|
141
|
+
GUIStyle headerStyle = new GUIStyle(EditorStyles.boldLabel);
|
|
142
|
+
headerStyle.fontSize = 14;
|
|
143
|
+
|
|
144
|
+
if (index == 0)
|
|
145
|
+
{
|
|
146
|
+
EditorGUILayout.LabelField("General Settings", headerStyle);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
if (index == 7)
|
|
150
|
+
{
|
|
151
|
+
EditorGUILayout.Space();
|
|
152
|
+
EditorGUILayout.LabelField("Color Settings", headerStyle);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
if (index == 12)
|
|
156
|
+
{
|
|
157
|
+
EditorGUILayout.Space();
|
|
158
|
+
EditorGUILayout.LabelField("Translucency Settings", headerStyle);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
if (index == 19)
|
|
162
|
+
{
|
|
163
|
+
EditorGUILayout.Space();
|
|
164
|
+
EditorGUILayout.LabelField("Other Settings", headerStyle);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
if (index == 22)
|
|
168
|
+
{
|
|
169
|
+
EditorGUILayout.Space();
|
|
170
|
+
EditorGUILayout.LabelField("Wind Settings", headerStyle);
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
}
|