AddGraphicsStatesFromReference
Generates and adds new graphics states from arrays of assets, using a reference graphics state to initialize unspecified values.
Read time 4 minutesLast updated 10 days ago
Definition
- Type: Method
- Namespace: UnityEngine.VFX
- Assembly: UnityEngine.VFXModule
AddGraphicsStatesFromReference(GraphicsStateCollection, GraphicsState, VisualEffectAsset[], int, NativeArray<AttachmentDescriptor>, NativeArray<SubPassDescriptor>, int, int, int)
Generates and adds new graphics states from arrays of assets, using a reference graphics state to initialize unspecified values.
public static bool AddGraphicsStatesFromReference(this GraphicsStateCollection graphicsStateCollection, GraphicsStateCollection.GraphicsState refState, VisualEffectAsset[] visualEffectAssets, int samples, NativeArray<AttachmentDescriptor> attachments, NativeArray<SubPassDescriptor> subPasses, int subPassIndex = 0, int depthAttachmentIndex = -1, int shadingRateIndex = -1)
Parameters
The GraphicsStateCollection in which to add the graphics state.
The reference GraphicsState to use as a template for initializing unspecified values.
An array of VisualEffectAsset files to scan for each unique mesh and shader pairs.
The number of samples per pixel in this rendering configuration.
The array of color attachments used in this rendering configuration.
The array containing information of each subpass.
The index of the active subpass in this rendering configuration.
The index of the attachment to be used as the depth/stencil buffer for this rendering configuration.
The index of the attachment to be used as the shading rate image for this rendering configuration.
Returns
Type | Description |
|---|---|
| bool | True if at least one new graphics state was successfully added, false otherwise. |
Remarks
This function operates like VFXGraphicsStateCollectionBindings.AddGraphicsStates, but instead of using default values for GraphicsStateCollection.GraphicsState fields, it copies values from the provided for any fields not determined by the input parameters.
refStateAdditional Resources: VFXGraphicsStateCollectionBindings.AddGraphicsStates, CommandBuffer.BeginRenderPass
AddGraphicsStatesFromReference(GraphicsStateCollection, GraphicsState, VisualEffectAsset[], GlobalKeyword[], int, NativeArray<AttachmentDescriptor>, NativeArray<SubPassDescriptor>, int, int, int)
Generates and adds new graphics states from arrays of assets, using a reference graphics state to initialize unspecified values.
public static bool AddGraphicsStatesFromReference(this GraphicsStateCollection graphicsStateCollection, GraphicsStateCollection.GraphicsState refState, VisualEffectAsset[] visualEffectAssets, GlobalKeyword[] globalKeywords, int samples, NativeArray<AttachmentDescriptor> attachments, NativeArray<SubPassDescriptor> subPasses, int subPassIndex = 0, int depthAttachmentIndex = -1, int shadingRateIndex = -1)
Parameters
The GraphicsStateCollection in which to add the graphics state.
The reference GraphicsState to use as a template for initializing unspecified values.
An array of VisualEffectAsset files to scan for each unique mesh and shader pairs.
An array of GlobalKeyword objects to use in conjunction with each material's enabled keywords when generating shader variants.
The number of samples per pixel in this rendering configuration.
The array of color attachments used in this rendering configuration.
The array containing information of each subpass.
The index of the active subpass in this rendering configuration.
The index of the attachment to be used as the depth/stencil buffer for this rendering configuration.
The index of the attachment to be used as the shading rate image for this rendering configuration.
Returns
Type | Description |
|---|---|
| bool | True if at least one new graphics state was successfully added, false otherwise. |
Remarks
This function operates like VFXGraphicsStateCollectionBindings.AddGraphicsStates, but instead of using default values for GraphicsStateCollection.GraphicsState fields, it copies values from the provided for any fields not determined by the input parameters.
refStateAdditional Resources: VFXGraphicsStateCollectionBindings.AddGraphicsStates, CommandBuffer.BeginRenderPass
AddGraphicsStatesFromReference(GraphicsStateCollection, GraphicsState, VisualEffectAsset[])
Generates and adds new graphics states from arrays of assets, using a reference graphics state to initialize unspecified values.
public static bool AddGraphicsStatesFromReference(this GraphicsStateCollection graphicsStateCollection, GraphicsStateCollection.GraphicsState refState, VisualEffectAsset[] visualEffectAssets)
Parameters
The GraphicsStateCollection in which to add the graphics state.
The reference GraphicsState to use as a template for initializing unspecified values.
An array of VisualEffectAsset files to scan for each unique mesh and shader pairs.
Returns
Type | Description |
|---|---|
| bool | True if at least one new graphics state was successfully added, false otherwise. |
Remarks
This function operates like VFXGraphicsStateCollectionBindings.AddGraphicsStates, but instead of using default values for GraphicsStateCollection.GraphicsState fields, it copies values from the provided for any fields not determined by the input parameters.
refStateAdditional Resources: VFXGraphicsStateCollectionBindings.AddGraphicsStates, CommandBuffer.BeginRenderPass
AddGraphicsStatesFromReference(GraphicsStateCollection, GraphicsState, VisualEffectAsset[], GlobalKeyword[])
Generates and adds new graphics states from arrays of assets, using a reference graphics state to initialize unspecified values.
public static bool AddGraphicsStatesFromReference(this GraphicsStateCollection graphicsStateCollection, GraphicsStateCollection.GraphicsState refState, VisualEffectAsset[] visualEffectAssets, GlobalKeyword[] globalKeywords)
Parameters
The GraphicsStateCollection in which to add the graphics state.
The reference GraphicsState to use as a template for initializing unspecified values.
An array of VisualEffectAsset files to scan for each unique mesh and shader pairs.
An array of GlobalKeyword objects to use in conjunction with each material's enabled keywords when generating shader variants.
Returns
Type | Description |
|---|---|
| bool | True if at least one new graphics state was successfully added, false otherwise. |
Remarks
This function operates like VFXGraphicsStateCollectionBindings.AddGraphicsStates, but instead of using default values for GraphicsStateCollection.GraphicsState fields, it copies values from the provided for any fields not determined by the input parameters.
refStateAdditional Resources: VFXGraphicsStateCollectionBindings.AddGraphicsStates, CommandBuffer.BeginRenderPass