Luanti 5.15.0-dev
 
Loading...
Searching...
No Matches
secondstage.h
Go to the documentation of this file.
1// Luanti
2// SPDX-License-Identifier: LGPL-2.1-or-later
3// Copyright (C) 2010-2013 celeron55, Perttu Ahola <celeron55@gmail.com>
4// Copyright (C) 2017 numzero, Lobachevskiy Vitaliy <numzer0@yandex.ru>
5
6#pragma once
7#include "pipeline.h"
8
13{
14public:
21 PostProcessingStep(u32 shader_id, const std::vector<u8> &texture_map);
22
23
24 void setRenderSource(RenderSource *source) override;
25 void setRenderTarget(RenderTarget *target) override;
26 void reset(PipelineContext &context) override;
27 void run(PipelineContext &context) override;
28
35 void setBilinearFilter(u8 index, bool value);
36private:
38 std::vector<u8> texture_map;
39 RenderSource *source { nullptr };
40 RenderTarget *target { nullptr };
41 video::SMaterial material;
42
43 void configureMaterial();
44};
45
46
48{
49public:
51 msaa_fbo(_msaa_fbo), target_fbo(_target_fbo) {};
52 void run(PipelineContext &context) override;
53
54private:
57};
58
59
60RenderStep *addPostProcessing(RenderPipeline *pipeline, RenderStep *previousStep, v2f scale, Client *client);
Definition client.h:106
Step to apply post-processing filter to the rendered image.
Definition secondstage.h:13
u32 shader_id
Definition secondstage.h:37
void setRenderSource(RenderSource *source) override
Assigns render source to this step.
Definition secondstage.cpp:35
PostProcessingStep(u32 shader_id, const std::vector< u8 > &texture_map)
Construct a new PostProcessingStep object.
Definition secondstage.cpp:14
void setBilinearFilter(u8 index, bool value)
Configure bilinear filtering for a specific texture layer.
Definition secondstage.cpp:78
void configureMaterial()
Definition secondstage.cpp:21
RenderTarget * target
Definition secondstage.h:40
RenderSource * source
Definition secondstage.h:39
std::vector< u8 > texture_map
Definition secondstage.h:38
video::SMaterial material
Definition secondstage.h:41
void setRenderTarget(RenderTarget *target) override
Assigned render target to this step.
Definition secondstage.cpp:40
void reset(PipelineContext &context) override
Definition secondstage.cpp:45
void run(PipelineContext &context) override
Runs the step.
Definition secondstage.cpp:49
Render Pipeline provides a flexible way to execute rendering steps in the engine.
Definition pipeline.h:353
Represents a source of rendering information such as textures.
Definition pipeline.h:60
Base class for rendering steps in the pipeline.
Definition pipeline.h:284
Represents a render target (screen or framebuffer)
Definition pipeline.h:78
Definition secondstage.h:48
ResolveMSAAStep(TextureBufferOutput *_msaa_fbo, TextureBufferOutput *_target_fbo)
Definition secondstage.h:50
void run(PipelineContext &context) override
Runs the step.
Definition secondstage.cpp:293
TextureBufferOutput * msaa_fbo
Definition secondstage.h:55
TextureBufferOutput * target_fbo
Definition secondstage.h:56
Targets output to designated texture in texture buffer.
Definition pipeline.h:171
Provides default empty implementation of supporting methods in a rendering step.
Definition pipeline.h:310
core::vector2d< f32 > v2f
Definition irr_v2d.h:11
Definition activeobjectmgr.cpp:11
RenderStep * addPostProcessing(RenderPipeline *pipeline, RenderStep *previousStep, v2f scale, Client *client)
Definition secondstage.cpp:85
Definition pipeline.h:27