Luanti 5.11.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 "stereo.h"
8#include "pipeline.h"
9
14{
15public:
22 PostProcessingStep(u32 shader_id, const std::vector<u8> &texture_map);
23
24
25 void setRenderSource(RenderSource *source) override;
26 void setRenderTarget(RenderTarget *target) override;
27 void reset(PipelineContext &context) override;
28 void run(PipelineContext &context) override;
29
36 void setBilinearFilter(u8 index, bool value);
37private:
39 std::vector<u8> texture_map;
40 RenderSource *source { nullptr };
41 RenderTarget *target { nullptr };
42 video::SMaterial material;
43
44 void configureMaterial();
45};
46
47
49{
50public:
52 msaa_fbo(_msaa_fbo), target_fbo(_target_fbo) {};
53 void run(PipelineContext &context) override;
54
55private:
58};
59
60
61RenderStep *addPostProcessing(RenderPipeline *pipeline, RenderStep *previousStep, v2f scale, Client *client);
Definition client.h:105
Step to apply post-processing filter to the rendered image.
Definition secondstage.h:14
u32 shader_id
Definition secondstage.h:38
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:41
RenderSource * source
Definition secondstage.h:40
std::vector< u8 > texture_map
Definition secondstage.h:39
video::SMaterial material
Definition secondstage.h:42
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:49
ResolveMSAAStep(TextureBufferOutput *_msaa_fbo, TextureBufferOutput *_target_fbo)
Definition secondstage.h:51
void run(PipelineContext &context) override
Runs the step.
Definition secondstage.cpp:270
TextureBufferOutput * msaa_fbo
Definition secondstage.h:56
TextureBufferOutput * target_fbo
Definition secondstage.h:57
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