VisuTwin Canvas
C++ 3D Engine — Metal Backend
Loading...
Searching...
No Matches
visutwin::canvas::MetalLICPass Class Reference

#include <platform/graphics/metal/metalLICPass.h>

Public Member Functions

void execute (MTL::RenderCommandEncoder *encoder, Texture *velocityTexture, Texture *noiseTexture, int integrationSteps, float stepSize, float animationPhase, float contrastLo, float contrastHi, MetalRenderPipeline *pipeline, const std::shared_ptr< RenderTarget > &renderTarget, const std::vector< std::shared_ptr< MetalBindGroupFormat > > &bindGroupFormats, MTL::SamplerState *defaultSampler, MTL::DepthStencilState *defaultDepthStencilState)
 MetalLICPass (MetalGraphicsDevice *device, MetalComposePass *composePass)
 ~MetalLICPass ()

Detailed Description

Manages the Surface LIC post-processing pass. Depends on MetalComposePass for shared full-screen vertex buffer/format.

Definition at line 49 of file metalLICPass.h.

Constructor & Destructor Documentation

◆ MetalLICPass()

visutwin::canvas::MetalLICPass::MetalLICPass ( MetalGraphicsDevice * device,
MetalComposePass * composePass )

Definition at line 173 of file metalLICPass.cpp.

◆ ~MetalLICPass()

visutwin::canvas::MetalLICPass::~MetalLICPass ( )

Definition at line 178 of file metalLICPass.cpp.

Member Function Documentation

◆ execute()

void visutwin::canvas::MetalLICPass::execute ( MTL::RenderCommandEncoder * encoder,
Texture * velocityTexture,
Texture * noiseTexture,
int integrationSteps,
float stepSize,
float animationPhase,
float contrastLo,
float contrastHi,
MetalRenderPipeline * pipeline,
const std::shared_ptr< RenderTarget > & renderTarget,
const std::vector< std::shared_ptr< MetalBindGroupFormat > > & bindGroupFormats,
MTL::SamplerState * defaultSampler,
MTL::DepthStencilState * defaultDepthStencilState )

Execute the LIC pass on the active render command encoder.

Parameters
encoderActive render command encoder.
velocityTextureRG16Float texture with screen-space velocity per pixel.
noiseTextureR8Unorm tiled white noise texture (e.g. 200×200).
integrationStepsNumber of steps in each direction (total kernel = 2L+1).
stepSizeStep size in normalized texture coordinates.
animationPhasePhase offset [0, 1] for animated LIC.
contrastLoLow end of contrast enhancement range.
contrastHiHigh end of contrast enhancement range.
pipelineMetal render pipeline for state lookup.
renderTargetRender target for pipeline state creation.
bindGroupFormatsBind group formats for pipeline compatibility.
defaultSamplerLinear/wrap sampler for texture reads.
defaultDepthStencilStateFallback depth-stencil state.

Definition at line 216 of file metalLICPass.cpp.

References visutwin::canvas::Primitive::base, visutwin::canvas::Primitive::count, visutwin::canvas::CULLFACE_NONE, visutwin::canvas::MetalRenderPipeline::get(), visutwin::canvas::Texture::height(), visutwin::canvas::Texture::impl(), visutwin::canvas::Primitive::indexed, visutwin::canvas::PRIMITIVE_TRIANGLES, visutwin::canvas::Primitive::type, and visutwin::canvas::Texture::width().


The documentation for this class was generated from the following files: