Project

General

Profile

Actions

Emulator Issues #8336

closed

Anisotropic Filtering option is incorrect in D3D

Added by masterotakusuko almost 10 years ago.

Status:
Fixed
Priority:
Normal
Assignee:
-
Category:
GFX
% Done:

0%

Operating system:
N/A
Issue type:
Bug
Milestone:
Regression:
No
Relates to usability:
No
Relates to performance:
No
Easy:
No
Relates to maintainability:
No
Regression start:
Fixed in:

Description

Game Name?
All games.

Game ID?
All games.

What's the problem? Describe what went wrong in few words.
Anisotropic Filtering is incorrectly configured in the D3D backend, in the GUI and in gfx_dx11.ini.

The options in the GUI are x1, x2, x4, x8 and x16, which are represented by the option "MaxAnisotropy" in the ini file, with values 0, 1, 2, 3, or 4.
Switching between them ingame shows that the x2 and x8 options don't work as expected. They look the same as the previous step. So the only working ones are x1, x4 and x16.

The true problem is that I think those values are truly x1, x2 and x4 ingame. How did I find out? Putting "MaxAnisotropy = 16" in the ini file. It looks better than the x16 option in the GUI. Switching to windowed mode and opening the graphics configuration shows that the AF option has its value in blank (obvious because 16 in the ini doesn't correspond with anything in the GUI). Switching to AFx16 shows an immediate decrease of AF quality in the game.

In the Dolphin profile of the Nvidia drivers AF isn't forced, so nothing is interfering.

What did you expect to happen instead?
I expected AF to work correctly, as in the OpenGL backend. In OpenGL, all AF steps work and the x16 option looks the same as "MaxAnisotropy = 16" forced in the D3D ini.

What steps will reproduce the problem?

  1. Use AFx16 in the D3D backend.
  2. Look at how the x2 and x8 options don't work as they should.
  3. Change "MaxAnisotropy" to 16 in "gfx_dx11.ini".
  4. See how it looks better than AFx16 in the GUI, and switching to AFx16 reduces quality.

Dolphin 3.5 and 3.5-367 are old versions of Dolphin that have
known issues and bugs, so don't report issues about them and test the
latest Dolphin version first.
Which versions of Dolphin did you test on?
Latest development build at the moment: 4.0-5815. It also happens in 4.0-4478.

Does using an older version of Dolphin solve your issue? If yes, which
versions of Dolphin used to work?
The oldest one I tried this is 4.0-4478, which still has the problem. I don't know since when this issue exists.

What are your PC specifications? (including, but not limited to: Operating
System, CPU and GPU)
CPU: Intel Core i5 4670k @ 4.4GHz
GPU: Nvidia GTX 760
RAM: G.SKILL RIPJAWS X @ 1866MHz CL8
OS: Windows 7 Ultimate x64

Is there any other relevant information? (e.g. logs, screenshots,
configuration files)
Here are 4 screenshots:

Metroid Prime with AFx16 in GUI: http://i.cubeupload.com/932I5R.png
Metroid Prime with MaxAnisotropy=16 in ini: http://i.cubeupload.com/hF7jrF.png

F-Zero GX with AFx16 in GUI: http://i.cubeupload.com/kAJKoL.png
F-Zero GX with MaxAnisotropy=16 in ini: http://i.cubeupload.com/qyDOyw.png

Actions #1

Updated by JMC4789 almost 10 years ago

lol.

Actions #2

Updated by JMC4789 almost 10 years ago

That lol wasn't laughing at you, it was laughing at dolphin.

Actions #3

Updated by masterotakusuko almost 10 years ago

I know, it wouldn't make sense to laugh at me, right? :p

I've been noticing this issue for some time. My AF senses were tingling and telling me "this doesn't look like 16xAF, but the option is selected...". When I started playing in 3D some time ago, that feeling was amplified, and then I tried the ini tweak today.

Actions #4

Updated by JMC4789 almost 10 years ago

Does it work in OpenGL?

Actions #5

Updated by masterotakusuko almost 10 years ago

Yes, I've said it in the OP. All steps gradually increase the AF quality, with AFx16 looking as it should. I noticed the issue more since I started playing in 3D because previously I had been using OpenGL more than D3D.

Actions #6

Updated by JMC4789 almost 10 years ago

I need to learn to read. Anyway, this is a good report, I can't see any mistakes on your end. Just need one of the gpu people to review it or lioncash.

Actions #7

Updated by masterotakusuko almost 10 years ago

Deleted my previous comment for correcting.

I think (without looking at the source) that Dolphin, in D3D, takes the MaxAnisotropy value directly from the ini and doesn't transform it.

What it should do:

0 -> x1
1 -> x2
2 -> x4
3 -> x8
4 -> x16

Instead, maybe it sees it like this:

0 -> Falls back to x1.
1 -> x1
2 -> x2
3 -> Not valid, let's fall back to the previous working value (x2).
4 -> x4

Actions #8

Updated by MayImilae almost 10 years ago

  • Category set to gfx

braces

Actions #9

Updated by mimimi over 9 years ago

I'm not good at spotting stuff like this, is this still happening? If yes, somebody will take care of it soonish.

Actions #10

Updated by masterotakusuko over 9 years ago

In 7.5 hours (when I'm home), I'll check with the latest master build.

Actions #11

Updated by mimimi over 9 years ago

Thanks, apparently something is happening(on irc), maybe there will be a pr for this when you come home. Next time feel free to bump your issue(s) every few weeks, so nobody forgets.

Actions #12

Updated by parlane over 9 years ago

  • Status changed from New to Fix pending

Thank you masterotakusuko for the indepth issue report!|

Fixed by https://github.com/dolphin-emu/dolphin/pull/2583

Actions #13

Updated by masterotakusuko over 9 years ago

Wow,that was fast. And the problem was just what I thought, lol (that it used the values from the ini without changing them).

Actions #14

Updated by kostamarino over 9 years ago

There is an issue with the fix, it seems anisotropic filtering isn't set to 1x or disabled like before, it can be seen at virtual console nes games that show garbled graphics similar like when using aniso 2x or higher in a previous build.

Actions #16

Updated by JMC4789 over 9 years ago

  • Status changed from Fix pending to Fixed
Actions

Also available in: Atom PDF