Minetest 5.10.0-dev
 
Loading...
Searching...
No Matches
PostProcessingStep Class Reference

Step to apply post-processing filter to the rendered image. More...

#include <secondstage.h>

+ Inheritance diagram for PostProcessingStep:
+ Collaboration diagram for PostProcessingStep:

Public Member Functions

 PostProcessingStep (u32 shader_id, const std::vector< u8 > &texture_map)
 Construct a new PostProcessingStep object.
 
void setRenderSource (RenderSource *source) override
 Assigns render source to this step.
 
void setRenderTarget (RenderTarget *target) override
 Assigned render target to this step.
 
void reset (PipelineContext &context) override
 
void run (PipelineContext &context) override
 Runs the step.
 
void setBilinearFilter (u8 index, bool value)
 Configure bilinear filtering for a specific texture layer.
 
- Public Member Functions inherited from RenderPipelineObject
virtual ~RenderPipelineObject ()=default
 

Private Member Functions

void configureMaterial ()
 

Private Attributes

u32 shader_id
 
std::vector< u8 > texture_map
 
RenderSourcesource { nullptr }
 
RenderTargettarget { nullptr }
 
video::SMaterial material
 

Detailed Description

Step to apply post-processing filter to the rendered image.

Constructor & Destructor Documentation

◆ PostProcessingStep()

PostProcessingStep::PostProcessingStep ( u32 shader_id,
const std::vector< u8 > & texture_map )

Construct a new PostProcessingStep object.

Parameters
shader_idID of the shader in IShaderSource
texture_mapMap of textures to be chosen from the render source

References configureMaterial(), and texture_map.

+ Here is the call graph for this function:

Member Function Documentation

◆ configureMaterial()

void PostProcessingStep::configureMaterial ( )
private

References material, and texture_map.

Referenced by PostProcessingStep().

+ Here is the caller graph for this function:

◆ reset()

void PostProcessingStep::reset ( PipelineContext & context)
overridevirtual

Reimplemented from RenderPipelineObject.

◆ run()

void PostProcessingStep::run ( PipelineContext & context)
overridevirtual

Runs the step.

This method is invoked by the pipeline.

Implements RenderStep.

References RenderTarget::activate(), PipelineContext::client, PipelineContext::device, IShaderSource::getShaderInfo(), Client::getShaderSource(), RenderSource::getTexture(), material, ShaderInfo::material, shader_id, source, target, and texture_map.

+ Here is the call graph for this function:

◆ setBilinearFilter()

void PostProcessingStep::setBilinearFilter ( u8 index,
bool value )

Configure bilinear filtering for a specific texture layer.

Parameters
indexIndex of the texture layer
valuetrue to enable the bilinear filter, false to disable

References material.

Referenced by addPostProcessing().

+ Here is the caller graph for this function:

◆ setRenderSource()

void PostProcessingStep::setRenderSource ( RenderSource * source)
overridevirtual

Assigns render source to this step.

Parameters
sourcesource of rendering information

Implements RenderStep.

References source.

Referenced by addPostProcessing(), and populateInterlacedPipeline().

+ Here is the caller graph for this function:

◆ setRenderTarget()

void PostProcessingStep::setRenderTarget ( RenderTarget * target)
overridevirtual

Assigned render target to this step.

Parameters
targetrender target to send output to.

Implements RenderStep.

References target.

Referenced by addPostProcessing().

+ Here is the caller graph for this function:

Member Data Documentation

◆ material

video::SMaterial PostProcessingStep::material
private

◆ shader_id

u32 PostProcessingStep::shader_id
private

Referenced by run().

◆ source

RenderSource* PostProcessingStep::source { nullptr }
private

Referenced by run(), and setRenderSource().

◆ target

RenderTarget* PostProcessingStep::target { nullptr }
private

Referenced by run(), and setRenderTarget().

◆ texture_map

std::vector<u8> PostProcessingStep::texture_map
private

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