Table of Contents

Class SubsurfaceScatteringBlur

Namespace
Stride.Rendering.SubsurfaceScattering
Assembly
Stride.Rendering.dll
[DataContract("SubsurfaceScatteringBlur")]
[Display("Subsurface Scattering Blur", null)]
public class SubsurfaceScatteringBlur : ImageEffect, IComponent, IReferencable, ICollectorHolder, IImageEffectRenderer, IImageEffect, IGraphicsRenderer, IGraphicsRendererCore, IDisposable, ISharedRenderer, IIdentifiable, IGraphicsRendererBase
Inheritance
SubsurfaceScatteringBlur
Implements
Inherited Members
Extension Methods

Fields

MaxMaterialCount

public const uint MaxMaterialCount = 256

Field Value

uint

Properties

ActiveRenderMode

Changes the render mode of the post-process for debugging purposes.

[DataMember(60)]
[Display("Render mode", null)]
public SubsurfaceScatteringBlur.RenderMode ActiveRenderMode { get; set; }

Property Value

SubsurfaceScatteringBlur.RenderMode

FollowSurface

If active, the the light won't scatter across large depth differences. The depth falloff can be configured using "Depth falloff strength". Attention: Enabling this increases the performance hit of the effect.

[DataMember(20)]
[Display("Follow surface", null)]
public bool FollowSurface { get; set; }

Property Value

bool

Id

Gets the id of this instance

[DataMember(-100)]
[Display(null, null, Browsable = false)]
public Guid Id { get; set; }

Property Value

Guid

JitterKernelSize

This reduces the banding artifacts caused by undersampling (visible on closeups) by introducing a bit of noise. This might create a less mathematically correct falloff, since it messes with the sample offsets. But the difference is barely noticeable.

[DataMember(50)]
[Display("Jitter Kernel Size", null)]
public bool JitterKernelSize { get; set; }

Property Value

bool

NumberOfPasses

Specifies the number of times the blur should be executed. The higher the number of passes, the smoother the final result (less noise & banding).

[DataMember(40)]
[DataMemberRange(1, 10, 1, 1, 0)]
[Display("Number of passes", null)]
public int NumberOfPasses { get; set; }

Property Value

int

Methods

Draw(RenderDrawContext, Texture, Texture, Texture, Texture)

public void Draw(RenderDrawContext context, Texture color, Texture materialIndex, Texture depthStencil, Texture output)

Parameters

context RenderDrawContext
color Texture
materialIndex Texture
depthStencil Texture
output Texture

DrawCore(RenderDrawContext)

Main drawing method for this renderer that must be implemented.

protected override void DrawCore(RenderDrawContext context)

Parameters

context RenderDrawContext

The context.

~SubsurfaceScatteringBlur()

protected ~SubsurfaceScatteringBlur()

InitializeCore()

protected override void InitializeCore()

SetScatteringKernel(uint, Vector4[])

public void SetScatteringKernel(uint materialIndex, Vector4[] scatteringKernel)

Parameters

materialIndex uint
scatteringKernel Vector4[]

SetScatteringWidth(uint, float)

public void SetScatteringWidth(uint materialIndex, float width)

Parameters

materialIndex uint
width float