This is a tool for illustrating the various types of aliasing which can occur in computer graphics, and how many common methods of anti-aliasing interact with them. I wrote it to accompany an article which will be published some time in the future, and which contains a rather detailed treatment of the topics of aliasing and anti-aliasing.
A main point is to also show aliasing (that is, flickering and image instability) in motion, which is insufficiently captured by the common screenshot or (compressed) video comparisons.
There are 6 types of aliasing shown (transparency aliasing, geometry aliasing (2D and 3D), sub-pixel aliasing, texture aliasing and shader aliasing), and many methods of anti-aliasing are available.
The 1-8 keys are mapped to presets which show some common anti-aliasing methods:
multisampling, generally sparse grid
ordered grid supersampling with 4 samples
turns the 4 multisamples into supersamples, thus 4x SGSSAA on most HW
just post-processing, see sub-pixel effects
as above (note better motion stability)
1.5×1.5 OGSSAA + SMAA
similar to what can be achieved via injection in most games, often decently playable
maximum number of SGSSAA samples plus 2×2 OGSSAA. Close to the “ground truth”, that is the perfect representation of the scene on the pixel grid
Let me know if anything breaks. I do know that the PXAA and TPXAA PPAA methods don’t work on AMD, if anyone wants to help fix it (and has the time) contact me and provide some means of synchronous communication (e.g. Steam ID).
Various adjustments to improve compatibility with version 1.01b of Deadly Premonition
Removed the “disableJoystick” option, as it is now superfluous (the bug it was designed to work around was fixed by the developers!)
Made AA apply in some circumstances where it did not before, like the in-game menu
The distribution version now includes (optional) logging, to make debugging problems easier
Sorry for the delay, as I wrote in the last update I didn’t really have much time to work on this over the past 2 weeks. One important thing: if you are experiencing any issues, please reboot your system and see if they are still reproducible afterwards. Even in its current version the game is still quite susceptible to strange random issues which go away after a reboot.
I always planned to do this, but I decided to do so earlier rather than later for a few reasons:
0.8 works perfectly for me, but causes problems on many other systems, and it’s very hard to “remotely” debug issues.
I’ll be really busy with work the rest of this week and throughout next week, so I can’t spend as much time on Deadly Premonition (or anything really) as I would like.
Someone asked for it.
Now, when I released DSfix I was a bit disappointed by the lack of external contributions. There were a few brave souls, and I’m very grateful, but overall 95% of the code in DSfix is still written by me and untouched.
I think the problem was at least partly a lack of documentation and guidelines on my part, so I just spent over 2 hours writing up a developer README for DPfix. Have a look if you are thinking about contributing, or if you simply want to get a better idea about how Deadly Premonition works or how I create these interceptors.
Edit: Apparently there are some issues with this version on some configurations. If you experience any problems, revert back to 0.7.1 until I can figure this out.
Closing in on the final version.
Fixed pixel offset error in light buffer with higher rendering resolution (caused small halos around some objects)
Fixed AA not being correctly applied when the game uses the alternative rendering path (e.g. in the gallery)
Added option to improve the Depth of Field effect (reduces flicker/pixelation)
Added intial version of SSAO (screen space ambient occlusion) option
Some of these were much harder than they should have been. Maybe I’ll write up a longer post at some point with some more in-depth explanation of some of the things which go on in Deadly Premonition’s rendering pipeline, and how they affected DPfix development.
This is the “halo” effect I’m talking about in point 1:
It was caused by some pixel size (or rather, 0.5/pixelsize) shader parameters not being correctly updated with the increased resolution, both for vertex and for pixel shaders, and it got worse with higher resolutions. It should be completely fixed now.
The DoF improvements can be seen in the shot up top already, with a less muddy/pixelated but still unfocused image in the distance. Finally, here are two screenshots showing off the current SSAO effect:
I’m quite proud of this release, since it accomplishes something which is amongst the hardest things I did in any of my interceptor .dlls so far, and which I failed to do back in DSfix: improving the quality of the shadow mapping.
Fixed an issue that could happen when reloading and encountering a dual-perspective scene twice (0.7.1)
Fixed crash when accessing the Add-ons menu (might also fix other crashes)
Added the ability to improve shadow rendering: shadow map resolution and precision settings
Added reflection resolution setting (affects e.g. mirrors, see screenshot above)
The most complex of these is the shadow change, and it also make a rather large difference, as you can see for part of the shadow map of the opening scene below (Left shows the default, and right with settings shadowMapScale 4 and improveShadowPrecision 1):
There are some minor bad news which come with the crash fix, since it involves changing how textures are hashed:
All A few existing texture mods may no longer work, until they are updated to the new hash code.
The fix for dual-scene rendering is also affected, and will not work until I can get to such a scene in the game again and find the right hash. (Or until someone provides me with a savegame in the room in chapter 5)
I will release a 0.7.1 to fix the latter issue once I am able to do so, I did not want to delay this release further since I might not get a chance to work on anything concerning Deadly Premonition until Saturday.
Fixed crash caused by using the texture override functionality (sorry about that one)
Added screenshot functions for both normal and hudless screenshots
You can configure the keys for screenshots in DPFixKeys.ini and the path they are stored at in DPFix.ini (default is [game path]/dpfix/screens)
You can get the override textures used in the screenshot above here. The key texture can be used together with a controller profile to get correct key prompts when playing with a controller (particularly handy during QTEs).
Some people think their posts here on the blog are being deleted, rest assured this is not the case. Because of spam issues I run a rather rigorous spam filter and most posts need to be manually accepted (particularly if it’s your first post) so there may be some delay involved in that. (You may have noticed that there’s no spam in the comments, unlike most blogs )
If you have issues with the game which are unrelated to DPfix, (e.g. stuttering, crashing) try rebooting and setting DP.exe to Windows 98 compatibility mode. Sounds silly, but it fixed everything for me.
I can’t really fix audio issues or add real gamepad support to the game, sorry.
In the upcoming week I have quite a lot of work to do, so I probably won’t get much done in DPfix, but I think this version is really good enough to enjoy the game with.
Oh, and someone please make a high-res texture pack for the 3D stuff in the in-game menu. It’s hideous!
There is a remaining issue with scenes that render 2 camera perspectives later in the game. I’ll have to play a bit to get to those before I can attempt fixing them (I don’t really want to skip forward by downloading a save, I’m actually enjoying the game)
The borderless fullscreen mode implementation appears to be broken for some people. If the game crashes for you after updating to version 0.2, replace “borderlessFullscreen 1″ with “borderlessFullscreen 0″ in the DPfix.ini file