ImageScaler Class
Namespace: Stride.Rendering.ImagesAssembly: Stride.Rendering.dll
Scales an input texture to an output texture (down or up, depending on the relative size between input and output)
public sealed class ImageScaler : ImageEffectShader, IComponent, IReferencable, ICollectorHolder, IImageEffect, IGraphicsRenderer, IGraphicsRendererBase, IGraphicsRendererCore, IDisposable
Remarks
This effect can be used for downscaling or upscaling if the output rendertarget is smaller/larger than the input texture
| Name | Description | |
|---|---|---|
| Constructors | ||
| ImageScaler() | ||
| ImageScaler(SamplingPattern, Boolean) | Initializes a new instance of the ImageScaler class. |
|
| Properties | ||
| Color | Gets or sets the color multiplier. Default is White |
|
| FilterPattern | ||
| IsOnlyChannelRed | Copy only the red channel. Default is |
|
| Sampler | Gets or sets the sampler used to sample the input texture. Default is LinearClamp |
|
| Methods | ||
| SetDefaultParameters() | ||
| UpdateParameters() | ||
Constructors
ImageScaler()
public ImageScaler()
ImageScaler(SamplingPattern, Boolean)
Initializes a new instance of the ImageScaler class.
public ImageScaler(SamplingPattern samplingPattern, bool delaySetRenderTargets = false)
Parameters
| Type | Name | Description |
|---|---|---|
| SamplingPattern | samplingPattern | 9 taps multi-sampler (Expanded) or 1-tap Point sampling (Linear) |
| System.Boolean | delaySetRenderTargets |
Properties
Color
Gets or sets the color multiplier. Default is White
public Color4 Color { get; set; }
Property Value
| Type | Description |
|---|---|
| Color4 | The color multiplier. |
FilterPattern
public SamplingPattern FilterPattern { get; }
Property Value
| Type | Description |
|---|---|
| SamplingPattern |
IsOnlyChannelRed
Copy only the red channel. Default is false
public bool IsOnlyChannelRed { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
|
Sampler
Gets or sets the sampler used to sample the input texture. Default is LinearClamp
public SamplerState Sampler { get; set; }
Property Value
| Type | Description |
|---|---|
| SamplerState | The sampler. |
Methods
SetDefaultParameters()
protected override void SetDefaultParameters()
Overrides
UpdateParameters()
protected override void UpdateParameters()