Adds an sharpening pass option to the game.
Details
- Reviewers
vladislavbelov - Commits
- rP23947: Adds contrast-adaptiv-sharpening filter, also helps to partly remove FXAA…
- Trac Tickets
- #5677
Select CAS as sharpening pass in the graphic settings. Select different sharpness factors by slider.
Diff Detail
- Repository
- rP 0 A.D. Public Repository
- Lint
Lint Skipped - Unit
Unit Tests Skipped - Build Status
Buildable 12079 Build 22753: Vulcan Build Jenkins Build 22752: Vulcan Build (Windows) Jenkins
Event Timeline
Successful build - Chance fights ever on the side of the prudent.
Linter detected issues: Executing section Source... source/renderer/scripting/JSInterface_Renderer.h | 27| namespace·JSI_Renderer | | [MAJOR] CPPCheckBear (syntaxError): | | Code 'namespaceJSI_Renderer{' is invalid C code. Use --std or --language to configure the language. source/renderer/PostprocManager.h | 26| class·CPostprocManager | | [MAJOR] CPPCheckBear (syntaxError): | | Code 'classCPostprocManager{' is invalid C code. Use --std or --language to configure the language. source/ps/CStrInternStatic.h | 1| /*·Copyright·(C)·2014·Wildfire·Games. | | [NORMAL] LicenseYearBear: | | License should have "2020" year instead of "2014" Executing section JS... Executing section cli...
Link to build: https://jenkins.wildfiregames.com/job/docker-differential/1815/display/redirect
Successful build - Chance fights ever on the side of the prudent.
Linter detected issues: Executing section Source... source/renderer/PostprocManager.h | 26| class·CPostprocManager | | [MAJOR] CPPCheckBear (syntaxError): | | Code 'classCPostprocManager{' is invalid C code. Use --std or --language to configure the language. source/ps/CStrInternStatic.h | 1| /*·Copyright·(C)·2014·Wildfire·Games. | | [NORMAL] LicenseYearBear: | | License should have "2020" year instead of "2014" source/renderer/scripting/JSInterface_Renderer.h | 27| namespace·JSI_Renderer | | [MAJOR] CPPCheckBear (syntaxError): | | Code 'namespaceJSI_Renderer{' is invalid C code. Use --std or --language to configure the language. Executing section JS... Executing section cli...
Link to build: https://jenkins.wildfiregames.com/job/docker-differential/1818/display/redirect
binaries/data/mods/public/shaders/glsl/cas.fs | ||
---|---|---|
52 | Some compilers don't infer the value type so better change vec2(1, 1) to vec2(1.0, 1.0). |
Successful build - Chance fights ever on the side of the prudent.
Linter detected issues: Executing section Source... source/renderer/PostprocManager.h | 26| class·CPostprocManager | | [MAJOR] CPPCheckBear (syntaxError): | | Code 'classCPostprocManager{' is invalid C code. Use --std or --language to configure the language. source/ps/CStrInternStatic.h | 1| /*·Copyright·(C)·2014·Wildfire·Games. | | [NORMAL] LicenseYearBear: | | License should have "2020" year instead of "2014" source/renderer/scripting/JSInterface_Renderer.h | 27| namespace·JSI_Renderer | | [MAJOR] CPPCheckBear (syntaxError): | | Code 'namespaceJSI_Renderer{' is invalid C code. Use --std or --language to configure the language. Executing section JS... Executing section cli...
Link to build: https://jenkins.wildfiregames.com/job/docker-differential/1820/display/redirect
The patch is waiting for reviewing, what update do you want to have? The patch is mostly working. As it have the same problem as the FXAA patch, that it doesn’t work on all maps, and I don't know how to solve it, I will wait and see, how Vladislav is solving this problem.
If you want to test it, you could choose e.g. the new shirmish maps Obedska Bog or Sahyadri Buttes.
@vladislavbelov is working on the issue. The problem lies in finding a good way to order shader passes because they cannot be used in any order (which could be overriden by maps)
Waiting until D2712 is committed. A little modification of the code of this patch has to be done.
Some comments for later. :)
binaries/data/mods/public/shaders/glsl/cas.fs | ||
---|---|---|
4 | 2020? I guess it is still copyrighted? | |
source/renderer/PostprocManager.cpp | ||
38 | Nuke. | |
598 | Wondering if it wouldn't be better to always call m_SharpTech = g_Renderer.GetShaderManager().LoadEffect(CStrIntern(m_SharpName)); and let it error out if it isn't found. Maybe even better if you can load the json to figure that out. |
@OptimusShepard Please update it as soon as possible, I will help you test the latest CAS
binaries/data/mods/public/shaders/glsl/cas.fs | ||
---|---|---|
4 | Their Git seems to be long time not updated. It's still 2017-2019. How does it affect us? |
binaries/data/mods/public/shaders/glsl/cas.fs | ||
---|---|---|
4 | I guess leave it as is. nvm :) From a quick google search I can't find anything. |
- Updating D2642: Contrast-Adaptiv-Sharpening pass #
- Enter a brief description of the changes included in this update.
- The first line is used as subject, next lines as comment. #
- If you intended to create a new revision, use:
- $ arc diff --create
Edit some comments.
First time using Arcanist. Something went wrong, files are missing. How can I turn back to previous version?
Successful build - Chance fights ever on the side of the prudent.
Linter detected issues: Executing section Source... source/renderer/PostprocManager.h | 26| class·CPostprocManager | | [MAJOR] CPPCheckBear (syntaxError): | | Code 'classCPostprocManager{' is invalid C code. Use --std or --language to configure the language. source/renderer/scripting/JSInterface_Renderer.h | 27| namespace·JSI_Renderer | | [MAJOR] CPPCheckBear (syntaxError): | | Code 'namespaceJSI_Renderer{' is invalid C code. Use --std or --language to configure the language. source/ps/CStrInternStatic.h | 1| /*·Copyright·(C)·2014·Wildfire·Games. | | [NORMAL] LicenseYearBear: | | License should have "2020" year instead of "2014" Executing section JS... Executing section cli...
Link to build: https://jenkins.wildfiregames.com/job/docker-differential/2036/display/redirect
source/renderer/PostprocManager.cpp | ||
---|---|---|
598 | You're right. If we check with the if (line 595) the allowed configurations, we don't need the errors, I think? |
source/renderer/PostprocManager.cpp | ||
---|---|---|
598 | Well the question is what should we do when the user enters an incorrect / unsupported value, should we tell him? |
Successful build - Chance fights ever on the side of the prudent.
Linter detected issues: Executing section Source... source/renderer/PostprocManager.h | 26| class·CPostprocManager | | [MAJOR] CPPCheckBear (syntaxError): | | Code 'classCPostprocManager{' is invalid C code. Use --std or --language to configure the language. source/ps/CStrInternStatic.h | 1| /*·Copyright·(C)·2014·Wildfire·Games. | | [NORMAL] LicenseYearBear: | | License should have "2020" year instead of "2014" source/renderer/scripting/JSInterface_Renderer.h | 27| namespace·JSI_Renderer | | [MAJOR] CPPCheckBear (syntaxError): | | Code 'namespaceJSI_Renderer{' is invalid C code. Use --std or --language to configure the language. Executing section JS... Executing section cli...
Link to build: https://jenkins.wildfiregames.com/job/docker-differential/2041/display/redirect
source/renderer/PostprocManager.cpp | ||
---|---|---|
598 | Hm. As the user uses a drop down menu to select the filter, the only possibility to get an incorrect value is to edit the config file. But this wont lead to an crash. So is a error message really necessary? If we think so, we have to add error warnings to all parameter of the config file. |
source/renderer/PostprocManager.cpp | ||
---|---|---|
598 | I guess keep it consistent with what is done currently then:) |
Successful build - Chance fights ever on the side of the prudent.
Linter detected issues: Executing section Source... source/renderer/PostprocManager.h | 26| class·CPostprocManager | | [MAJOR] CPPCheckBear (syntaxError): | | Code 'classCPostprocManager{' is invalid C code. Use --std or --language to configure the language. source/renderer/scripting/JSInterface_Renderer.h | 27| namespace·JSI_Renderer | | [MAJOR] CPPCheckBear (syntaxError): | | Code 'namespaceJSI_Renderer{' is invalid C code. Use --std or --language to configure the language. source/ps/CStrInternStatic.h | 1| /*·Copyright·(C)·2014·Wildfire·Games. | | [NORMAL] LicenseYearBear: | | License should have "2020" year instead of "2014" Executing section JS... Executing section cli...
Link to build: https://jenkins.wildfiregames.com/job/docker-differential/2071/display/redirect
Updating the licence and the link, as AMD had updated it. Changing the game options name to the AMD recommented one.
Successful build - Chance fights ever on the side of the prudent.
Linter detected issues: Executing section Source... source/renderer/scripting/JSInterface_Renderer.h | 27| namespace·JSI_Renderer | | [MAJOR] CPPCheckBear (syntaxError): | | Code 'namespaceJSI_Renderer{' is invalid C code. Use --std or --language to configure the language. source/renderer/PostprocManager.h | 26| class·CPostprocManager | | [MAJOR] CPPCheckBear (syntaxError): | | Code 'classCPostprocManager{' is invalid C code. Use --std or --language to configure the language. source/ps/CStrInternStatic.h | 1| /*·Copyright·(C)·2014·Wildfire·Games. | | [NORMAL] LicenseYearBear: | | License should have "2020" year instead of "2014" Executing section JS... Executing section cli...
Link to build: https://jenkins.wildfiregames.com/job/docker-differential/2268/display/redirect
source/ps/CStrInternStatic.h | ||
---|---|---|
1 | could you please update year? |
Build failure - The Moirai have given mortals hearts that can endure.
Link to build: https://jenkins.wildfiregames.com/job/docker-differential/2419/display/redirect
Tested on my UHD 630 and GTX1070 no problem. It even works nicely with the MSAA patch.
The patch looks good for me. Yes, it has duplications. But at the moment we can't make it more clear that really makes sense without a lot of code.
binaries/data/mods/public/gui/options/options.json | ||
---|---|---|
148 | I suppose sharpening should be also in dependencies. | |
binaries/data/mods/public/shaders/glsl/cas.fs | ||
1 | We need to include #version here to understand for which GLSL version it was written. |
binaries/data/mods/public/gui/options/options.json | ||
---|---|---|
148 | Didn't find a possibility to use a element of the list as dependence. Using "sharpening" as dependence, sharpness is always locked. Sharpening isn't a boolean. |
binaries/data/mods/public/gui/options/options.json | ||
---|---|---|
148 | Ok, I'll figure it later. | |
binaries/data/mods/public/gui/options/options.xml | ||
12 | Does it look good for the minimal window size (1024x768)? | |
source/renderer/PostprocManager.h | ||
98 | AFAIK m_Sharpness can be not initiliazed after CFG_GET_VAL("sharpness", m_Sharpness);, so I'd suggest to initialize in constructor. |
Successful build - Chance fights ever on the side of the prudent.
Linter detected issues: Executing section Source... source/renderer/PostprocManager.h | 26| class·CPostprocManager | | [MAJOR] CPPCheckBear (syntaxError): | | Code 'classCPostprocManager{' is invalid C code. Use --std or --language to configure the language. source/renderer/scripting/JSInterface_Renderer.h | 27| namespace·JSI_Renderer | | [MAJOR] CPPCheckBear (syntaxError): | | Code 'namespaceJSI_Renderer{' is invalid C code. Use --std or --language to configure the language. Executing section JS... Executing section cli...
Link to build: https://jenkins.wildfiregames.com/job/docker-differential/2761/display/redirect
Edited the sharpness initialization. Disables sharpening, if post progressing, or GLSL, is disabled.
source/renderer/PostprocManager.h | ||
---|---|---|
98 | I initialize it now with the default value. |
Successful build - Chance fights ever on the side of the prudent.
Linter detected issues: Executing section Source... source/renderer/PostprocManager.h | 26| class·CPostprocManager | | [MAJOR] CPPCheckBear (syntaxError): | | Code 'classCPostprocManager{' is invalid C code. Use --std or --language to configure the language. source/renderer/scripting/JSInterface_Renderer.h | 27| namespace·JSI_Renderer | | [MAJOR] CPPCheckBear (syntaxError): | | Code 'namespaceJSI_Renderer{' is invalid C code. Use --std or --language to configure the language. Executing section JS... Executing section cli...
Link to build: https://jenkins.wildfiregames.com/job/docker-differential/2772/display/redirect
LICENSE.txt | ||
---|---|---|
33 | Isn't it MIT? |
LICENSE.txt | ||
---|---|---|
33 | You're right. Thx |