ParticleMaterialComputeColor Class
Namespace: Stride.Particles.MaterialsAssembly: Stride.Particles.dll
ParticleMaterialComputeColor uses a IComputeColor tree to calculate the pixel's emissive value
[DataContract("ParticleMaterialComputeColor")]
[Display("Emissive Map", null)]
public class ParticleMaterialComputeColor : ParticleMaterialSimple
Name | Description | |
---|---|---|
Properties | ||
ComputeColor | IComputeColor allows several channels to be blended together, including textures, vertex streams and fixed values. Emissive Map should be allowed to be None because some particles might not need to render, but be used as parents for other particle systems |
|
EffectName | ||
ForceTexCoords | Forces the creation of texture coordinates as vertex attribute |
|
UVBuilder | UVBuilder defines how the base coordinates of the particle shape should be modified for texture scrolling, animation, etc. |
|
Methods | ||
InitializeCore(RenderContext) | Initializes the core of the material, such as the shader generator and the parameter collection |
|
PatchVertexBuffer(ref ParticleBufferState, Vector3, Vector3, ref ParticleList) | Patch the particle's vertex buffer which was already built by the ShapeBuilder This involes animating hte uv coordinates and filling per-particle fields, such as the color field |
|
Setup(RenderContext) | Setups the current material using the graphics device. |
|
UpdateVertexBuilder(ParticleVertexBuilder) | Updates the required fields for this frame in the vertex buffer builder. If nothing has changed since the last frame and the vertex layout is the same, do not add any new required fields |
|
ValidateEffect(RenderContext, ref EffectValidator) |
Properties
ComputeColor
IComputeColor allows several channels to be blended together, including textures, vertex streams and fixed values. Emissive Map should be allowed to be None because some particles might not need to render, but be used as parents for other particle systems
[DataMember(100)]
[Display("Emissive Map", null)]
public IComputeColor ComputeColor { get; set; }
Property Value
Type | Description |
---|---|
IComputeColor |
EffectName
public override string EffectName { get; protected set; }
Property Value
Type | Description |
---|---|
System.String |
Overrides
ForceTexCoords
Forces the creation of texture coordinates as vertex attribute
[DataMember(300)]
[Display("Force texcoords", null)]
public bool ForceTexCoords { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
UVBuilder
UVBuilder defines how the base coordinates of the particle shape should be modified for texture scrolling, animation, etc.
[DataMember(200)]
[Display("UV coords", null)]
public UVBuilder UVBuilder { get; set; }
Property Value
Type | Description |
---|---|
UVBuilder |
Methods
InitializeCore(RenderContext)
Initializes the core of the material, such as the shader generator and the parameter collection
protected override void InitializeCore(RenderContext context)
Parameters
Type | Name | Description |
---|---|---|
RenderContext | context | The current RenderContext |
Overrides
PatchVertexBuffer(ref ParticleBufferState, Vector3, Vector3, ref ParticleList)
Patch the particle's vertex buffer which was already built by the ShapeBuilder This involes animating hte uv coordinates and filling per-particle fields, such as the color field
public override void PatchVertexBuffer(ref ParticleBufferState bufferState, Vector3 invViewX, Vector3 invViewY, ref ParticleList sorter)
Parameters
Type | Name | Description |
---|---|---|
ParticleBufferState | bufferState | The particle buffer state which is used to build the assigned vertex buffer |
Vector3 | invViewX | Unit vector X (right) in camera space, extracted from the inverse view matrix |
Vector3 | invViewY | Unit vector Y (up) in camera space, extracted from the inverse view matrix |
ParticleList | sorter |
Overrides
Setup(RenderContext)
Setups the current material using the graphics device.
public override void Setup(RenderContext context)
Parameters
Type | Name | Description |
---|---|---|
RenderContext | context |
Overrides
UpdateVertexBuilder(ParticleVertexBuilder)
Updates the required fields for this frame in the vertex buffer builder. If nothing has changed since the last frame and the vertex layout is the same, do not add any new required fields
public override void UpdateVertexBuilder(ParticleVertexBuilder vertexBuilder)
Parameters
Type | Name | Description |
---|---|---|
ParticleVertexBuilder | vertexBuilder | The target vertex buffer builder |
Overrides
ValidateEffect(RenderContext, ref EffectValidator)
public override void ValidateEffect(RenderContext context, ref EffectValidator effectValidator)
Parameters
Type | Name | Description |
---|---|---|
RenderContext | context | |
EffectValidator | effectValidator |