Translated all documentations to English

This commit is contained in:
WHMHammer 2022-03-26 16:46:31 -05:00
commit f83b3c4002
13 changed files with 767 additions and 13 deletions

View file

@ -78,25 +78,22 @@ Magpie 没有广泛的测试过,因此错误不可避免。希望你能向开
}
}
```
3. 如果你要进行比较大的更改请先查看 [Projects](https://github.com/Blinue/Magpie/projects) 或提交 pull request 和开发者交流,确保和项目当前的方向一致。
4. 你的分支必须可以通过编译检查。
5. 请尽量应用 VS 检查代码时提出的建议。
2. 如果你要进行比较大的更改请先查看 [Projects](https://github.com/Blinue/Magpie/projects) 或提交 pull request 和开发者交流,确保和项目当前的方向一致。
3. 你的分支必须可以通过编译检查。
4. 请尽量应用 VS 检查代码时提出的建议。
### 我想贡献翻译 🌍
贡献新的翻译和修正现有翻译都是非常欢迎的。向 Magpie 贡献翻译非常简单,所有用户界面文本均存储在 resx 中,创建新的Resources.xx-xx.resx 文件并翻译所有字符串即可。和[贡献代码](#我想贡献代码-)一样,你需要提交 pull request。强烈推荐你定期维护自己的翻译因为 Magpie 的用户界面经常会进行较大的更改。
贡献新的翻译和修正现有翻译都是非常欢迎的。向 Magpie 贡献翻译非常简单,所有用户界面文本均存储在 resx 中,创建新的`Resources.xx-xx.resx`文件并翻译所有字符串即可。和[贡献代码](#我想贡献代码-)一样,你需要提交 pull request。强烈推荐你定期维护自己的翻译因为 Magpie 的用户界面经常会进行较大的更改。
**推荐使用 [ResXManager](https://marketplace.visualstudio.com/items?itemName=TomEnglert.ResXManager) 插件。它提供了友好的用户界面,使你无需编写代码。**
### 我想贡献文档 📖
因为开发者的懒惰Magpie 的文档长期处于缺失/过时的状态因此文档的贡献是非常欢迎的。Magpie 的 wiki 是从 main 分支的 docs 文件夹自动发布的,因此修改文档和[贡献代码](#我想贡献代码-)的方式相同。
因为开发者的懒惰Magpie 的文档长期处于缺失/过时的状态因此文档的贡献是非常欢迎的。Magpie 的 wiki 是从 `main` 分支的 docs 文件夹自动发布的,因此修改文档和[贡献代码](#我想贡献代码-)的方式相同。
如果你想改进已发布功能的文档,请合并到 main 分支,否则请合并到 dev 分支。每次发布版本时dev 分支的更改都将合并到 main 分支wiki 也会相应的自动更新。
如果你想改进已发布功能的文档,请合并到 `main` 分支,否则请合并到 `dev` 分支。每次发布版本时,`dev` 分支的更改都将合并到 `main` 分支wiki 也会相应的自动更新。
### 我想资助 Magpie 💰
开发者每周都会花费大量的时间开发新功能,这些工作都是无偿的。目前 Magpie 没有资助的渠道,对它进行 Star、Fork 或者宣传就是最好的资助!

99
CONTRIBUTING_EN.md Normal file
View file

@ -0,0 +1,99 @@
# Contribution Guide
**First of all, thank you for spending your valuable time on this project!**
Magpie is a personal project, initially inspired by Integer Scaler and Lossless Scaling. However, the project has become much more powerful than its predecessors. Due to the limited capability and energy of the developers, we welcome any form of contribution to this project! Magpie follows the [All Contributors](https://github.com/all-contributors/all-contributors) protocol. No matter in what form you contributed to the project (e.g. code, document, test, etc.), the developer will add you to the contributors list as long as you contributed enough.
If you are new here, we strongly recommend you to read [this article](https://opensourceway.community/open-source-guide/how-to-contribute/) (it's in Chinese).
Below are several forms of contribution you may want to make:
### I have a question 🙏
[FAQ](https://github.com/Blinue/Magpie/wiki/FAQ_EN) includes most of the common questions asked. You can also search in [Issue](https://github.com/Blinue/Magpie/issues) and [Discussion](https://github.com/Blinue/Magpie/discussions) to see if anyone has raised the same question before. Feel free to go ahead and ask in Discussion if not.
### I encountered an error 🐞
Magpie hasn't been thoroughly tested, so errors are inevitable. We hope you can let us know about the errors, which helps everyone having the same problems.
Please start from searching the errors in Issue and Discussion to avoid duplicate questions. Please publish a [Issue (bug report)](https://github.com/Blinue/Magpie/issues/new?assignees=&labels=bug&template=01_bug.yaml). Here are some best practices for the developers to quickly locate the error:
1. Choose a clear and simple subject. For example, "The rounded corner of windows in Windows 11 causes the top-left and bottom-right corners to be blurry" is an excellent subject. "Application Error," on the other hand, is hard to interpret.
2. It is especially helpful to upload the log files, which are stored in the logs folder. **Please upload the logs as attachments rather than copying their content.**
3. Please specify in details how to replicate the errors. It would be the best if you also provide us with some screenshots.
4. Additional information may be helpful for the developers. e.g. special display configurations, graphics card models, etc.
### I have a feature request 🚀
Please share any "whimsy" you have with the developers! We merely added the features based on our experience. Your ideas, however, may make a difference!
Please search in [Issue](https://github.com/Blinue/Magpie/issues) first for your feature requests to make sure they're not duplicate. Please also check [Projects](https://github.com/Blinue/Magpie/projects) (in Chinese) to see if the features have already been implemented. Please submit a [Issue (feature request)](https://github.com/Blinue/Magpie/issues/new?assignees=&labels=enhancement&template=03_request.yaml) with detailed descriptions of your suggestion, for example, if other applications have implemented similar features.
**If you'd like a new special effect to be added, please specify its name, use cases, and existing shader implementation (if exists). We also strongly recommend you to attach a comparison image with the current special effects.**
### I'd like to contribute codes 💻
Contributing codes is the more direct way to help Magpie. You may fix bugs, add new features, or correct formatting issues. You are not limited by the magnitude of the contribution. Each single line is important!
Like all other open source projects, you need to initiate pull requests to contribute codes for Magpie. The developers may ask you to make some modifications. Your pull request may be closed if you failed to respond in a timely manner.
Please merge to the `main` branch if the codes are for bug fixes of existing features. Otherwise please merge to the `dev` branch. Merging to the `dev` branch is always the safe option if you are not sure.
**Note: once you contribute codes to Magpie, you are agreeing to transfer the copyright of those codes to the current copyright owner of Magpie.** The purpose is to allow developers to make important decisions (like changing the license) without getting consent from every single contributor. The developers promise that the only changes in license will be shifting to newer versions of GPL. If you'd like to keep your copyrights, you will have to quit contributing and to apply the changes only to your forks.
You need to follow the following rules when contributing codes:
1. Keep in the same style as that of the current codes, including no change-of-line for curly brackets, using tabs for indentation, the ways to name variables, classes, and source files, using UTF-8 without BOM encoding, using inline comments in most of the cases, and using git-style messages, etc. Here is an example for C++:
``` c++
// ClassName.h
class ClassName {
public:
void Test1();
private:
void _PrivateTest1();
int _m1 = 0;
};
// ClassName.cpp
void ClassName::Test1() {
if (_m1 <= 0) {
++_m1;
}
}
void ClassName::_PrivateTest1() {
try {
_m1 = std::stoi("123");
} catch (std::exception& e) {
// Error Handling
}
int sum = 0;
for (int i = 0; i < _m1; ++i) {
sum += i;
}
}
```
2. Check [Projects](https://github.com/Blinue/Magpie/projects) or submit pull requests to communicate with the developers before you make major changes to make sure they align with the road map of the project.
3. Your branch must compile.
4. Please take the suggestions raised by VS as much as possible.
### I'd like to contribute translations 🌍
Adding new translations and fixing current translations are both welcomed. It's very easy to contribute translations to Magpie. All UI texts are stored in resx. Creating a new `Resources.xx-xx.resx` file and translating all strings is all you need to do. Just like for contributing codes, you need to submit pull requests. We strongly recommend you to periodically check your translations, since there are frequent changes in the Magpie UI.
**We recommend using the [ResXManager](https://marketplace.visualstudio.com/items?itemName=TomEnglert.ResXManager) plugin, which projects user-friendly interface and allows you to not writing even a single line of code.**
### I'd like to contribute to the documentations 📖
Because of the laziness of the developers, the documentations of Magpie are constantly missing or out of date. Contributions to documentations are more than welcomed! The MagPie wiki is automatically published from the docs folder in the `main` branch, so editing the documentation follows the same procedures of contributing codes.
Please merge to the `main` branch if you are improving the documentations of existing features. Otherwise merge to the `dev` branch. All changes in the `dev` branch will be merged to the `main` branch when new versions are released, and the wiki will be updated as well.
### I'd like to fund Magpie 💰
The developers spend a lot of time to implement new features without getting paid. Currently there is no way to fund Magpie. Staring, forking, and advertising are the best ways to support us!

View file

@ -10,13 +10,13 @@ Magpie magnifies any window to fullscreen with a handful of algorithms/filter. T
Please raise an issue if you are having trouble running the app.
👉 [Compilation Guidance (in Chinese)](https://github.com/Blinue/Magpie/wiki/编译指南)
👉 [Compilation Guides](https://github.com/Blinue/Magpie/wiki/compilation)
👉 [FAQ (in Chinese)](https://github.com/Blinue/Magpie/wiki/FAQ)
👉 [FAQ](https://github.com/Blinue/Magpie/wiki/FAQ_EN)
👉 [Customized Scaling Configurations (in Chinese)](https://github.com/Blinue/Magpie/wiki/自定义缩放配置)[Samples](https://gist.github.com/hooke007/818ecc88f18e229bca743b7ae48947ad)
👉 [Customizing Scaling Configurations](https://github.com/Blinue/Magpie/wiki/customizing_scaling_configurations) ([Samples](https://gist.github.com/hooke007/818ecc88f18e229bca743b7ae48947ad))
👉 [Contribution Guides (in Chinese)](./CONTRIBUTING.md)
👉 [Contribution Guides](./CONTRIBUTING_EN.md)
## How to use the app

57
docs/FAQ_EN.md Normal file
View file

@ -0,0 +1,57 @@
## How to customize scaling effects (e.g. to change the sharpness of FSR)?
Please check the [Customize Scaling Configurations](https://github.com/Blinue/Magpie/wiki/customizing_scaling_configurations) page.
## There are 2 cursors on the screen
This problem should no longer occur since v0.6.1. Please submit an issue if you triggered this bug on newer versions.
## "Initialization failed" when launching
Please first check the [System Requirements](https://github.com/Blinue/Magpie/blob/master/README_EN.md#System-Requirements), and then try fixing/updating the dotnet and MSVC runtime libraries. Please submit an issue if the procedures above didn't work.
## Duplicate-monitoring
When displaying performance monitor like RTSS (Rivatuner Statistics Server), there might be 2 OSD layers displayed with Magpie scaling. This is caused by d3d, the way to capture the screen since v0.7.0. It will be captured by RTSS as well. You can solve the problem by adding it to the blacklist.
## Error occurs when using Graphics Capture
It is a rare bug after v0.8, especially under Win10 v2004 or newer systems. Please notify the developers if you encounter this bug.
## The hot keys don't work, but `Scale after 5s` works.
1. Try changing the hot keys.
2. Try running Magpie as Administrator.
## Does Magpie support multiple monitors?
Support starts from v0.8.
## Lagging/latency
Please check the [Performance Guides](https://github.com/Blinue/Magpie/wiki/performance_guides).
## 我想对 Magpie 做一些喜闻乐见的事情,需要获得许可吗?
## I'd like to do something with Magpie. Do I need to get approval?
There is no need for approval as long as you are followi
## Will using Magpie in multi-player games be detected as cheating?
Magpie is designed to be non-intrusive, so it will not likely to be detected as a cheating tool. Currently there is no banning report for using Magpie. Nevertheless, you need to take the risks of using this software on your own.
## What is "disallowing DirectFlip?"
DirectFlip is a technology to reduce input lags, but it may cause troubles in some circumstances. Please turn on this option when you are in the following situationsL:
1. The game lags unexpectedly (game known with the issue: Days Gone).
2. Abnormal low frame rates.
3. The screen freezes when streaming.
## What is "Emulating dedicated fullscreen?"
A lot of software checks whether there are games running under dedicated fullscreen mode before popping up windows. Turn on this option if you'd like to play in fullscreen without being disturbed,
## What is the frame rate displayed in Magpie?
The frame rate displayed by Magpie is that of its own rather than that of the game. Due to the non-intrusive nature, Magpie has no way to detect the frame rates of the games themselves. We recommend you to use tools like RTSS to display the games' frame rates. There add-on layers can usually be captured by Magpie as well.

View file

@ -2,6 +2,8 @@
欢迎来到 Magpie Wiki。如果你想贡献文档请阅读[贡献指南](https://github.com/Blinue/Magpie/blob/main/CONTRIBUTING.md#%E6%88%91%E6%83%B3%E8%B4%A1%E7%8C%AE%E6%96%87%E6%A1%A3-)。
[English version](https://github.com/Blinue/Magpie/wiki/Home_EN)
[FAQ](https://github.com/Blinue/Magpie/wiki/FAQ)
[编译指南](https://github.com/Blinue/Magpie/wiki/%E7%BC%96%E8%AF%91%E6%8C%87%E5%8D%97)

15
docs/Home_EN.md Normal file
View file

@ -0,0 +1,15 @@
# Magpie Wiki
Welcome to the Magpie Wiki. Please read the [Contribution Guide](https://github.com/Blinue/Magpie/blob/main/CONTRIBUTING_EN.md) if you'd like to contribute the the documentations.
[FAQ](https://github.com/Blinue/Magpie/wiki/FAQ_EN)
[Compilation Guides](https://github.com/Blinue/Magpie/wiki/compilation)
[Customize Scaling Configurations](https://github.com/Blinue/Magpie/wiki/customizing_scaling_configurations)
[Customized Effects (MagpieFX)](https://github.com/Blinue/Magpie/wiki/customized_effects)
[Performance Improvements Guides](https://github.com/Blinue/Magpie/wiki/performance_improvements)
[Capture Modes Comparison](https://github.com/Blinue/Magpie/wiki/capture_modes)

18
docs/capture_modes.md Normal file
View file

@ -0,0 +1,18 @@
Magpie provides several capture modes. They have their pros and cons in different scenarios.
| | Graphics Capture | Desktop Duplication | GDI | DwmSharedSurface |
| :---: | :---: | :---: | :---: |:---: |
| System requirement | Win10 v1903 | Win10 v2004 | None | None |
| CPU utilization | High | Low | Low | Low |
| Supports DirectComposition (e.g. UWP) | Yes | Yes | No | No |
| Supports recording/streaming | No under extreme conditions<sup>[1]</sup> | No | Yes | Yes |
| Support the source window to span multiple screens | No under extreme conditions<sup>[1]</sup> | No | Yes | Yes |
| Ignores DPI virtualization<sup>[2]</sup> | No | No | Yes| Yes |
| Notes | Recommended for 3D games | Suitable for games with more static frames<sup>[3]</sup>, could capture pop-ups | | Low VRAM usage |
[1]: (1) The source window does not support the common Graphics Capture (2) The system is Win10 v2004 or later
[2]: The system will perform bicubic interpolation upscaling to windows that do not support DPI scaling. The capture modes supporting this options captures the images before such scaling.
[3]: The Desktop Duplication mode effectively reduces the power consumption if there are many static frames.

24
docs/compilation.md Normal file
View file

@ -0,0 +1,24 @@
### Prerequisites
In order to compile Magpie, you need to first install:
1. The latest version of Visual Studio 2022. You need to install both ".NET Desktop Development" and "Desktop Development with C++" workloads and Windows SDK build 22000 or newer.
2. [Conan](https://conan.io/) and its runtime environment [Python](https://www.python.org/). Make sure Conan is added to the PATH.
### Compile and Run
1. Clone the repo
```bash
git clone https://github.com/Blinue/Magpie
```
2. Open `Magpie.sln` with Visual Studio 2022. The solution includes multiple projects. The "Magpie" project is the entrypoint of the program. The rest are launching projects. Please set them manually is they are not.
3. Generate the CONAN_INSTALL project, which will install all the Conan dependencies for the C++ projects.
4. Compile the Magpie project. The NuGet dependency will be install automatically in this process.
5. Run Magpie.
6. There might be errors raised by the IntelliSense for C++ projects. This is because the caches haven't been updated. You can try re-scanning the solutions or deleting the `.vs` folder.

View file

@ -0,0 +1,328 @@
This article guides you how to define your own scaling modes.
Magpie with search for the `ScaleModels.json` configuration file in its folder when launching. It will generate the file with the default configurations if it is not found.
Click [here](https://github.com/Blinue/Magpie/blob/main/Magpie/Resources/BuiltInScaleModels.json) for the complete content of the original configuration file. The following example shows the syntax:
```json
[
{
"name": "Lanczos",
"effects": [
{
"effect": "Lanczos",
"scale": [ -1, -1 ]
},
{
"effect": "AdaptiveSharpen",
"curveHeight": 0.3
}
]
},
{
"name": "FSR",
"effects": [
{
"effect": "FSR_EASU",
"scale": [ -1, -1 ]
},
{
"effect": "FSR_RCAS",
"sharpness": 0.87
}
]
},
{
"...": "..."
}
]
```
The root element of the configuration file is an array. Each element in the array represents one "scaling mode." The scaling modes are collections of "effects." Magpie will apply the effects in sequence when scaling. *The configuration file supports json comments, including inline comment `//` and block comment `/**/`.*
Magpie ships with a handful of effect that an be used in combinations. Most of the effects have parameters that can be customized. All effects are stored in the `effects` folder. You can easily add effects if you are familiar with HLSL. Check [Customized Effects](https://github.com/Blinue/Magpie/wiki/customized_effects).
Many effects supports the `scale` parameter, which has to be an array with 2 elements. When they are positive, they mean the scaling factors of the width and the height. Negative numbers indicate the maximum ratio that fits in the screen. 0 mean to stretch and fit the screen. The default value of all `scale` parameters is `[1, 1]`, meaning exactly the same as the input. Check [Examples](#Examples) for their applications.
## Introduction to shipped effects
* ACNet: Transplantation of [ACNetGLSL](https://github.com/TianZerL/ACNetGLSL). Suitable for anime-style images. Strong denoise effects.
* Output size: twice that of the input
* AdaptiveSharpen: Self-adaptive sharpening algorithm. This algorithm focuses on sharpening the blurry edges in the images. Hence it has less image noise, ringing artifacts, and stripes compared to the common sharpening algorithms.
* Output size: the same as the input
* Parameter
* curveHeight: Sharpening magnitude. Must be greater than 0. Usually between 0.3~2.0. Default value: 1.0.
* Anime4K_3D_AA_Upscale_US and Anime4K_3D_Upscale_US: 3D game scaling algorithms provided by Anime4K. The AA variant supports anti-aliasing.
* Output size: twice that of the input
* Anime4K_Denoise_Bilateral_Mean, Anime4K_Denoise_Bilateral_Median, and Anime4K_Denoise_Bilateral_Mode: Denoise algorithms provided by Anime4K. Uses mean, median, and mode, respectively.
* Output size: the same as the input
* Parameter:
* intensitySigma: Denoise magnitude. Must be greater than 0. Default value: 1.0.
* Anime4K_Restore_M, Anime4K_Restore_L, and Anime4K_Restore_VL: Algorithms to restore the lines in animations. In increasing order of demand for computing power.
* Output size: the same as the input
* Anime4K_Thin_HQ: Algorithm to clarify lines in animations provided by Anime4K.
* Output size: the same as the input
* Parameters
* strength: The strength in each iteration. Must be greater than 0. Default value: 0.6.
* iterations: The number of iterations. Must be an integer greater than 0. Default value: 1.
Decreasing strength and increasing iterations improves the quality of the images, but will lower the processing speed.
* Anime4K_Upscale_S, Anime4K_Upscale_L, Anime4K_Upscale_Denoise_S, Anime4K_Upscale_Denoise_L, and Anime4K_Upscale_GAN_x2_S: Anime-style scaling algorithms provided by Anime4K. The denoise variant includes denoise functionality. The GAN variant, which keeps more details, is still under experiment.
* Output size: twice that of the input
* Anime4K_Upscale_S_Lite: The light weight version of Anime4K_Upscale_S. It is faster, but at the cost of quality degradation, suitable for users will weak graphics cards.
* Output size: twice that of the input
* Bicubic and Bicubic_Lite: Interpolation algorithms. The lite variant is fast, but at the cost of quality degradation, Suitable for users will weak graphics cards.
* Output size: determined by the scale parameter. Best when used to downscale.
* Parameters
* scale: Scaling factor.
* paramB: Must be in range 0~1. Default value: 0.333333. Too large values will result in blurry images.
* paramC: Must be in range 0~1. Default value: 0.333333. Too large values will result in ring artifacts.
Different combinations of parameters will lead to different variants of the algorithm. For example:
Mitchell(B=C≈0.333333), Catmull-Rom(B=0 C=0.5), bicubic Photoshop(B=0 C=0.75), Spline(B=1 C=0)
* CAS: Transplantation of [FidelityFX-CAS](https://github.com/GPUOpen-Effects/FidelityFX-CAS). Lightweight sharpening effects.
* Output size: the same as the input
* Parameter
* sharpness: Must be in range 0~1. Default value: 0.4.
* CRT_Easymode: Easy-to-configure lightweight CRT shader.
* Output size: determined by the scale parameter.
* Parameters
* scale: Scaling factor.
* sharpnessH: Horizontal sharpness. Range: 0~1. Default value: 0.5.
* sharpnessV: Vertical sharpness. Range: 0~1. Default value: 1.
* maskStrength: Mask strength. Range: 0~1. Default value: 0.3.
* maskDotWidth: Range: 1~100. Default value: 1.
* maskDotHeight: Range: 1~100. Default value: 1.
* maskStagger: Range: 0~100. Default value: 0.
* maskSize: Range: 1~100. Default value: 1.
* scanlineStrength: Range: 0~1. Default value: 1.
* scanlineBeamWidthMin: Range: 0.5~5. Default value: 1.5.
* scanlineBeamWidthMax: Range: 0.5~5. Default value: 1.5.
* scanlineBrightMin: Range: 0~1. Default value: 0.35.
* scanlineBrightMax: Range: 0~1. Default value: 0.65.
* scanlineCutoff: Range: 1~1000 (integer). Default value: 400.
* gammaInput: Range: 0.1~5. Default value: 2.
* gammaOutput: Range: 0.1~5. Default value: 1.8.
* brightBoost: To increase brightness. Range: 1~2. Default value: 1.2.
* dilation: Boolean. Default value: true.
* CRT_Geom: One of the most popular CRT shaders. Aims to emulate arcade machines. Check [Emulation General Wiki](https://emulation.gametechwiki.com/index.php/CRT_Geom).
* Output size: determined by the scale parameter.
* Parameters
* scale: Scaling factor.
* CRTGamma: Range: 0.1~5. Default value: 2.4.
* monitorGamma: Range: 0.1~5. Default value: 2.2.
* distance: Range: 0.1~3. Default value: 1.5.
* curvature: Whether to emulate the screen curvature or not. Boolean. Default value: true.
* radius: Range: 0.1~10. Default value: 2.
* cornerSize: Range: 0.001~1. Default value: 0.03.
* cornerSmooth: Range: 80~2000 (integer). Default value: 1000.
* xTilt: Range: -0.5~0.5. Default value: 0.
* yTilt: Range: -0.5~0.5. Default value: 0.
* overScanX: Range: -125~125 (integer). Default value: 100.
* overScanY: Range: -125~125 (integer). Default value: 100.
* dotMask: Range: 0~0.3. Default value: 0.3.
* sharper: The larger the value is, the clear the image becomes. Range: 1~3 (integer). Default value: 1.
* scanlineWeight: Range: 0.1~0.5. Default value: 0.3.
* lum: Increases illumination. Range: 0~1. Default value: 0.
* interlace: Whether to emulate interlace. Boolean. Default value: true.
* CRT_Hyllian: Provides sharp and clear outputs with slight rims. Similar to Sony BVM displays.
* Output size: determined by the scale parameter.
* Parameters
* scale: Scaling factor.
* phosphor: Boolean. Default value: true.
* vScanlines: Boolean. Default value: false.
* inputGamma: Range: 0~5. Default value: 2.5.
* outputGamma: Range: 0~5. Default value: 2.2.
* sharpness: Range: 1~5 (integer). Default value: 1.
* colorBoost: Range: 1~2. Default value: 1.5.
* redBoost: Range: 1~2. Default value: 1.
* greenBoost: Range: 1~2. Default value: 1.
* blueBoost: Range: 1~2. Default value: 1.
* scanlinesStrength: Range: 0~1. Default value: 0.5.
* beamMinWidth: Range: 0~1. Default value: 0.86.
* beamMaxWidth: Range: 0~1. Default value: 1.
* crtAntiRinging: Range: 0~1. Default value: 0.8.
* CRT_Lottes: Provides multiple masks emulating Bloom and Halation effects. Similar to CGA arcade displays.
* Output size: determined by the scale parameter.
* Parameters
* scale: Scaling factor.
* hardScan: Range: -20~0 (integer). Default value: -8.
* hardPix: Range: -20~0 (integer). Default value: -3.
* warpX: Range: 0~0.125. Default value: 0.031.
* warpY: Range: 0~0.125. Default value: 0.041.
* maskDark: Range: 0~0.2. Default value: 0.5.
* maskLight: Range: 0~0.2. Default value: 1.5.
* scaleInLinearGamma: Boolean. Default value: true.
* shadowMask: Masking style. Range: 0~4 (integer). Default value: 3.
* brightBoost: Range: 0~2. Default value: 1.
* hardBloomPix: Range: -2~-0.5. Default value: -1.5.
* hardBloomScan: Range: -4~-1. Default value: -2.
* bloomAmount: Range: 0~1. Default value: 0.15.
* shape: Range: 0~10. Default value: 2.
* FineSharp: High-quality sharpening. The earliest version was the AviSynth script.
* Output size: the same as the input
* Parameters
* sstr: Sharpening strength. Must be greater than or equal to 0. Default value: 2. If you change this parameter, you will have to also change cstr. Check the note below.
* cstr: Balancing strength. Must be greater than or equal to 0. Default value: 0.9.
* xstr: The sharpening strength in the final step of the XSharpen style. Range: 0~1 之间, better not to exceed 0.249. Default value: 0.19.
* xrep: To fix the artifacts in the last step of sharpening. Must be greater than or equal to 0 0, Default value: 0.25.
* Note: mapping between sstr and cstr (sstr->cstr): 0->0, 0.5->0.1, 1.0->0.6, 2.0->0.9, 2.5->1.00, 3.0->1.09, 3.5->1.15, 4.0->1.19, 8.0->1.249, 255.0->1.5
* FSR_EASU and FSR_EASU_DX10: Transplantation of the scaling step in [FidelityFX-FSR](https://github.com/GPUOpen-Effects/FidelityFX-FSR). The DX10 variant works on graphics cards supporting DirectX feature level, but will be slower.
* Output size: determined by the scale parameter.
* Parameter
* scale: Scaling factor.
* FSR_RCAS: Transplantation of the sharpening step in [FidelityFX-FSR](https://github.com/GPUOpen-Effects/FidelityFX-FSR).
* Output size: the same as the input
* Parameter
* sharpness: sharpening strength. Must be greater than 0. The greater the value is the sharper the images become. Default value: 0.87.
* FSRCNNX: Transplantation of FSRCNNX_x2_8-0-4-1
* Output size: twice that of the input
* FSRCNNX_LineArt: Transplantation of FSRCNNX_x2_8-0-4-1_LineArt
* Output size: twice that of the input
* FXAA_Medium, FXAA_High, FXAA_Ultra: Fast anti-aliasing by approximation. In increasing order of demand to computing power.
* Output size: the same as the input
* GTU_v050: Aims to emulate the blurry and mixed effects of CRT displays rather than masks or curvature. Supports scanning lines.
* Output size: determined by the scale parameter.
* Parameters
* scale: Scaling factor.
* compositeConnection: Boolean. Default value: false.
* noScanlines: Boolean. Default value: false.
* signalResolution: Integer no less than 16. Default value: 256.
* signalResolutionI: Positive integer. Default value: 83.
* signalResolutionQ: Positive integer. Default value: 25.
* tvVerticalResolution: Integer no less than 20. Default value: 250.
* blackLevel: Range: -0.3~0.3. Default value: 0.07.
* contrast: Range: 0~2. Default value: 1.
* Jinc: Scaling with the Jinc algorithm
* Output size: determined by the scale parameter.
* Parameters
* scale: Scaling factor.
* windowSinc: The smaller the value is the sharper the images become. Must be greater than 0. Default value: 0.5
* sinc: The larger the value is the sharper the images become. Must be greater than 0. Default value: 0.825
* Lanczos: Scaling with the Lanczos algorithm.
* Output size: determined by the scale parameter.
* Parameters
* scale: Scaling factor.
* ARStrength: Anti-ringing strength. The greater the value is the better the effect becomes, but the images will be more blurry. Range: 0~1. Default value: 0.5.
* Linear: Bilinear interpolation.
* Output size: determined by the scale parameter.
* Parameter
* scale: Scaling factor.
* LumaSharpen: A popular sharpening effect in reshade.
* Output size: the same as the input
* Parameters
* sharpStrength: Sharpening strength. Must be greater than 0. Default value: 0.65.
* sharpClamp: Anti-ringing strength. Range: 0~1. Default value: 0.035.
* pattern: Filter type. Range: 0~3 (integer) (4 types of filters). Default value: 1.
* offsetBias: Filter bias. Must be greater than or equal to 0. Default value: 1.
* Nearest: Nearest neighbor interpolation
* Output size: determined by the scale parameter.
* Parameter
* scale: Scaling factor.
* NIS: Transplantation of [NVIDIA Image Scaling](https://github.com/NVIDIAGameWorks/NVIDIAImageScaling).
* Output size: determined by the scale parameter.
* Parameters
* scale: Scaling factor.
* sharpness: Sharpening strength. Range: 0~1. Default value: 0.5.
* NVSharpen: Transplantation of NVSharpen that was published along with NIS.
* Output size: the same as the input
* Parameter
* sharpness: Sharpening strength. Range: 0~1. Default value: 0.5.
* Pixellate: Scale with the Pixellate algorithm. Suitable for upscaling pixel arts.
* Output size: determined by the scale parameter.
* Parameter
* scale: Scaling factor.
* RAVU_Lite_R3: Transplantation of ravu-lite-r3
* Output size: twice that of the input
* RAVU_Zoom_R3: Transplantation of ravu-zoom-r3
* Output size: determined by the scale parameter.
* Parameter
* scale: Scaling factor.
* SharpBilinear: Scale with the Sharp-Bilinear algorithm. Suitable for upscaling pixel arts.
* Output size: determined by the scale parameter.
* Parameter
* scale: Scaling factor.
* SMAA_Low, SMAA_Medium, SMAA_High, and SMAA_Ultra: SMAA anti-aliasing. In increasing order of demand for computing power.
* Output size: the same as the input
* SSimDownscaler: Downscaling algorithm based on perceptron. Sharper than Catrom.
* Output size: determined by the scale parameter.
* Parameter
* scale: Scaling factor.
* xBRZ_2x, xBRZ_3x, xBRZ_4x, xBRZ_5x, and xBRZ_6x: Scale with the xBRZ algorithm. Suitable for upscaling pixel arts.
* Output size: determined by the variant.
* xBRZ_Freescale and xBRZ_Freescale_Multipass: xBRZ algorithm supporting any scaling factor.
* Output size: determined by the scale parameter.
* Parameter
* scale: Scaling factor.
## Examples
1. If the display size is twice or 4 time that of the original window, you can apply Anime4K twice. The code snippet below shows how to use it:
```json
{
"name": "Animation 4x",
"effects": [
{
"effect": "Anime4K_Upscale_Denoise_L"
},
{
"effect": "Bicubic",
"scale": [ -0.5, -0.5 ]
},
{
"effect": "Anime4K_Upscale_L"
}
]
}
```
To improve performance, you can scale the output of the first Anime4K scaling to half of the screen so the second Anime4K scaling scales it to exactly the size of the display. To clear the noises in the image, the first Anime4K used is the denoise variant.
2. Center the captured window (with dark edges).
```json
{
"name": "Source",
"effects": [
{
"effect": "Nearest"
}
]
}
```
👉 [More examples](https://gist.github.com/hooke007/818ecc88f18e229bca743b7ae48947ad)

129
docs/customized_effects.md Normal file
View file

@ -0,0 +1,129 @@
MagpieFX Syntax
``` hlsl
//!MAGPIE EFFECT
//!VERSION 1
//!OUTPUT_WIDTH INPUT_WIDTH * 2
//!OUTPUT_HEIGHT INPUT_HEIGHT * 2
// Not defining OUTPUT_WIDTH and OUTPUT_HEIGHT means that this Effect takes any size of output
// Some predefined constants
// INPUT_WIDTH
// INPUT_HEIGHT
// INPUT_PT_X
// INPUT_PT_Y
// OUTPUT_WIDTH
// OUTPUT_HEIGHT
// OUTPUT_PT_X
// OUTPUT_PT_Y
// SCALE_X
// SCALE_Y
// Variables with the DYNAMIC keyword may use the constants below. They will be kept 0 when not having the DYNAMIC keyword.
// FRAME_COUNT: The total number of frames presented
// CURSOR_X and CURSOR_Y: Cursor position. Top and left are 0. Bottom and right are 1.
// Define variables
// The variables with the VALUE keyword will fit the values in the corresponding expressions.
// They are mutable parameters at runtime otherwise.
//!CONSTANT
//!VALUE INPUT_WIDTH
int inputWidth;
//!CONSTANT
//!VALUE INPUT_HEIGHT
int inputHeight;
//!CONSTANT
//!DYNAMIC
//!VALUE FRAME_COUNT
int frameCount;
//!CONSTANT
//!DEFAULT 0
//!LABEL Sharpness
float sharpness;
// Pattern definitions
// INPUT is a special keyword
// INPUT can not serve as the output for PASS
// Defining the INPUT is optional. However, to keep the completeness oif the syntax, we recommend you to explicitly define it.
//!TEXTURE
Texture2D INPUT;
//!TEXTURE
//!WIDTH INPUT_WIDTH + 100
//!HEIGHT INPUT_HEIGHT + 100
//!FORMAT B8G8R8A8_UNORM
Texture2D tex1;
// Sampler definitions
// FILTER (required), ADDRESS (optional)
// The default value for ADDRESS is CLAMP
//!SAMPLER
//!FILTER LINEAR
//!ADDRESS CLAMP
SamplerState sam1;
//!SAMPLER
//!FILTER POINT
//!ADDRESS WRAP
SamplerState sam2;
// Common part for all Pass-es
//!COMMON
#define PI 3.14159265359
// Pass definitions
// Needs to bind before using textures.
//!PASS 1
//!BIND INPUT
//!SAVE tex1
float func1() {
}
float4 Pass1(float2 pos) {
}
// Not defining SAVE means that this Pass is the output of the Effect
//!PASS 2
//!BIND tex1
float4 Pass2(float2 pos) {
}
```
**Multi Rendering Target (MRT)**
The SAVE command may designate multiple outputs (The limit of DirectX is 8):
``` hlsl
//!SAVE tex1, tex2
```
Here the Pass function has different signatures:
``` hlsl
void Pass[n](float2 pos, out float4 target1, out float4 target2);
```
**Load textures from files**
The TEXTURE command loads textures from files.
``` hlsl
//!TEXTURE
//!SOURCE test.bmp
Texture2D testTex;
```
Supported formats are common image formats like bmp, png, and jpg. DDS files are also supported. The texture size is exactly the same as the source image size.
In most situations the textures can serve as rendering targets (use in SAVE), unless the source file is in DDS format and the texture format cannot be used as a rendering target (e.g. compressing texture).

View file

@ -0,0 +1,30 @@
如果你遇到了性能问题(卡顿、延迟、功耗过高等),本文档可能有所帮助。
下面是一些你可能面临的情况:
## 我的显卡性能不足
如果你无法流畅使用一些有较高性能要求的效果(如 Anime4K、AdaptiveSharpen 等),请尝试下面的操作:
1. 更换为性能需求更低的效果。如 Anime4K_Upscale_S 比 Anime4K_Upscale_L 快的多CAS 比 AdaptiveSharpen 快的多,它们可以有效提高流畅度,代价是一定程度的画面质量损失。
2. 尝试更换捕获模式。建议你每种模式都尝试一下。
3. 将帧率设为“无限制”。这将关闭垂直同步,通常可以大幅提高帧率,但可能造成画面撕裂。
4. 帧率设为“垂直同步”的同时打开“允许额外的延迟以提高性能”。这个配置不会造成画面撕裂,同时也可以有效提高帧率。缺点是会引入一帧的延迟。
## 间歇性卡顿
假设你的显卡性能对于运行 Magpie 绰绰有余,但依然遇到卡顿问题。请尝试下面的操作:
1. 更换捕获模式。建议你每种模式都尝试一下。
2. 在选项中打开“禁用 DirectFlip”。DirectFlip 是一个用于降低输入延迟的技术,但可能和某些游戏不兼容。
3. 如果你有多个显卡,尝试切换图形适配器。
4. 提高 Magpie 的进程优先级以及在驱动中提高 Magpie 的优先级(如果有这个选项)。
5. 如果上面的尝试不起作用,请提交一个 [Issue (Performance)](https://github.com/Blinue/Magpie/issues/new?assignees=&labels=performance&template=02_performance.yaml)。
## 我想降低 Magpie 的功耗
在需要节省电量或降低发热时,请尝试下面的操作:
1. 更换捕获模式。如果游戏的静止画面较多Desktop Duplication 捕获模式可以有效降低功耗。
2. 更换为性能需求更低的效果。
3. 限制帧率,但可能造成画面撕裂。

View file

@ -0,0 +1,30 @@
This article may be helpful if you are facing performance issues (e.g. lagging, latency, too much power consumption).
Below are some possible situations:
## My graphics card is not powerful enough
If you cannot run some effects with high computing power requirements (e.g. Anime4K, AdaptiveSharpen, etc.) smoothly, try the following:
1. Change to the variants with lower requirements. For example, Anime4K_Upscale_S is much faster than Anime4K_Upscale_L. CAS is much faster than AdaptiveSharpen. They can effectively improve the smoothness of the effects at the cost of some quality degradation.
2. Change the capture mode. We recommend you to try each of them.
3. Set the frame rate to "unlimited." This will turn off Vsync. It usually increases the frame rate substantially, but may causes the screen to tear.
4. Turn on "allow additional latency to improve performance" when Vsync is on. This will not lead to screen tearing and it also raises the frame rate. However, it will cause an extra 1-frame latency.
## Intermittent lagging
If your graphics card is powerful enough, but you are still experiencing lagging issues, try the following:
1. Change the capture mode. We recommend you to try each of them.
2. Turn on "Disable DirectFlip." DirectFlip is a technology to reduce input lag, but may be incompatible with some certain games.
3. If you have multiple graphics card, try changing the graphics adaptor.
4. Increase the process priority of Magpie and the priority in the driver (if such options exist).
5. Please submit an [Issue (Performance)](https://github.com/Blinue/Magpie/issues/new?assignees=&labels=performance&template=02_performance.yaml) if none of the attempts above works.
## I'd like to reduce the power consumption of Magpie
When you need to save electricity or reduce the heat generated, try the following:
1. Change the capture more. The Desktop Duplication capture mode effectively reduces the power consumption if there are a lot of static frames in the game.
2. Change the effects to their variants with lower requirements.
3. Limit the frame rate, which may cause screen tearing.

View file

@ -0,0 +1,25 @@
# MPVHookTextureParser
Translates the `TEXTURE` in mpv hood to `DDS` format.
### Usage Guides
Copy the texts in `TEXTURE` in to the files in the following format:
```
{WIDTH} {HEIGHT}
{TEXTURE DATA}
```
e.g.
```
45 2592
00000000000000000000000000000000a164deb9bc0290ba6a16...
```
Assuming the filename is `TEXTURE.txt`, execute the following command to output the results to `weights.dds`:
``` bash
> .\MPVHookTextureParser TEXTURE.txt weights.dds
```