internal static void AttributeModeLabel(string Label, VFXAttributeMode mode, GUIStyle style, params GUILayoutOption[] options) { Color backup = GUI.color; GUI.color = attributeModeColors[mode]; EditorGUILayout.LabelField(Label, style, options); GUI.color = backup; }
private static string GetInputModifier(VFXAttributeMode mode) { if ((mode & VFXAttributeMode.Write) != 0) { return("inout "); } return(string.Empty); }
public static IEnumerable <VFXAttributeInfo> GetAttributes(Mode mode, VFXAttributeMode attrMode) { yield return(new VFXAttributeInfo(VFXAttribute.SizeX, attrMode)); if ((int)mode > (int)Mode.X) { yield return(new VFXAttributeInfo(VFXAttribute.SizeY, attrMode)); } if ((int)mode > (int)Mode.XY) { yield return(new VFXAttributeInfo(VFXAttribute.SizeZ, attrMode)); } }
public VFXAttributeMode GetAttributeMode(VFXAttribute attrib) { VFXAttributeMode mode = VFXAttributeMode.None; Dictionary <VFXContext, VFXAttributeMode> contexts; if (m_AttributesToContexts.TryGetValue(attrib, out contexts)) { foreach (var context in contexts) { mode |= context.Value; } } return(mode); }
public override string GetAttributeDataDeclaration(VFXAttributeMode mode) { if (m_StoredCurrentAttributes.Count == 0) { return(string.Empty); } else if ((mode & VFXAttributeMode.Write) != 0) { return("RWByteAddressBuffer attributeData;"); } else { return("ByteAddressBuffer attributeData;"); } }
internal static void AttributeModeLabel(string Label, VFXAttributeMode mode, GUIStyle style, params GUILayoutOption[] options) { Color backup = GUI.color; var c = new Color32(160, 160, 160, 255); if ((mode & VFXAttributeMode.Read) != 0) { c.b = 255; } if ((mode & VFXAttributeMode.Write) != 0) { c.r = 255; } if ((mode & VFXAttributeMode.ReadSource) != 0) { c.g = 255; } GUI.color = c; GUILayout.Label(Label, style, options); GUI.color = backup; }
public abstract string GetAttributeDataDeclaration(VFXAttributeMode mode);
public override string GetAttributeDataDeclaration(VFXAttributeMode mode) { throw new NotImplementedException(); }
public VFXAttributeInfo(VFXAttribute attrib, VFXAttributeMode mode) { this.attrib = attrib; this.mode = mode; }
//constructor to suppress "field is never assigned" warning public AttributeDeclarationInfo(string x, VFXAttributeMode y) { name = x; mode = y; }