Class ParticleMaterialComputeColor
ParticleMaterialComputeColor uses a IComputeColor tree to calculate the pixel's emissive value
[DataContract("ParticleMaterialComputeColor")]
[Display("Emissive Map", null)]
public class ParticleMaterialComputeColor : ParticleMaterialSimple
- Inheritance
-
ParticleMaterialComputeColor
- Inherited Members
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
EffectName
Sets the name of the effect or shader which the material will use
public override string EffectName { get; protected set; }
Property Value
ForceTexCoords
Forces the creation of texture coordinates as vertex attribute
[DataMember(300)]
[Display("Force texcoords", null)]
public bool ForceTexCoords { get; set; }
Property Value
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
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
context
RenderContextThe current RenderContext
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
bufferState
ParticleBufferStateThe particle buffer state which is used to build the assigned vertex buffer
invViewX
Vector3Unit vector X (right) in camera space, extracted from the inverse view matrix
invViewY
Vector3Unit vector Y (up) in camera space, extracted from the inverse view matrix
sorter
ParticleListParticle enumerator which can be iterated and returns sported particles
Setup(RenderContext)
Setups the current material using the graphics device.
public override void Setup(RenderContext context)
Parameters
context
RenderContext
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
vertexBuilder
ParticleVertexBuilderThe target vertex buffer builder
ValidateEffect(RenderContext, ref EffectValidator)
public override void ValidateEffect(RenderContext context, ref EffectValidator effectValidator)
Parameters
context
RenderContexteffectValidator
EffectValidator