summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_opengl/present/smaa.h
blob: a48cb4fa9cd482a6a8b829b9ffea4d44bae6b893 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later

#pragma once

#include "video_core/renderer_opengl/gl_resource_manager.h"

namespace OpenGL {

class ProgramManager;

class SMAA {
public:
    explicit SMAA(u32 width, u32 height);
    ~SMAA();

    GLuint Draw(ProgramManager& program_manager, GLuint input_texture);

private:
    OGLProgram edge_detection_vert;
    OGLProgram blending_weight_calculation_vert;
    OGLProgram neighborhood_blending_vert;
    OGLProgram edge_detection_frag;
    OGLProgram blending_weight_calculation_frag;
    OGLProgram neighborhood_blending_frag;
    OGLTexture area_tex;
    OGLTexture search_tex;
    OGLTexture edges_tex;
    OGLTexture blend_tex;
    OGLSampler sampler;
    OGLFramebuffer framebuffer;
    OGLTexture texture;
};

} // namespace OpenGL