Class GenerateHLSL
Attribute specifying that HLSL code should be generated.
Inherited Members
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 |