@@ -419,8 +419,8 @@ namespace FlaxEditor.Surface.Archetypes
|
|||||||
NodeElementArchetype.Factory.Input(0, "Texture", true, typeof(FlaxEngine.Object), 0),
|
NodeElementArchetype.Factory.Input(0, "Texture", true, typeof(FlaxEngine.Object), 0),
|
||||||
NodeElementArchetype.Factory.Input(1, "Scale", true, typeof(float), 1, 0),
|
NodeElementArchetype.Factory.Input(1, "Scale", true, typeof(float), 1, 0),
|
||||||
NodeElementArchetype.Factory.Input(2, "Blend", true, typeof(float), 2, 1),
|
NodeElementArchetype.Factory.Input(2, "Blend", true, typeof(float), 2, 1),
|
||||||
NodeElementArchetype.Factory.Input(3, "Offset", true, typeof(Float2), 3, 2),
|
NodeElementArchetype.Factory.Input(3, "Offset", true, typeof(Float2), 6, 2),
|
||||||
NodeElementArchetype.Factory.Output(0, "Color", typeof(Float4), 5),
|
NodeElementArchetype.Factory.Output(0, "Color", typeof(Float4), 3),
|
||||||
NodeElementArchetype.Factory.Text(0, Surface.Constants.LayoutOffsetY * 4, "Sampler"),
|
NodeElementArchetype.Factory.Text(0, Surface.Constants.LayoutOffsetY * 4, "Sampler"),
|
||||||
NodeElementArchetype.Factory.ComboBox(50, Surface.Constants.LayoutOffsetY * 4 - 1, 100, 3, typeof(CommonSamplerType)),
|
NodeElementArchetype.Factory.ComboBox(50, Surface.Constants.LayoutOffsetY * 4 - 1, 100, 3, typeof(CommonSamplerType)),
|
||||||
NodeElementArchetype.Factory.Text(155, Surface.Constants.LayoutOffsetY * 4, "Local"),
|
NodeElementArchetype.Factory.Text(155, Surface.Constants.LayoutOffsetY * 4, "Local"),
|
||||||
@@ -485,8 +485,8 @@ namespace FlaxEditor.Surface.Archetypes
|
|||||||
NodeElementArchetype.Factory.Input(0, "Texture", true, typeof(FlaxEngine.Object), 0),
|
NodeElementArchetype.Factory.Input(0, "Texture", true, typeof(FlaxEngine.Object), 0),
|
||||||
NodeElementArchetype.Factory.Input(1, "Scale", true, typeof(float), 1, 0),
|
NodeElementArchetype.Factory.Input(1, "Scale", true, typeof(float), 1, 0),
|
||||||
NodeElementArchetype.Factory.Input(2, "Blend", true, typeof(float), 2, 1),
|
NodeElementArchetype.Factory.Input(2, "Blend", true, typeof(float), 2, 1),
|
||||||
NodeElementArchetype.Factory.Input(3, "Offset", true, typeof(Float2), 3, 2),
|
NodeElementArchetype.Factory.Input(3, "Offset", true, typeof(Float2), 6, 2),
|
||||||
NodeElementArchetype.Factory.Output(0, "Vector", typeof(Float3), 5),
|
NodeElementArchetype.Factory.Output(0, "Vector", typeof(Float3), 3),
|
||||||
NodeElementArchetype.Factory.Text(0, Surface.Constants.LayoutOffsetY * 4, "Sampler"),
|
NodeElementArchetype.Factory.Text(0, Surface.Constants.LayoutOffsetY * 4, "Sampler"),
|
||||||
NodeElementArchetype.Factory.ComboBox(50, Surface.Constants.LayoutOffsetY * 4 - 1, 100, 3, typeof(CommonSamplerType)),
|
NodeElementArchetype.Factory.ComboBox(50, Surface.Constants.LayoutOffsetY * 4 - 1, 100, 3, typeof(CommonSamplerType)),
|
||||||
NodeElementArchetype.Factory.Text(155, Surface.Constants.LayoutOffsetY * 4, "Local"),
|
NodeElementArchetype.Factory.Text(155, Surface.Constants.LayoutOffsetY * 4, "Local"),
|
||||||
|
|||||||
@@ -706,11 +706,11 @@ void MaterialGenerator::ProcessGroupTextures(Box* box, Node* node, Value& value)
|
|||||||
const auto texture = eatBox(textureBox->GetParent<Node>(), textureBox->FirstConnection());
|
const auto texture = eatBox(textureBox->GetParent<Node>(), textureBox->FirstConnection());
|
||||||
const auto scale = tryGetValue(node->GetBox(1), node->Values[0]).AsFloat();
|
const auto scale = tryGetValue(node->GetBox(1), node->Values[0]).AsFloat();
|
||||||
const auto blend = tryGetValue(node->GetBox(2), node->Values[1]).AsFloat();
|
const auto blend = tryGetValue(node->GetBox(2), node->Values[1]).AsFloat();
|
||||||
const auto offset = tryGetValue(node->GetBox(3), node->Values.Count() > 2 ? node->Values[2] : Float2::Zero).AsFloat2();
|
const auto offset = tryGetValue(node->TryGetBox(6), node->Values.Count() >= 3 ? node->Values[2] : Float2::Zero).AsFloat2();
|
||||||
const bool local = node->Values.Count() >= 5 ? node->Values[4].AsBool : false;
|
const bool local = node->Values.Count() >= 5 ? node->Values[4].AsBool : false;
|
||||||
|
|
||||||
const Char* samplerName;
|
const Char* samplerName;
|
||||||
const int32 samplerIndex = node->Values[3].AsInt;
|
const int32 samplerIndex = node->Values.Count() >= 4 ? node->Values[3].AsInt : LinearWrap;
|
||||||
if (samplerIndex == TextureGroup)
|
if (samplerIndex == TextureGroup)
|
||||||
{
|
{
|
||||||
auto& textureGroupSampler = findOrAddTextureGroupSampler(node->Values[3].AsInt);
|
auto& textureGroupSampler = findOrAddTextureGroupSampler(node->Values[3].AsInt);
|
||||||
@@ -795,7 +795,7 @@ void MaterialGenerator::ProcessGroupTextures(Box* box, Node* node, Value& value)
|
|||||||
const auto texture = eatBox(textureBox->GetParent<Node>(), textureBox->FirstConnection());
|
const auto texture = eatBox(textureBox->GetParent<Node>(), textureBox->FirstConnection());
|
||||||
const auto scale = tryGetValue(node->GetBox(1), node->Values[0]).AsFloat();
|
const auto scale = tryGetValue(node->GetBox(1), node->Values[0]).AsFloat();
|
||||||
const auto blend = tryGetValue(node->GetBox(2), node->Values[1]).AsFloat();
|
const auto blend = tryGetValue(node->GetBox(2), node->Values[1]).AsFloat();
|
||||||
const auto offset = tryGetValue(node->GetBox(3), node->Values[2]).AsFloat2();
|
const auto offset = tryGetValue(node->GetBox(6), node->Values[2]).AsFloat2();
|
||||||
const bool local = node->Values.Count() >= 5 ? node->Values[4].AsBool : false;
|
const bool local = node->Values.Count() >= 5 ? node->Values[4].AsBool : false;
|
||||||
|
|
||||||
const Char* samplerName;
|
const Char* samplerName;
|
||||||
|
|||||||
Reference in New Issue
Block a user