diff options
| author | yum <yum.food.vr@gmail.com> | 2026-02-17 18:52:17 -0800 |
|---|---|---|
| committer | yum <yum.food.vr@gmail.com> | 2026-02-17 18:52:17 -0800 |
| commit | 00553b3f305d0e2217659993f237ff3da604ef85 (patch) | |
| tree | 76d048fcfb005cf7427f43bb6539d1ef59b75bf3 /Scripts/Fold/Editor/README.md | |
| parent | 0783345c23701149b807d2063410e329ba1fbed6 (diff) | |
Fold: add plane to octahedron code
Diffstat (limited to 'Scripts/Fold/Editor/README.md')
| -rwxr-xr-x | Scripts/Fold/Editor/README.md | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/Scripts/Fold/Editor/README.md b/Scripts/Fold/Editor/README.md index d2b7494..7e6224a 100755 --- a/Scripts/Fold/Editor/README.md +++ b/Scripts/Fold/Editor/README.md @@ -89,47 +89,6 @@ Applies fractal Brownian motion deformation. ### Custom(opcode, f0-f3, v0-v3) For advanced use cases or custom opcodes. -## Presets (Code) - -Use built-in presets from code: - -```csharp -FoldPresets.TubeToPlaneFull(material); -FoldPresets.NormConvL2ToL1(material); -FoldPresets.NormConvL2ToLinf(material); -``` - -## Adding Custom Presets - -Edit `FoldEditorWindow.cs` to add presets to the "Load Presets" menu: - -```csharp -// In ShowPresetsMenu(): -menu.AddItem(new GUIContent("My Custom Effect"), false, () => LoadPreset_MyEffect()); - -// Add the preset loader method: -void LoadPreset_MyEffect() -{ - operations.Clear(); - AddOperation(new TubeToPlaneOp()); - var norm = new NormConversionOp(); - norm.inputK = 2f; - norm.outputK = 1f; - AddOperation(norm); -} -``` - -Or use the fluent API in code: - -```csharp -public static void MyCustomEffect(Material mat) => - FoldPipelineBuilder.Create() - .For(mat) - .TubeToPlane(Vector3.zero, Vector3.right, Vector3.forward, 1f) - .NormConversion(2f, 1f, 0.5f) - .Apply(); -``` - ## Pipeline Chaining Operations are applied in the order they're chained: |
