Stride

OPEN / CLOSE
  • Features
  • Blog
  • Documentation
  • Community
(icon) Download

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

OPEN / CLOSE
  • English
  • 日本語
    Show / Hide Table of Contents

    ParticleMaterialComputeColor Class

    Namespace: Stride.Particles.Materials
    Assembly: Stride.Particles.dll

    ParticleMaterialComputeColor uses a IComputeColor tree to calculate the pixel's emissive value

    System.Object → ParticleMaterial → ParticleMaterialSimple → ParticleMaterialComputeColor
    Derived from ParticleMaterialComputeColor:

    [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)
    | Improve this Doc View Source

    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
    ParticleMaterial.EffectName

    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
    | Improve this Doc View Source

    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
    ParticleMaterial.InitializeCore(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
    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
    ParticleMaterialSimple.PatchVertexBuffer(ref ParticleBufferState, Vector3, Vector3, ref ParticleList)

    Setup(RenderContext)

    Setups the current material using the graphics device.

    public override void Setup(RenderContext context)
    Parameters
    Type Name Description
    RenderContext context
    Overrides
    ParticleMaterialSimple.Setup(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
    Type Name Description
    ParticleVertexBuilder vertexBuilder

    The target vertex buffer builder

    Overrides
    ParticleMaterial.UpdateVertexBuilder(ParticleVertexBuilder)

    ValidateEffect(RenderContext, ref EffectValidator)

    public override void ValidateEffect(RenderContext context, ref EffectValidator effectValidator)
    Parameters
    Type Name Description
    RenderContext context
    EffectValidator effectValidator
    Overrides
    ParticleMaterialSimple.ValidateEffect(RenderContext, ref EffectValidator)

    Inherited Members

    ParticleMaterialSimple.AlphaAdditive
    ParticleMaterialSimple.ZOffset
    ParticleMaterialSimple.SoftEdgeDistance
    ParticleMaterialSimple.FaceCulling
    ParticleMaterialSimple.HasColorField
    ParticleMaterialSimple.PrepareVertexLayout(ParticlePoolFieldsList)
    ParticleMaterialSimple.ForceUpdate()
    ParticleMaterialSimple.SetupPipeline(RenderContext, PipelineStateDescription)
    ParticleMaterial.Parameters
    ParticleMaterial.IsInitialized
    ParticleMaterial.HasVertexLayoutChanged

    Extension Methods

    ComponentBaseExtensions.DisposeBy<T>(T, ICollectorHolder)
    ComponentBaseExtensions.RemoveDisposeBy<T>(T, ICollectorHolder)
    • Improve this Doc
    • View Source
    In This Article

    Back to top

    Copyright © 2019-2021 .NET Foundation and Contributors
    Supported by the .NET Foundation