summaryrefslogtreecommitdiffstats
path: root/Scripts/Fold/Editor/FoldNodeSerialized.cs
diff options
context:
space:
mode:
authoryum <yum.food.vr@gmail.com>2026-01-02 16:21:34 -0800
committeryum <yum.food.vr@gmail.com>2026-01-02 17:32:14 -0800
commitfcc76b257ef5cfb4514669df3b0144f8e8dd76ef (patch)
treebb6e73c8f199699b3e88afb85e24e2c8b3df5aab /Scripts/Fold/Editor/FoldNodeSerialized.cs
parent43d81e11992c11eda06e4b67d2c5bd0b9c4b729b (diff)
Fold: implement dynamic branching in shader
Switch from static branching approach using per-op data and fixed execution order to dynamic branching approach using dynamic data. This confers the main benefit of letting us dynamically reorder ops and duplicate them. It also lets us eliminate some of the plumbing tedium whenever we want to add new ops.
Diffstat (limited to 'Scripts/Fold/Editor/FoldNodeSerialized.cs')
-rw-r--r--Scripts/Fold/Editor/FoldNodeSerialized.cs4
1 files changed, 4 insertions, 0 deletions
diff --git a/Scripts/Fold/Editor/FoldNodeSerialized.cs b/Scripts/Fold/Editor/FoldNodeSerialized.cs
index 4836811..62431ae 100644
--- a/Scripts/Fold/Editor/FoldNodeSerialized.cs
+++ b/Scripts/Fold/Editor/FoldNodeSerialized.cs
@@ -2,11 +2,15 @@ using UnityEngine;
public class FoldNodeSerialized
{
+ public int opcode;
+
+ // Correspond to _Vertex_Deformation_Float_0, etc.
public float float0;
public float float1;
public float float2;
public float float3;
+ // _Vertex_Deformation_Vector_0, etc.
public Vector4 vec0;
public Vector4 vec1;
public Vector4 vec2;