Add **Sample Global SDF** node to materials

This commit is contained in:
Wojciech Figat
2022-03-25 10:09:52 +01:00
parent dff1b37a3b
commit b847b9ccba
13 changed files with 94 additions and 20 deletions

View File

@@ -358,6 +358,19 @@ namespace FlaxEditor.Surface.Archetypes
NodeElementArchetype.Factory.Input(1, "Location", true, null, 2),
}
},
new NodeArchetype
{
TypeID = 14,
Title = "Sample Global SDF",
Description = "Samples the Global SDF to get the distance to the closest surface (in world-space). Requires models SDF to be generated and checking `Enable Global SDF` in Graphics Settings.",
Flags = NodeFlags.MaterialGraph,
Size = new Vector2(200, 20),
Elements = new[]
{
NodeElementArchetype.Factory.Output(0, "Distance", typeof(float), 0),
NodeElementArchetype.Factory.Input(0, "World Position", true, typeof(Vector3), 1),
}
},
};
}
}