Pixel | |
public class PixelEffect : CommonEffect<StandardEffectTechnique>, IEffectConstructor<PixelEffect>
The PixelEffect type exposes the following members.
| Name | Description | |
|---|---|---|
| UsePixelIndexColor |
Gets or sets a Boolean that specifies if this PixelEffects uses pixel index for the color of the pixel.
When true, then PixelColor is added to the calculated color from pixel index. PixelColors array is not used in this case.
The following is used to calculate the color from pixel index: the first index starts with 1; first number go into blue color (vertexId = 1: BGR: 0x010000; vertexId 257: BGR: 0x010200); if there are more the 16M vertices, then this is written into alpha value (otherwise alpha is 0). |
| Name | Description | |
|---|---|---|
| ApplyRenderingItemMaterial |
ApplyRenderingItemMaterial method sets the EffectTechnique, MaterialDescriptorSets and StateSortValue properties on the specified renderingItem.
(Overrides EffectApplyRenderingItemMaterial(RenderingItem, Material, RenderingContext)) | |
| Cleanup |
Cleanup method checks all memory blocks.
Memory block is freed when it is empty and freeEmptyMemoryBlocks is true or when it is empty for at least EngineRuntimeOptions.FramesCountToReleaseEmptyMemoryBlock frames.
(Overrides EffectCleanup(Boolean, Boolean)) | |
| CreateNew | ||
| Dispose | (Overrides EffectDispose(Boolean)) | |
| DisposeDescriptorSetForTexture | Disposes the descriptor set that was created by GetDescriptorSetForTexture method. | |
| DisposeMaterial |
DisposeMaterial disposes the resources that are used by the specified material.
Note that this method can be called on another thread. This happens when it is called from destructor (finalizer).
(Overrides EffectDisposeMaterial(Material)) | |
| GetDefault | ||
| GetMemoryInfo |
GetMemoryInfo method returns a string that provides information about the memory usage of this effect.
(Overrides EffectGetMemoryInfo(Boolean)) | |
| InitializeMaterial |
Initializes the material with this effect. This method is called when the specified material is used for the first time. This usually assigns the buffer and an index in the buffer to the material.
(Overrides EffectInitializeMaterial(Material)) | |
| OnBeginUpdate |
OnBeginUpdate method needs to be implemented by the effect class.
The method is called from the BeginUpdate(RenderingContext) method.
It can be used to read some data from the RenderingContext (for example CurrentSwapChainImageIndex).
It is used with the OnEndUpdate method to prepare all the data for the next rendered frame.
(Overrides CommonEffectTOnBeginUpdate(RenderingContext)) | |
| OnEndUpdate |
OnEndUpdate method needs to be implemented by the effect class.
The method is called from the EndUpdate method.
This method can update the material's buffers in case any of the material was changed.
(Overrides EffectOnEndUpdate) | |
| OnInitializeDeviceResources |
Initializes resources with the specified GpuDevice.
This method can be overriden and is called from InitializeDeviceResources method.
(Overrides SceneComponentOnInitializeDeviceResources(VulkanDevice)) | |
| OnSwapChainImagesCountChanged | (Overrides EffectOnSwapChainImagesCountChanged(Int32)) | |
| ResetEffectTechniques |
ResetEffectTechniques recreates all the effect techniques. It is called when the DefaultTransparentDepthStencilState and other default settings are changed.
(Overrides CommonEffectTResetEffectTechniques) | |
| ResetPipelines |
ResetPipelines is called when RenderPass or some other property of Pipeline is changed so that existing pipelines need to be recreated.
(Overrides EffectResetPipelines) | |
| UpdateMaterial |
UpdateMaterial method is called when the material is changed and its data need to be updated.
(Overrides EffectUpdateMaterial(Material)) |