New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[D3D9] Implement Clamp Negative LOD-Bias #2779
Comments
If a game has texture shimmering, it probably means it isn't using mipmaps in the first place, which means you also cannot clamp them with dxvk On the commit, I don't get why it uses float instead of an integer value? And while I personally have not tested it, I hope the |
Because the LOD bias is not an integer property, it's a float property, and values like -0.5 are rather common. The motivation for that particular commit was that Nioh 2 does not use a negative LOD bias when DLSS enabled, which leads to blurry textures.
It prevents you from putting a very high number into a config file and do things like this. The option does not affect how any game works by default. The clamp is only for the config option, not for the value that the sampler is created with. |
Yeah. I expected this answer. Actually, I mistook MeshLODbias for MipMapLODbias. My bad.
And yes. That is exactly what I'm talking about. IMHO a blacklist for games that ban for this would be a better approach (Or at least a way to overwrite the clamping limit "at your own risk" kind of thing) |
I assume you're going to maintain an exhaustive list of all potentially affected online games then, and implement a solution to restrict it for future games as well? The intended use case for this option is to allow people to improve visuals in some circumstances, not to mess around with games in unintended ways, and most certainly not to trivialize cheating. If you want to do either of those things anyway, go ahead, modify the code, build it yourself, we can't and won't stop you. But the limitation will stay, end of discussion. |
Good alternative is to use libstrangle which has env vars to adjust picmip and texture filtering. Beware this will not fix the shimmering in old games without mipmaps. |
For e.g. FSR they recommend to add
Try this with gamescope or GE FSR with Performance profiles and see if this improve something. libstrangle should implement EDIT: 0.58 for Performance profile, e.g. 720 -> 1080 |
Hi there, it's not about mipmap, the problem is that game developers are forcing a negative value in their games this leaves fences and power wires all broken, the option in the Nvidia driver is for this, any negative sharpness like -1 or -2 in the game is forced to 0, you could look at the links I provided |
Oh ok. Fair enough. |
|
What's Up pchome Game with Clamp Negative LOD-Bias: In this image you can see that the shimmering of the fence disappears completely, and the wires of the electric poles too. |
Yes, a clamp (e.g. when setting 0.0?) would be nice, as we don't know what bias a game uses. And it might also apply it only to select textures, so manually setting a positive bias to counter some negative bias of the game itself could blur some textures more than others. Nvidia driver clamp btw. likely only works with GL. Ping @liam-middlebrook , as hopefully this can get addressed at some point. :( |
d3d11-clamp-lod-bias-v2.patch.txt |
Hi man, thanks for taking the time to create this patch, I tested it on some games I have here, in: Dark Souls Remastered (Steam and Proton 7.0-4) Here in Dark Souls I haven't observed any changes, in general it no has shimmering. Little Nightmares (Steam and Proton 7.0-4) In Little Nightmares I noticed a change in the texture of the wood, especially when moving. Far Cry 4 (Ubisoft Connect and Wine) In Far Cry 4, in some foliage I noticed differences, now in the game as a whole no perceptible changes. GTA Vice City The Definitive Edition (Rockstar Launcher and Wine) In GTAVC The Definitive Edition, here it is different, some texture get very blurry with Clamp Lod Bias and others stay normal, now in alpha texture like the grids/fences there is no difference. Edit: Now I see why don't have changes in alpha textures, which is the most important thing to remove Negative Lod Bias, looking more closely your Patch code, you coded for mipmap textures only, and this is probably why there are no changes in grids/fences in GTAVC |
All right, this will be a patch that I will keep and use when needed in a game I've seen some people complain about shimmering in Resident Evil 2 Remake, Assassin's Creed Unity and Battlefield 4, but I don't have them to test. |
I don't think Battlefield 4 uses negative LOD bias, though its terrain mega texture is incompatible with forced AF. |
Yes, ugly wires and fences everywhere. For better fences you may want to do opposite: Also reminds me #1307 (comment) |
Try NFAA.fx (Normal Filter Anti Aliasing), even with adjusted LOD bias it makes shimmering much less noticeable and distracting. In addition it has
|
Hey pchome how is it going, I will try yes, thank you. I have been discovering ways to decrease the shimmering in textures, and this time I discovered some very good things, MagicTXD allows you to apply quality mipmap directly in some games, which helps a lot to "hide" the Negative LOD bias, just set Generate mipmaps with Max=11 old GTAVC before and after, and the DXVK-d3d9 own Anisotropic, it decreases the shimmering in textures that don't have any filter, as I observed here, apparently dxvk-d3d9 anisotropic applies to all textures which helps these "broken" games, what the mentioned PR tries to change.. Edit: But there is a catch, using MagicTXD's mipmap at these levels and higher increases the memory usage by 33%, which is bad for older games, so we need something like the Clamp negative lod bias, now what Nvidia does to get whole game lod blocked I want to know |
Hello, I was always afraid to ask if it would be possible to implement a way to Clamp the Lod, because I thought it would be something impossible to implement in DXVK, but this recent commit from Mr. Philip showed me that it might be possible.
Clamp Negative LOD-Bias (which would prevent using negative LOD values for texture filtering and replace them with 0.0)
It would help a lot to fix the texture shimmering in old games.
Here are images and mentions of what I mean if it was not very clear, sorry for my bad English.
https://www.bsimracing.com/nvidia-image-quality-lower-on-newer-cards/
https://linustechtips.com/topic/499767-low-image-quality-on-newer-gpus/page/2/#comment-6675744
The text was updated successfully, but these errors were encountered: