docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class GenerateHLSL

    Attribute specifying that HLSL code should be generated.

    Inheritance
    object
    Attribute
    GenerateHLSL
    Inherited Members
    Attribute.Equals(object)
    Attribute.GetCustomAttribute(Assembly, Type)
    Attribute.GetCustomAttribute(Assembly, Type, bool)
    Attribute.GetCustomAttribute(MemberInfo, Type)
    Attribute.GetCustomAttribute(MemberInfo, Type, bool)
    Attribute.GetCustomAttribute(Module, Type)
    Attribute.GetCustomAttribute(Module, Type, bool)
    Attribute.GetCustomAttribute(ParameterInfo, Type)
    Attribute.GetCustomAttribute(ParameterInfo, Type, bool)
    Attribute.GetCustomAttributes(Assembly)
    Attribute.GetCustomAttributes(Assembly, bool)
    Attribute.GetCustomAttributes(Assembly, Type)
    Attribute.GetCustomAttributes(Assembly, Type, bool)
    Attribute.GetCustomAttributes(MemberInfo)
    Attribute.GetCustomAttributes(MemberInfo, bool)
    Attribute.GetCustomAttributes(MemberInfo, Type)
    Attribute.GetCustomAttributes(MemberInfo, Type, bool)
    Attribute.GetCustomAttributes(Module)
    Attribute.GetCustomAttributes(Module, bool)
    Attribute.GetCustomAttributes(Module, Type)
    Attribute.GetCustomAttributes(Module, Type, bool)
    Attribute.GetCustomAttributes(ParameterInfo)
    Attribute.GetCustomAttributes(ParameterInfo, bool)
    Attribute.GetCustomAttributes(ParameterInfo, Type)
    Attribute.GetCustomAttributes(ParameterInfo, Type, bool)
    Attribute.GetHashCode()
    Attribute.IsDefaultAttribute()
    Attribute.IsDefined(Assembly, Type)
    Attribute.IsDefined(Assembly, Type, bool)
    Attribute.IsDefined(MemberInfo, Type)
    Attribute.IsDefined(MemberInfo, Type, bool)
    Attribute.IsDefined(Module, Type)
    Attribute.IsDefined(Module, Type, bool)
    Attribute.IsDefined(ParameterInfo, Type)
    Attribute.IsDefined(ParameterInfo, Type, bool)
    Attribute.Match(object)
    Attribute.TypeId
    object.Equals(object, object)
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEngine.Rendering
    Assembly: Unity.RenderPipelines.Core.Runtime.dll
    Syntax
    [AttributeUsage(AttributeTargets.Class|AttributeTargets.Struct|AttributeTargets.Enum)]
    public class GenerateHLSL : Attribute

    Constructors

    GenerateHLSL(PackingRules, bool, bool, bool, int, bool, bool, bool, int, string)

    GenerateHLSL attribute constructor.

    Declaration
    public GenerateHLSL(PackingRules rules = PackingRules.Exact, bool needAccessors = true, bool needSetters = false, bool needParamDebug = false, int paramDefinesStart = 1, bool omitStructDeclaration = false, bool containsPackedFields = false, bool generateCBuffer = false, int constantRegister = -1, string sourcePath = null)
    Parameters
    Type Name Description
    PackingRules rules

    Packing rules.

    bool needAccessors

    Need accessors.

    bool needSetters

    Need setters.

    bool needParamDebug

    Need debug defines.

    int paramDefinesStart

    Start value of debug defines.

    bool omitStructDeclaration

    Omit structure declaration.

    bool containsPackedFields

    Contains packed fields.

    bool generateCBuffer

    Generate a constant buffer.

    int constantRegister

    When generating a constant buffer, specify the optional constant register.

    string sourcePath

    Location of the source file defining the C# type. (Automatically filled by compiler)

    Fields

    constantRegister

    If specified, when generating a constant buffer, use this explicit register.

    Declaration
    public int constantRegister
    Field Value
    Type Description
    int

    containsPackedFields

    Structure contains packed fields.

    Declaration
    public bool containsPackedFields
    Field Value
    Type Description
    bool

    generateCBuffer

    Generate constant buffer declaration or not.

    Declaration
    public bool generateCBuffer
    Field Value
    Type Description
    bool

    needAccessors

    Structure needs generated accessors.

    Declaration
    public bool needAccessors
    Field Value
    Type Description
    bool

    needParamDebug

    Structure needs generated debug defines and functions.

    Declaration
    public bool needParamDebug
    Field Value
    Type Description
    bool

    needSetters

    Structure needs generated setters.

    Declaration
    public bool needSetters
    Field Value
    Type Description
    bool

    omitStructDeclaration

    Generate structure declaration or not.

    Declaration
    public bool omitStructDeclaration
    Field Value
    Type Description
    bool

    packingRules

    Packing rules for the struct.

    Declaration
    public PackingRules packingRules
    Field Value
    Type Description
    PackingRules

    paramDefinesStart

    Start value of generated defines.

    Declaration
    public int paramDefinesStart
    Field Value
    Type Description
    int

    sourcePath

    Path of the generated file

    Declaration
    public string sourcePath
    Field Value
    Type Description
    string

    Extension Methods

    ReflectionUtils.GetField(object, string)
    ReflectionUtils.GetFields(object)
    ReflectionUtils.Invoke(object, string, params object[])
    ReflectionUtils.SetField(object, string, object)
    AnalyticsUtils.ToNestedColumnWithDefault<T>(T, T, bool)
    AnalyticsUtils.ToNestedColumn<T>(T, T)
    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)