Class GenerateHLSL
Attribute specifying that HLSL code should be generated.
Namespace: UnityEngine.Rendering
Syntax
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Enum)]
public class GenerateHLSL : Attribute, _Attribute
Constructors
GenerateHLSL(PackingRules, Boolean, Boolean, Boolean, Int32, Boolean, Boolean)
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)
Parameters
Type | Name | Description |
---|---|---|
PackingRules | rules | Packing rules. |
Boolean | needAccessors | Need accessors. |
Boolean | needSetters | Need setters. |
Boolean | needParamDebug | Need debug defines. |
Int32 | paramDefinesStart | Start value of debug defines. |
Boolean | omitStructDeclaration | Omit structure declaration. |
Boolean | containsPackedFields | Contains packed fields. |
Fields
containsPackedFields
Structure contains packed fields.
Declaration
public bool containsPackedFields
Field Value
Type | Description |
---|---|
Boolean |
needAccessors
Structure needs generated accessors.
Declaration
public bool needAccessors
Field Value
Type | Description |
---|---|
Boolean |
needParamDebug
Structure needs generated debug defines and functions.
Declaration
public bool needParamDebug
Field Value
Type | Description |
---|---|
Boolean |
needSetters
Structure needs generated setters.
Declaration
public bool needSetters
Field Value
Type | Description |
---|---|
Boolean |
omitStructDeclaration
Generate structure declaration or not.
Declaration
public bool omitStructDeclaration
Field Value
Type | Description |
---|---|
Boolean |
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 |
---|---|
Int32 |