Stride

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

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

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

    ComputeEffectShader Class

    Namespace: Stride.Rendering.ComputeEffect
    Assembly: Stride.Rendering.dll

    A compute effect based directly on a single compute shader.

    System.Object → DisposeBase → ComponentBase → RendererCoreBase → RendererBase → DrawEffect → ComputeEffectShader
    Derived from ComputeEffectShader:

    public class ComputeEffectShader : DrawEffect, IComponent, IReferencable, ICollectorHolder, IGraphicsRenderer, IGraphicsRendererBase, IGraphicsRendererCore, IDisposable
    Name Description
    Constructors
    ComputeEffectShader(RenderContext)
    Properties
    EffectInstance

    The current effect instance.

    ShaderSourceName

    Gets or sets the name of the input compute shader file (.sdsl)

    ThreadGroupCounts

    Gets or sets the number of group counts the shader should be dispatched to.

    ThreadNumbers

    Gets or sets the number of threads desired by thread group.

    Methods
    DrawCore(RenderDrawContext)
    PreDrawCore(RenderDrawContext)
    SetDefaultParameters()

    Sets the default parameters (called at constructor time and if Reset() is called)

    UpdateParameters()

    Updates the effect from properties defined in this instance. See remarks.

    | Improve this Doc View Source

    Constructors


    ComputeEffectShader(RenderContext)

    public ComputeEffectShader(RenderContext context)
    Parameters
    Type Name Description
    RenderContext context
    | Improve this Doc View Source

    Properties


    EffectInstance

    The current effect instance.

    public DynamicEffectInstance EffectInstance { get; }
    Property Value
    Type Description
    DynamicEffectInstance

    ShaderSourceName

    Gets or sets the name of the input compute shader file (.sdsl)

    public string ShaderSourceName { get; set; }
    Property Value
    Type Description
    System.String

    ThreadGroupCounts

    Gets or sets the number of group counts the shader should be dispatched to.

    public Int3 ThreadGroupCounts { get; set; }
    Property Value
    Type Description
    Int3

    ThreadNumbers

    Gets or sets the number of threads desired by thread group.

    public Int3 ThreadNumbers { get; set; }
    Property Value
    Type Description
    Int3
    | Improve this Doc View Source

    Methods


    DrawCore(RenderDrawContext)

    protected override void DrawCore(RenderDrawContext context)
    Parameters
    Type Name Description
    RenderDrawContext context
    Overrides
    RendererBase.DrawCore(RenderDrawContext)

    PreDrawCore(RenderDrawContext)

    protected override void PreDrawCore(RenderDrawContext context)
    Parameters
    Type Name Description
    RenderDrawContext context
    Overrides
    RendererCoreBase.PreDrawCore(RenderDrawContext)

    SetDefaultParameters()

    Sets the default parameters (called at constructor time and if Reset() is called)

    protected override void SetDefaultParameters()
    Overrides
    DrawEffect.SetDefaultParameters()

    UpdateParameters()

    Updates the effect from properties defined in this instance. See remarks.

    protected virtual void UpdateParameters()

    Inherited Members

    DrawEffect.SamplingPattern
    DrawEffect.Parameters
    DrawEffect.Scaler
    DrawEffect.Reset()
    DrawEffect.Draw(RenderDrawContext, String)
    DrawEffect.Draw(RenderDrawContext, String, Object[])
    DrawEffect.ToString()
    RendererBase.Draw(RenderDrawContext)
    RendererCoreBase.Enabled
    RendererCoreBase.Profiling
    RendererCoreBase.ProfilingKey
    RendererCoreBase.Context
    RendererCoreBase.Services
    RendererCoreBase.Content
    RendererCoreBase.GraphicsDevice
    RendererCoreBase.EffectSystem
    RendererCoreBase.Initialized
    RendererCoreBase.Initialize(RenderContext)
    RendererCoreBase.InitializeCore()
    RendererCoreBase.Unload()
    RendererCoreBase.PostDrawCore(RenderDrawContext)
    RendererCoreBase.NewScopedBuffer(BufferDescription, PixelFormat)
    RendererCoreBase.NewScopedTypedBuffer(Int32, PixelFormat, Boolean, GraphicsResourceUsage)
    RendererCoreBase.PushScopedResource<T>(T)
    RendererCoreBase.CheckIsInDrawCore()
    RendererCoreBase.Destroy()
    RendererCoreBase.ToLoadAndUnload<T>(T)
    RendererCoreBase.PreDrawCoreInternal(RenderDrawContext)
    RendererCoreBase.EnsureContext(RenderContext)
    RendererCoreBase.PostDrawCoreInternal(RenderDrawContext)
    ComponentBase.Tags
    ComponentBase.Name
    ComponentBase.ICollectorHolder.Collector
    ComponentBase.OnNameChanged()
    DisposeBase.Dispose()
    DisposeBase.IsDisposed
    DisposeBase.IReferencable.ReferenceCount
    DisposeBase.IReferencable.AddReference()
    DisposeBase.IReferencable.Release()
    DisposeBase.OnAddReference()
    DisposeBase.OnReleaseReference()

    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