Add Texture Size node to particles

This commit is contained in:
Wojtek Figat
2025-06-23 09:31:15 +02:00
parent 6479a3d3c6
commit 867ae2ceaa
3 changed files with 38 additions and 3 deletions

View File

@@ -459,7 +459,7 @@ namespace FlaxEditor.Surface.Archetypes
AlternativeTitles = new string[] { "Lightmap TexCoord" },
Description = "Lightmap UVs",
Flags = NodeFlags.MaterialGraph,
Size = new Float2(110, 30),
Size = new Float2(110, 20),
Elements = new []
{
NodeElementArchetype.Factory.Output(0, "UVs", typeof(Float2), 0)
@@ -493,6 +493,19 @@ namespace FlaxEditor.Surface.Archetypes
NodeElementArchetype.Factory.Bool(190, Surface.Constants.LayoutOffsetY * 4, 4),
}
},
new NodeArchetype
{
TypeID = 24,
Title = "Texture Size",
Description = "Gets the size of the texture (in pixels). If texture is during streaming, then returns size of the highest resident mip.",
Flags = NodeFlags.ParticleEmitterGraph,
Size = new Float2(160, 20),
Elements = new[]
{
NodeElementArchetype.Factory.Input(0, "Texture", true, typeof(FlaxEngine.Object), 0),
NodeElementArchetype.Factory.Output(0, "Size", typeof(Float3), 1),
}
},
};
}
}