An abstract primitive component to animate and visualize a clipping primitive that can beused to drive per pixel based clipping.
- Materialpropertyblock Performance
- Materialpropertyblock Example
- Materialpropertyblock Batching
- Materialpropertyblock Srp
Inheritance
Graphics: Added array property getters (e.g. GetFloatArray) for Material, MaterialPropertyBlock and Shader class. Graphics: Added bool SystemInfo.usesReversedZBuffer to be able to know if the platform is using a 'reversed' depth buffer. Graphics: Added BuiltinRenderTextureType.ResolvedDepth enum so command buffers can use it. Easily setup GPU instancing / material property blocks to optimize your batches and draw callsAvailalbe at: http://u3d.as/1qXC. MaterialPropertyBlock A block of material values to apply. MaterialPropertyBlock is used by Graphics.DrawMesh. Use it in situations where you want to draw multiple objects with the same material, but slightly different properties. Jun 12, 2019 Hi, I wanna change the texture of my spine animations, with this forum's advice I made it work by using MaterialPropertyBlock. But some animations not working properly, some parts of its attachments are not replaced with the new texture.
Implements
Namespace: Microsoft.MixedReality.Toolkit.Utilities
Assembly: cs.temp.dll.dll
Syntax
Fields
clippingSide
Declaration
Field Value
Type | Description |
---|---|
ClippingPrimitive.Side |
materialPropertyBlock
Declaration
Field Value
Type | Description |
---|---|
MaterialPropertyBlock |
renderers
Declaration
Field Value
Type | Description |
---|---|
List<Renderer> |
Properties
ClippingSide
The renderer(s) that should be affected by the primitive.
Declaration
Property Value
Type | Description |
---|---|
ClippingPrimitive.Side |
ClippingSideProperty
Declaration
Property Value
Type | Description |
---|---|
String |
IsDirty
Keeping track of any field, property or transformation changes to optimize material property block setting.
Declaration
Property Value
Type | Description |
---|---|
Boolean |
Keyword
Declaration
Property Value
Type | Description |
---|---|
String |
UseOnPreRender
Toggles whether the primitive will use the Camera OnPreRender event.
Declaration
Property Value
Type | Description |
---|---|
Boolean |
Remarks
This is especially helpful if you're trying to clip dynamically created objects that may be added to the scene after LateUpdate such as OnWillRender
Methods
AddRenderer(Renderer)
Adds a renderer to the list of objects this clipping primitive clips.
Declaration
Parameters
Type | Name | Description |
---|---|---|
Renderer | _renderer |
ClearRenderers()
Removes all renderers in the list of objects this clipping primitive clips.
Declaration
GetRenderersCopy()
Declaration
Returns
Type | Description |
---|---|
IEnumerable<Renderer> | The current list of renderers. |
Initialize()
Declaration
LateUpdate()
Declaration
OnCameraPreRender(CameraEventRouter)
Declaration
Parameters
Type | Name | Description |
---|---|---|
CameraEventRouter | router |
OnDestroy()
Declaration
OnDisable()
Declaration
OnEnable()
Declaration
OnMaterialChanged(MaterialInstance)
Declaration
Parameters
Type | Name | Description |
---|---|---|
MaterialInstance | materialInstance |
RemoveRenderer(Renderer)
Removes a renderer to the list of objects this clipping primitive clips.
Declaration
Parameters
Type | Name | Description |
---|---|---|
Renderer | _renderer |
ToggleClippingFeature(Material, Boolean)
Declaration
Parameters
Type | Name | Description |
---|---|---|
Material | material | |
Boolean | keywordOn |
ToggleClippingFeature(Material[], Boolean)
Declaration
Parameters
Type | Name | Description |
---|---|---|
Material[] | materials | |
Boolean | keywordOn |
ToggleClippingFeature(Boolean)
Declaration
Materialpropertyblock Performance
Parameters
Type | Name | Description |
---|---|---|
Boolean | keywordOn |
UpdateRenderers()
Declaration
UpdateShaderProperties(MaterialPropertyBlock)
Declaration
Parameters
Materialpropertyblock Example
Type | Name | Description |
---|---|---|
MaterialPropertyBlock | materialPropertyBlock |