mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-01 14:58:14 +00:00
Change to int to allow higher supersampling scale.
This commit is contained in:
1 parent
199106cad6
commit
ffac542f95
5 files changed
+10
-10
No files matched your search
@@ -1752,20 +1752,20 @@ void FramebufferManagerCommon::Resized() {
|
||||
}
|
||||
|
||||
postShaderIsUpscalingFilter_ = shaderInfo ? shaderInfo->isUpscalingFilter : false;
|
||||
postShaderIsSSAAFilter_ = shaderInfo ? shaderInfo->isSSAAFilter : false;
|
||||
postShaderSSAAFilterLevel_ = shaderInfo ? shaderInfo->SSAAFilterLevel : 0;
|
||||
|
||||
// Actually, auto mode should be more granular...
|
||||
// Round up to a zoom factor for the render size.
|
||||
int zoom = g_Config.iInternalResolution;
|
||||
if (zoom == 0 || postShaderIsSSAAFilter_) {
|
||||
if (zoom == 0 || postShaderSSAAFilterLevel_ >= 2) {
|
||||
// auto mode, use the longest dimension
|
||||
if (!g_Config.IsPortrait()) {
|
||||
zoom = (PSP_CoreParameter().pixelWidth + 479) / 480;
|
||||
} else {
|
||||
zoom = (PSP_CoreParameter().pixelHeight + 479) / 480;
|
||||
}
|
||||
if (postShaderIsSSAAFilter_)
|
||||
zoom *= 2;
|
||||
if (postShaderSSAAFilterLevel_ >= 2)
|
||||
zoom *= postShaderSSAAFilterLevel_;
|
||||
}
|
||||
if (zoom <= 1 || postShaderIsUpscalingFilter_)
|
||||
zoom = 1;
|
||||
@@ -1874,7 +1874,7 @@ void FramebufferManagerCommon::ShowScreenResolution() {
|
||||
messageStream << PSP_CoreParameter().renderWidth << "x" << PSP_CoreParameter().renderHeight << " ";
|
||||
if (postShaderIsUpscalingFilter_) {
|
||||
messageStream << gr->T("(upscaling)") << " ";
|
||||
} else if (postShaderIsSSAAFilter_) {
|
||||
} else if (postShaderSSAAFilterLevel_ >= 2) {
|
||||
messageStream << gr->T("(supersampling)") << " ";
|
||||
}
|
||||
messageStream << gr->T("Window Size") << ": ";
|
||||
|
||||
@@ -379,7 +379,7 @@ protected:
|
||||
bool usePostShader_ = false;
|
||||
bool postShaderAtOutputResolution_ = false;
|
||||
bool postShaderIsUpscalingFilter_ = false;
|
||||
bool postShaderIsSSAAFilter_ = false;
|
||||
int postShaderSSAAFilterLevel_ = 0;
|
||||
|
||||
std::vector<VirtualFramebuffer *> vfbs_;
|
||||
std::vector<VirtualFramebuffer *> bvfbs_; // blitting framebuffers (for download)
|
||||
|
||||
@@ -42,7 +42,7 @@ void LoadPostShaderInfo(std::vector<std::string> directories) {
|
||||
off.section = "Off";
|
||||
off.outputResolution = false;
|
||||
off.isUpscalingFilter = false;
|
||||
off.isSSAAFilter = false;
|
||||
off.SSAAFilterLevel = 0;
|
||||
off.requires60fps = false;
|
||||
shaderInfo.push_back(off);
|
||||
|
||||
@@ -88,7 +88,7 @@ void LoadPostShaderInfo(std::vector<std::string> directories) {
|
||||
info.vertexShaderFile = path + "/" + temp;
|
||||
section.Get("OutputResolution", &info.outputResolution, false);
|
||||
section.Get("Upscaling", &info.isUpscalingFilter, false);
|
||||
section.Get("SSAA", &info.isSSAAFilter, false);
|
||||
section.Get("SSAA", &info.SSAAFilterLevel, 0);
|
||||
section.Get("60fps", &info.requires60fps, false);
|
||||
|
||||
// Let's ignore shaders we can't support. TODO: Not a very good check
|
||||
|
||||
@@ -37,7 +37,7 @@ struct ShaderInfo {
|
||||
// Use x1 rendering res + nearest screen scaling filter
|
||||
bool isUpscalingFilter;
|
||||
// Use 2x display resolution for supersampling with blurry shaders.
|
||||
bool isSSAAFilter;
|
||||
int SSAAFilterLevel;
|
||||
// Force constant/max refresh for animated filters
|
||||
bool requires60fps;
|
||||
|
||||
|
||||
@@ -92,4 +92,4 @@ Name=Super Sampling AA(Gauss)
|
||||
Fragment=GaussianDownscale.fsh
|
||||
Vertex=fxaa.vsh
|
||||
OutputResolution=True
|
||||
SSAA=True
|
||||
SSAA=2
|
||||
Reference in new issue
Block a user