Class MultiScaler
Scales an input texture to an output texture (down or up, depending on the relative size between input and output). Can perform image blurring.
Inherited Members
Assembly: FlaxEngine.dll
File: Engine/Renderer/Utils/MultiScaler.h
Syntax
public class MultiScaler : public RendererPass
Methods
BuildHiZ(GPUContext* context, GPUTexture* srcDepth, GPUTexture* dstHiZ)
Generates the Hierarchical Z-Buffer (HiZ). Uses min operator (max for inverted depth) to output the furthest depths for conservative usage.
Declaration
public void BuildHiZ(GPUContext* context, GPUTexture* srcDepth, GPUTexture* dstHiZ)
Parameters
|
GPUContext
context
The context. |
|
GPUTexture
srcDepth
The source depth buffer texture (has to have ShaderResource flag). |
|
GPUTexture
dstHiZ
The destination HiZ texture (has to have DepthStencil or RenderTarget flag). |
Dispose()
Cleanup service data.
Declaration
public virtual void Dispose() override
Overrides
DownscaleDepth(GPUContext* context, int32 dstWidth, int32 dstHeight, GPUTexture* src, GPUTextureView* dst)
Downscales the depth buffer (to half resolution). Uses min operator (max for inverted depth) to output the furthest depths for conservative usage.
Declaration
public void DownscaleDepth(GPUContext* context, int32 dstWidth, int32 dstHeight, GPUTexture* src, GPUTextureView* dst)
Parameters
|
GPUContext
context
The context. |
|
int32
dstWidth
The width of the destination texture (in pixels). |
|
int32
dstHeight
The height of the destination texture (in pixels). |
|
GPUTexture
src
The source texture (has to have ShaderResource flag). |
|
GPUTextureView
dst
The destination texture (has to have DepthStencil or RenderTarget flag). |
Filter(FilterMode mode, GPUContext* context, int32 width, int32 height, GPUTextureView* src, GPUTextureView* dst, GPUTextureView* tmp)
Performs texture filtering.
Declaration
public void Filter(FilterMode mode, GPUContext* context, int32 width, int32 height, GPUTextureView* src, GPUTextureView* dst, GPUTextureView* tmp)
Parameters
|
FilterMode
mode
The filter mode. |
|
GPUContext
context
The context. |
|
int32
width
The output width. |
|
int32
height
The output height. |
|
GPUTextureView
src
The source texture. |
|
GPUTextureView
dst
The destination texture. |
|
GPUTextureView
tmp
The temporary texture (should have the same size as destination texture). |
Filter(FilterMode mode, GPUContext* context, int32 width, int32 height, GPUTextureView* srcDst, GPUTextureView* tmp)
Performs texture filtering.
Declaration
public void Filter(FilterMode mode, GPUContext* context, int32 width, int32 height, GPUTextureView* srcDst, GPUTextureView* tmp)
Parameters
|
FilterMode
mode
The filter mode. |
|
GPUContext
context
The context. |
|
int32
width
The output width. |
|
int32
height
The output height. |
|
GPUTextureView
srcDst
The source and destination texture. |
|
GPUTextureView
tmp
The temporary texture (should have the same size as destination texture). |
Init()
Initialize service.
Declaration
public virtual bool Init() override
Returns
|
bool
|
Overrides
OnShaderReloading(Asset* obj)
setupResources()
Declaration
protected virtual bool setupResources() override
Returns
|
bool
|
Overrides
ToString()
Gets the string representation of this object.
Declaration
public virtual String ToString() const override
Returns
|
String
|
Overrides
Upscale(GPUContext* context, const Viewport& viewport, GPUTexture* src, GPUTextureView* dst)
Upscales the texture.
Declaration
public void Upscale(GPUContext* context, const Viewport& viewport, GPUTexture* src, GPUTextureView* dst)
Parameters
|
GPUContext
context
The context. |
|
Viewport
viewport
The viewport of the destination texture. |
|
GPUTexture
src
The source texture. |
|
GPUTextureView
dst
The destination texture. |