You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

35 lines
1.2 KiB

using System.Collections.Generic;
namespace UnityEditor.VFX
{
class VFXStripTopologyProvider : VariantProvider
{
public override IEnumerable<Variant> GetVariants()
{
yield return new Variant(
"Output Particle ShaderGraph Quad Strip",
"Output",
typeof(VFXComposedParticleStripOutput),
new[] { new KeyValuePair<string, object>("m_Topology", new ParticleTopologyQuadStrip()) });
}
}
[VFXInfo(variantProvider = typeof(VFXStripTopologyProvider))]
sealed class VFXComposedParticleStripOutput : VFXAbstractComposedParticleOutput
{
VFXComposedParticleStripOutput() : base(true) { }
internal override void GenerateErrors(VFXErrorReporter report)
{
base.GenerateErrors(report);
foreach (var attributeInfo in GetAttributesInfos())
{
if (attributeInfo.mode.HasFlag(VFXAttributeMode.Write) && attributeInfo.attrib.Equals(VFXAttribute.Position))
{
report.RegisterError("WritePositionInStrip", VFXErrorType.Warning, VFXQuadStripOutput.WriteToPositionMessage, this);
break;
}
}
}
}
}