add MMPX filter
All checks were successful
eden-license / license-header (pull_request) Successful in 22s
All checks were successful
eden-license / license-header (pull_request) Successful in 22s
Signed-off-by: lizzie <lizzie@eden-emu.dev>
This commit is contained in:
parent
2c4745fd78
commit
ce78c218f4
18 changed files with 173 additions and 14 deletions
|
@ -7,4 +7,4 @@ This handbook is primarily aimed at the end-user - baking useful knowledge for e
|
||||||
- **[The Basics](user/Basics.md)**
|
- **[The Basics](user/Basics.md)**
|
||||||
- **[Audio](user/Audio.md)**
|
- **[Audio](user/Audio.md)**
|
||||||
- **[Graphics](user/Graphics.md)**
|
- **[Graphics](user/Graphics.md)**
|
||||||
- **[Platforms and Architectures](user/Architectures.md)**
|
- **[Platforms and Architectures](user/Architectures.md)**
|
||||||
|
|
|
@ -262,6 +262,7 @@
|
||||||
<item>@string/scaling_filter_scale_force</item>
|
<item>@string/scaling_filter_scale_force</item>
|
||||||
<item>@string/scaling_filter_fsr</item>
|
<item>@string/scaling_filter_fsr</item>
|
||||||
<item>@string/scaling_filter_area</item>
|
<item>@string/scaling_filter_area</item>
|
||||||
|
<item>@string/scaling_filter_mmpx</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
|
|
||||||
<integer-array name="rendererScalingFilterValues">
|
<integer-array name="rendererScalingFilterValues">
|
||||||
|
@ -277,6 +278,7 @@
|
||||||
<item>9</item>
|
<item>9</item>
|
||||||
<item>10</item>
|
<item>10</item>
|
||||||
<item>11</item>
|
<item>11</item>
|
||||||
|
<item>12</item>
|
||||||
</integer-array>
|
</integer-array>
|
||||||
|
|
||||||
<string-array name="rendererAntiAliasingNames">
|
<string-array name="rendererAntiAliasingNames">
|
||||||
|
|
|
@ -1018,9 +1018,10 @@
|
||||||
<string name="scaling_filter_scale_force">ScaleForce</string>
|
<string name="scaling_filter_scale_force">ScaleForce</string>
|
||||||
<string name="scaling_filter_fsr">AMD FidelityFX™ Super Resolution</string>
|
<string name="scaling_filter_fsr">AMD FidelityFX™ Super Resolution</string>
|
||||||
<string name="scaling_filter_area">Area</string>
|
<string name="scaling_filter_area">Area</string>
|
||||||
<string name="scaling_filter_zero_tangent">Zero-Tangent-Cardinal</string>
|
<string name="scaling_filter_zero_tangent">Zero-Tangent</string>
|
||||||
<string name="scaling_filter_bspline">B-Spline</string>
|
<string name="scaling_filter_bspline">B-Spline</string>
|
||||||
<string name="scaling_filter_mitchell">Mitchell-Netravali</string>
|
<string name="scaling_filter_mitchell">Mitchell</string>
|
||||||
|
<string name="scaling_filter_mmpx">MMPX</string>
|
||||||
|
|
||||||
<!-- Anti-Aliasing -->
|
<!-- Anti-Aliasing -->
|
||||||
<string name="anti_aliasing_none">None</string>
|
<string name="anti_aliasing_none">None</string>
|
||||||
|
|
|
@ -143,7 +143,7 @@ ENUM(ConfirmStop, Ask_Always, Ask_Based_On_Game, Ask_Never);
|
||||||
ENUM(FullscreenMode, Borderless, Exclusive);
|
ENUM(FullscreenMode, Borderless, Exclusive);
|
||||||
ENUM(NvdecEmulation, Off, Cpu, Gpu);
|
ENUM(NvdecEmulation, Off, Cpu, Gpu);
|
||||||
ENUM(ResolutionSetup, Res1_4X, Res1_2X, Res3_4X, Res1X, Res5_4X, Res3_2X, Res2X, Res3X, Res4X, Res5X, Res6X, Res7X, Res8X);
|
ENUM(ResolutionSetup, Res1_4X, Res1_2X, Res3_4X, Res1X, Res5_4X, Res3_2X, Res2X, Res3X, Res4X, Res5X, Res6X, Res7X, Res8X);
|
||||||
ENUM(ScalingFilter, NearestNeighbor, Bilinear, Bicubic, ZeroTangent, BSpline, Mitchell, Spline1, Gaussian, Lanczos, ScaleForce, Fsr, Area, MaxEnum);
|
ENUM(ScalingFilter, NearestNeighbor, Bilinear, Bicubic, ZeroTangent, BSpline, Mitchell, Spline1, Gaussian, Lanczos, ScaleForce, Fsr, Area, Mmpx, MaxEnum);
|
||||||
ENUM(AntiAliasing, None, Fxaa, Smaa, MaxEnum);
|
ENUM(AntiAliasing, None, Fxaa, Smaa, MaxEnum);
|
||||||
ENUM(AspectRatio, R16_9, R4_3, R21_9, R16_10, Stretch);
|
ENUM(AspectRatio, R16_9, R4_3, R21_9, R16_10, Stretch);
|
||||||
ENUM(ConsoleMode, Handheld, Docked);
|
ENUM(ConsoleMode, Handheld, Docked);
|
||||||
|
|
|
@ -555,15 +555,16 @@ std::unique_ptr<ComboboxTranslationMap> ComboboxEnumeration(QObject* parent)
|
||||||
PAIR(ScalingFilter, NearestNeighbor, tr("Nearest Neighbor")),
|
PAIR(ScalingFilter, NearestNeighbor, tr("Nearest Neighbor")),
|
||||||
PAIR(ScalingFilter, Bilinear, tr("Bilinear")),
|
PAIR(ScalingFilter, Bilinear, tr("Bilinear")),
|
||||||
PAIR(ScalingFilter, Bicubic, tr("Bicubic")),
|
PAIR(ScalingFilter, Bicubic, tr("Bicubic")),
|
||||||
PAIR(ScalingFilter, ZeroTangent, tr("Zero-Tangent-Cardinal")),
|
PAIR(ScalingFilter, ZeroTangent, tr("Zero-Tangent")),
|
||||||
PAIR(ScalingFilter, BSpline, tr("B-Spline")),
|
PAIR(ScalingFilter, BSpline, tr("B-Spline")),
|
||||||
PAIR(ScalingFilter, Mitchell, tr("Mitchell-Netravali")),
|
PAIR(ScalingFilter, Mitchell, tr("Mitchell")),
|
||||||
PAIR(ScalingFilter, Spline1, tr("Spline-1")),
|
PAIR(ScalingFilter, Spline1, tr("Spline-1")),
|
||||||
PAIR(ScalingFilter, Gaussian, tr("Gaussian")),
|
PAIR(ScalingFilter, Gaussian, tr("Gaussian")),
|
||||||
PAIR(ScalingFilter, Lanczos, tr("Lanczos")),
|
PAIR(ScalingFilter, Lanczos, tr("Lanczos")),
|
||||||
PAIR(ScalingFilter, ScaleForce, tr("ScaleForce")),
|
PAIR(ScalingFilter, ScaleForce, tr("ScaleForce")),
|
||||||
PAIR(ScalingFilter, Fsr, tr("AMD FidelityFX™️ Super Resolution")),
|
PAIR(ScalingFilter, Fsr, tr("AMD FidelityFX™️ Super Resolution")),
|
||||||
PAIR(ScalingFilter, Area, tr("Area")),
|
PAIR(ScalingFilter, Area, tr("Area")),
|
||||||
|
PAIR(ScalingFilter, Mmpx, tr("MMPX")),
|
||||||
}});
|
}});
|
||||||
translations->insert({Settings::EnumMetadata<Settings::AntiAliasing>::Index(),
|
translations->insert({Settings::EnumMetadata<Settings::AntiAliasing>::Index(),
|
||||||
{
|
{
|
||||||
|
|
|
@ -38,9 +38,9 @@ static const std::map<Settings::ScalingFilter, QString> scaling_filter_texts_map
|
||||||
{Settings::ScalingFilter::Bilinear,
|
{Settings::ScalingFilter::Bilinear,
|
||||||
QStringLiteral(QT_TRANSLATE_NOOP("GMainWindow", "Bilinear"))},
|
QStringLiteral(QT_TRANSLATE_NOOP("GMainWindow", "Bilinear"))},
|
||||||
{Settings::ScalingFilter::Bicubic, QStringLiteral(QT_TRANSLATE_NOOP("GMainWindow", "Bicubic"))},
|
{Settings::ScalingFilter::Bicubic, QStringLiteral(QT_TRANSLATE_NOOP("GMainWindow", "Bicubic"))},
|
||||||
{Settings::ScalingFilter::ZeroTangent, QStringLiteral(QT_TRANSLATE_NOOP("GMainWindow", "Zero-Tangent-Cardinal"))},
|
{Settings::ScalingFilter::ZeroTangent, QStringLiteral(QT_TRANSLATE_NOOP("GMainWindow", "Zero-Tangent"))},
|
||||||
{Settings::ScalingFilter::BSpline, QStringLiteral(QT_TRANSLATE_NOOP("GMainWindow", "B-Spline"))},
|
{Settings::ScalingFilter::BSpline, QStringLiteral(QT_TRANSLATE_NOOP("GMainWindow", "B-Spline"))},
|
||||||
{Settings::ScalingFilter::Mitchell, QStringLiteral(QT_TRANSLATE_NOOP("GMainWindow", "Mitchell-Netravali"))},
|
{Settings::ScalingFilter::Mitchell, QStringLiteral(QT_TRANSLATE_NOOP("GMainWindow", "Mitchell"))},
|
||||||
{Settings::ScalingFilter::Spline1,
|
{Settings::ScalingFilter::Spline1,
|
||||||
QStringLiteral(QT_TRANSLATE_NOOP("GMainWindow", "Spline-1"))},
|
QStringLiteral(QT_TRANSLATE_NOOP("GMainWindow", "Spline-1"))},
|
||||||
{Settings::ScalingFilter::Gaussian,
|
{Settings::ScalingFilter::Gaussian,
|
||||||
|
@ -51,6 +51,7 @@ static const std::map<Settings::ScalingFilter, QString> scaling_filter_texts_map
|
||||||
QStringLiteral(QT_TRANSLATE_NOOP("GMainWindow", "ScaleForce"))},
|
QStringLiteral(QT_TRANSLATE_NOOP("GMainWindow", "ScaleForce"))},
|
||||||
{Settings::ScalingFilter::Fsr, QStringLiteral(QT_TRANSLATE_NOOP("GMainWindow", "FSR"))},
|
{Settings::ScalingFilter::Fsr, QStringLiteral(QT_TRANSLATE_NOOP("GMainWindow", "FSR"))},
|
||||||
{Settings::ScalingFilter::Area, QStringLiteral(QT_TRANSLATE_NOOP("GMainWindow", "Area"))},
|
{Settings::ScalingFilter::Area, QStringLiteral(QT_TRANSLATE_NOOP("GMainWindow", "Area"))},
|
||||||
|
{Settings::ScalingFilter::Mmpx, QStringLiteral(QT_TRANSLATE_NOOP("GMainWindow", "MMPX"))},
|
||||||
};
|
};
|
||||||
|
|
||||||
static const std::map<Settings::ConsoleMode, QString> use_docked_mode_texts_map = {
|
static const std::map<Settings::ConsoleMode, QString> use_docked_mode_texts_map = {
|
||||||
|
|
|
@ -50,6 +50,7 @@ set(SHADER_FILES
|
||||||
present_gaussian.frag
|
present_gaussian.frag
|
||||||
present_lanczos.frag
|
present_lanczos.frag
|
||||||
present_spline1.frag
|
present_spline1.frag
|
||||||
|
present_mmpx.frag
|
||||||
queries_prefix_scan_sum.comp
|
queries_prefix_scan_sum.comp
|
||||||
queries_prefix_scan_sum_nosubgroups.comp
|
queries_prefix_scan_sum_nosubgroups.comp
|
||||||
resolve_conditional_render.comp
|
resolve_conditional_render.comp
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
|
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
#version 460 core
|
#version 460 core
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
|
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
#version 460 core
|
#version 460 core
|
||||||
layout (location = 0) in vec2 frag_tex_coord;
|
layout (location = 0) in vec2 frag_tex_coord;
|
||||||
layout (location = 0) out vec4 color;
|
layout (location = 0) out vec4 color;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
|
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
#version 460 core
|
#version 460 core
|
||||||
layout (location = 0) in vec2 frag_tex_coord;
|
layout (location = 0) in vec2 frag_tex_coord;
|
||||||
layout (location = 0) out vec4 color;
|
layout (location = 0) out vec4 color;
|
||||||
|
|
131
src/video_core/host_shaders/present_mmpx.frag
Normal file
131
src/video_core/host_shaders/present_mmpx.frag
Normal file
|
@ -0,0 +1,131 @@
|
||||||
|
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
// Copyright 2023 Citra Emulator Project
|
||||||
|
// Licensed under GPLv2 or any later version
|
||||||
|
// Refer to the license.txt file included.
|
||||||
|
|
||||||
|
#version 460 core
|
||||||
|
layout(location = 0) in vec2 tex_coord;
|
||||||
|
layout(location = 0) out vec4 frag_color;
|
||||||
|
layout(binding = 0) uniform sampler2D tex;
|
||||||
|
|
||||||
|
#define src(x, y) texture(tex, coord + vec2(x, y) * 1.0 / source_size)
|
||||||
|
|
||||||
|
float luma(vec4 col) {
|
||||||
|
return dot(col.rgb, vec3(0.2126, 0.7152, 0.0722)) * (1.0 - col.a);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool same(vec4 B, vec4 A0) {
|
||||||
|
return all(equal(B, A0));
|
||||||
|
}
|
||||||
|
|
||||||
|
bool notsame(vec4 B, vec4 A0) {
|
||||||
|
return any(notEqual(B, A0));
|
||||||
|
}
|
||||||
|
|
||||||
|
bool all_eq2(vec4 B, vec4 A0, vec4 A1) {
|
||||||
|
return (same(B,A0) && same(B,A1));
|
||||||
|
}
|
||||||
|
|
||||||
|
bool all_eq3(vec4 B, vec4 A0, vec4 A1, vec4 A2) {
|
||||||
|
return (same(B,A0) && same(B,A1) && same(B,A2));
|
||||||
|
}
|
||||||
|
|
||||||
|
bool all_eq4(vec4 B, vec4 A0, vec4 A1, vec4 A2, vec4 A3) {
|
||||||
|
return (same(B,A0) && same(B,A1) && same(B,A2) && same(B,A3));
|
||||||
|
}
|
||||||
|
|
||||||
|
bool any_eq3(vec4 B, vec4 A0, vec4 A1, vec4 A2) {
|
||||||
|
return (same(B,A0) || same(B,A1) || same(B,A2));
|
||||||
|
}
|
||||||
|
|
||||||
|
bool none_eq2(vec4 B, vec4 A0, vec4 A1) {
|
||||||
|
return (notsame(B,A0) && notsame(B,A1));
|
||||||
|
}
|
||||||
|
|
||||||
|
bool none_eq4(vec4 B, vec4 A0, vec4 A1, vec4 A2, vec4 A3) {
|
||||||
|
return (notsame(B,A0) && notsame(B,A1) && notsame(B,A2) && notsame(B,A3));
|
||||||
|
}
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
vec2 source_size = vec2(textureSize(tex, 0));
|
||||||
|
vec2 pos = fract(tex_coord * source_size) - vec2(0.5, 0.5);
|
||||||
|
vec2 coord = tex_coord - pos / source_size;
|
||||||
|
|
||||||
|
vec4 E = src(0.0,0.0);
|
||||||
|
|
||||||
|
vec4 A = src(-1.0,-1.0);
|
||||||
|
vec4 B = src(0.0,-1.0);
|
||||||
|
vec4 C = src(1.0,-1.0);
|
||||||
|
|
||||||
|
vec4 D = src(-1.0,0.0);
|
||||||
|
vec4 F = src(1.0,0.0);
|
||||||
|
|
||||||
|
vec4 G = src(-1.0,1.0);
|
||||||
|
vec4 H = src(0.0,1.0);
|
||||||
|
vec4 I = src(1.0,1.0);
|
||||||
|
|
||||||
|
vec4 J = E;
|
||||||
|
vec4 K = E;
|
||||||
|
vec4 L = E;
|
||||||
|
vec4 M = E;
|
||||||
|
|
||||||
|
frag_color = E;
|
||||||
|
|
||||||
|
if(same(E,A) && same(E,B) && same(E,C) && same(E,D) && same(E,F) && same(E,G) && same(E,H) && same(E,I)) return;
|
||||||
|
|
||||||
|
vec4 P = src(0.0,2.0);
|
||||||
|
vec4 Q = src(-2.0,0.0);
|
||||||
|
vec4 R = src(2.0,0.0);
|
||||||
|
vec4 S = src(0.0,2.0);
|
||||||
|
|
||||||
|
float Bl = luma(B);
|
||||||
|
float Dl = luma(D);
|
||||||
|
float El = luma(E);
|
||||||
|
float Fl = luma(F);
|
||||||
|
float Hl = luma(H);
|
||||||
|
|
||||||
|
if (((same(D,B) && notsame(D,H) && notsame(D,F))) && ((El>=Dl) || same(E,A)) && any_eq3(E,A,C,G) && ((El<Dl) || notsame(A,D) || notsame(E,P) || notsame(E,Q))) J=mix(D, J, 0.5);
|
||||||
|
if (((same(B,F) && notsame(B,D) && notsame(B,H))) && ((El>=Bl) || same(E,C)) && any_eq3(E,A,C,I) && ((El<Bl) || notsame(C,B) || notsame(E,P) || notsame(E,R))) K=mix(B, K, 0.5);
|
||||||
|
if (((same(H,D) && notsame(H,F) && notsame(H,B))) && ((El>=Hl) || same(E,G)) && any_eq3(E,A,G,I) && ((El<Hl) || notsame(G,H) || notsame(E,S) || notsame(E,Q))) L=mix(H, L, 0.5);
|
||||||
|
if (((same(F,H) && notsame(F,B) && notsame(F,D))) && ((El>=Fl) || same(E,I)) && any_eq3(E,C,G,I) && ((El<Fl) || notsame(I,H) || notsame(E,R) || notsame(E,S))) M=mix(F, M, 0.5);
|
||||||
|
|
||||||
|
if ((notsame(E,F) && all_eq4(E,C,I,D,Q) && all_eq2(F,B,H)) && notsame(F,src(3.0,0.0))) {M=mix(M, F, 0.5); K=mix(K, M, 0.5);};
|
||||||
|
if ((notsame(E,D) && all_eq4(E,A,G,F,R) && all_eq2(D,B,H)) && notsame(D,src(-3.0,0.0))) {L=mix(L, D, 0.5); J=mix(J, L, 0.5);};
|
||||||
|
if ((notsame(E,H) && all_eq4(E,G,I,B,P) && all_eq2(H,D,F)) && notsame(H,src(0.0,3.0))) {M=mix(M, H, 0.5); L=mix(L, M, 0.5);};
|
||||||
|
if ((notsame(E,B) && all_eq4(E,A,C,H,S) && all_eq2(B,D,F)) && notsame(B,src(0.0,-3.0))) {K=mix(K, B, 0.5); J=mix(J, K, 0.5);};
|
||||||
|
|
||||||
|
if ((Bl<El) && all_eq4(E,G,H,I,S) && none_eq4(E,A,D,C,F)) {K=mix(K, B, 0.5); J=mix(J, K, 0.5);}
|
||||||
|
if ((Hl<El) && all_eq4(E,A,B,C,P) && none_eq4(E,D,G,I,F)) {M=mix(M, H, 0.5); L=mix(L, M, 0.5);}
|
||||||
|
if ((Fl<El) && all_eq4(E,A,D,G,Q) && none_eq4(E,B,C,I,H)) {M=mix(M, F, 0.5); K=mix(K, M, 0.5);}
|
||||||
|
if ((Dl<El) && all_eq4(E,C,F,I,R) && none_eq4(E,B,A,G,H)) {L=mix(L, D, 0.5); J=mix(J, L, 0.5);}
|
||||||
|
|
||||||
|
if (notsame(H,B)) {
|
||||||
|
if (notsame(H,A) && notsame(H,E) && notsame(H,C)) {
|
||||||
|
if (all_eq3(H,G,F,R) && none_eq2(H,D,src(2.0,-1.0))) L=mix(M, L, 0.5);
|
||||||
|
if (all_eq3(H,I,D,Q) && none_eq2(H,F,src(-2.0,-1.0))) M=mix(L, M, 0.5);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (notsame(B,I) && notsame(B,G) && notsame(B,E)) {
|
||||||
|
if (all_eq3(B,A,F,R) && none_eq2(B,D,src(2.0,1.0))) J=mix(K, L, 0.5);
|
||||||
|
if (all_eq3(B,C,D,Q) && none_eq2(B,F,src(-2.0,1.0))) K=mix(J, K, 0.5);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (notsame(F,D)) {
|
||||||
|
if (notsame(D,I) && notsame(D,E) && notsame(D,C)) {
|
||||||
|
if (all_eq3(D,A,H,S) && none_eq2(D,B,src(1.0,2.0))) J=mix(L, J, 0.5);
|
||||||
|
if (all_eq3(D,G,B,P) && none_eq2(D,H,src(1.0,2.0))) L=mix(J, L, 0.5);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (notsame(F,E) && notsame(F,A) && notsame(F,G)) {
|
||||||
|
if (all_eq3(F,C,H,S) && none_eq2(F,B,src(-1.0,2.0))) K=mix(M, K, 0.5);
|
||||||
|
if (all_eq3(F,I,B,P) && none_eq2(F,H,src(-1.0,-2.0))) M=mix(K, M, 0.5);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
vec2 a = fract(tex_coord * source_size);
|
||||||
|
vec4 colour = (a.x < 0.5) ? (a.y < 0.5 ? J : L) : (a.y < 0.5 ? K : M);
|
||||||
|
frag_color = colour;
|
||||||
|
}
|
|
@ -1,5 +1,5 @@
|
||||||
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
|
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
#version 460 core
|
#version 460 core
|
||||||
layout (location = 0) in vec2 frag_tex_coord;
|
layout (location = 0) in vec2 frag_tex_coord;
|
||||||
layout (location = 0) out vec4 color;
|
layout (location = 0) out vec4 color;
|
||||||
|
|
|
@ -111,6 +111,9 @@ void BlitScreen::CreateWindowAdapt() {
|
||||||
case Settings::ScalingFilter::Area:
|
case Settings::ScalingFilter::Area:
|
||||||
window_adapt = MakeArea(device);
|
window_adapt = MakeArea(device);
|
||||||
break;
|
break;
|
||||||
|
case Settings::ScalingFilter::Mmpx:
|
||||||
|
window_adapt = MakeMmpx(device);
|
||||||
|
break;
|
||||||
case Settings::ScalingFilter::Fsr:
|
case Settings::ScalingFilter::Fsr:
|
||||||
case Settings::ScalingFilter::Bilinear:
|
case Settings::ScalingFilter::Bilinear:
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
#include "video_core/host_shaders/present_mitchell_frag.h"
|
#include "video_core/host_shaders/present_mitchell_frag.h"
|
||||||
#include "video_core/host_shaders/present_bspline_frag.h"
|
#include "video_core/host_shaders/present_bspline_frag.h"
|
||||||
#include "video_core/host_shaders/present_zero_tangent_frag.h"
|
#include "video_core/host_shaders/present_zero_tangent_frag.h"
|
||||||
|
#include "video_core/host_shaders/present_mmpx_frag.h"
|
||||||
#include "video_core/renderer_opengl/present/filters.h"
|
#include "video_core/renderer_opengl/present/filters.h"
|
||||||
#include "video_core/renderer_opengl/present/util.h"
|
#include "video_core/renderer_opengl/present/util.h"
|
||||||
|
|
||||||
|
@ -78,4 +79,9 @@ std::unique_ptr<WindowAdaptPass> MakeArea(const Device& device) {
|
||||||
HostShaders::PRESENT_AREA_FRAG);
|
HostShaders::PRESENT_AREA_FRAG);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::unique_ptr<WindowAdaptPass> MakeMmpx(const Device& device) {
|
||||||
|
return std::make_unique<WindowAdaptPass>(device, CreateNearestNeighborSampler(),
|
||||||
|
HostShaders::PRESENT_MMPX_FRAG);
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace OpenGL
|
} // namespace OpenGL
|
||||||
|
|
|
@ -25,5 +25,6 @@ std::unique_ptr<WindowAdaptPass> MakeSpline1(const Device& device);
|
||||||
std::unique_ptr<WindowAdaptPass> MakeLanczos(const Device& device);
|
std::unique_ptr<WindowAdaptPass> MakeLanczos(const Device& device);
|
||||||
std::unique_ptr<WindowAdaptPass> MakeScaleForce(const Device& device);
|
std::unique_ptr<WindowAdaptPass> MakeScaleForce(const Device& device);
|
||||||
std::unique_ptr<WindowAdaptPass> MakeArea(const Device& device);
|
std::unique_ptr<WindowAdaptPass> MakeArea(const Device& device);
|
||||||
|
std::unique_ptr<WindowAdaptPass> MakeMmpx(const Device& device);
|
||||||
|
|
||||||
} // namespace OpenGL
|
} // namespace OpenGL
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
#include "video_core/host_shaders/present_mitchell_frag_spv.h"
|
#include "video_core/host_shaders/present_mitchell_frag_spv.h"
|
||||||
#include "video_core/host_shaders/present_bspline_frag_spv.h"
|
#include "video_core/host_shaders/present_bspline_frag_spv.h"
|
||||||
#include "video_core/host_shaders/present_zero_tangent_frag_spv.h"
|
#include "video_core/host_shaders/present_zero_tangent_frag_spv.h"
|
||||||
|
#include "video_core/host_shaders/present_mmpx_frag_spv.h"
|
||||||
#include "video_core/host_shaders/vulkan_present_frag_spv.h"
|
#include "video_core/host_shaders/vulkan_present_frag_spv.h"
|
||||||
#include "video_core/host_shaders/vulkan_present_scaleforce_fp16_frag_spv.h"
|
#include "video_core/host_shaders/vulkan_present_scaleforce_fp16_frag_spv.h"
|
||||||
#include "video_core/host_shaders/vulkan_present_scaleforce_fp32_frag_spv.h"
|
#include "video_core/host_shaders/vulkan_present_scaleforce_fp32_frag_spv.h"
|
||||||
|
@ -101,4 +102,9 @@ std::unique_ptr<WindowAdaptPass> MakeArea(const Device& device, VkFormat frame_f
|
||||||
BuildShader(device, PRESENT_AREA_FRAG_SPV));
|
BuildShader(device, PRESENT_AREA_FRAG_SPV));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::unique_ptr<WindowAdaptPass> MakeMmpx(const Device& device, VkFormat frame_format) {
|
||||||
|
return std::make_unique<WindowAdaptPass>(device, frame_format, CreateNearestNeighborSampler(device),
|
||||||
|
BuildShader(device, PRESENT_MMPX_FRAG_SPV));
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace Vulkan
|
} // namespace Vulkan
|
||||||
|
|
|
@ -23,5 +23,6 @@ std::unique_ptr<WindowAdaptPass> MakeGaussian(const Device& device, VkFormat fra
|
||||||
std::unique_ptr<WindowAdaptPass> MakeLanczos(const Device& device, VkFormat frame_format);
|
std::unique_ptr<WindowAdaptPass> MakeLanczos(const Device& device, VkFormat frame_format);
|
||||||
std::unique_ptr<WindowAdaptPass> MakeScaleForce(const Device& device, VkFormat frame_format);
|
std::unique_ptr<WindowAdaptPass> MakeScaleForce(const Device& device, VkFormat frame_format);
|
||||||
std::unique_ptr<WindowAdaptPass> MakeArea(const Device& device, VkFormat frame_format);
|
std::unique_ptr<WindowAdaptPass> MakeArea(const Device& device, VkFormat frame_format);
|
||||||
|
std::unique_ptr<WindowAdaptPass> MakeMmpx(const Device& device, VkFormat frame_format);
|
||||||
|
|
||||||
} // namespace Vulkan
|
} // namespace Vulkan
|
||||||
|
|
|
@ -68,6 +68,9 @@ void BlitScreen::SetWindowAdaptPass() {
|
||||||
case Settings::ScalingFilter::Area:
|
case Settings::ScalingFilter::Area:
|
||||||
window_adapt = MakeArea(device, swapchain_view_format);
|
window_adapt = MakeArea(device, swapchain_view_format);
|
||||||
break;
|
break;
|
||||||
|
case Settings::ScalingFilter::Mmpx:
|
||||||
|
window_adapt = MakeMmpx(device, swapchain_view_format);
|
||||||
|
break;
|
||||||
case Settings::ScalingFilter::Fsr:
|
case Settings::ScalingFilter::Fsr:
|
||||||
case Settings::ScalingFilter::Bilinear:
|
case Settings::ScalingFilter::Bilinear:
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue