[Bug 96958] [SKL] Improper rendering in Europa Universalis IV
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Thu Jun 8 09:06:09 UTC 2017
https://bugs.freedesktop.org/show_bug.cgi?id=96958
--- Comment #5 from Jakub Szuppe <jakub+mesa at streamcomputing.eu> ---
There are two different bugs/issues here:
1) Artefacts looking like stretched textures (for example, between mountains
and plains)
2) Low detail of the terrain
1) Artefacts looking like stretched textures (for example, between mountains
and plains):
https://drive.google.com/open?id=0B1fY17pW39ZecW5DeWhnaGtrNHc
These artefacts are visible only when anisotropic filtering is turned on (for
example, maxanisotropy=4 in ~/.local/share/Paradox Interactive/Europa
Universalis IV/settings.txt).
The reason is the same as in "95530 - Stellaris - colored overlay of sectors
doesn't render on i965" (see
https://bugs.freedesktop.org/show_bug.cgi?id=95530#c11): The shader needs exact
(unfiltered) values from a special texture with terrain type ids. But i965
driver disables GL_NEAREST filtering (and enables anisotropic) when
GL_TEXTURE_MAX_ANISOTROPY_EXT > 1.
The patch https://bugs.freedesktop.org/attachment.cgi?id=123400 fixes this:
https://drive.google.com/open?id=0B1fY17pW39Zea1JfN09wa24xVEU
It also improves UI rendering slightly, because it uses GL_NEAREST too.
2) Low detail of the terrain
First, we used a trace created using i965 driver (the "ugly" trace). This trace
works same for i965, radeonsi, llvmpipe: low details, artefacts between tiles
(vertical and horizontal lines).
Then we used the trace created using radeonsi (the "good" trace) and noticed
that it works same for i965, radeonsi, llvmpipe: high details, bump-mapping, no
artefacts.
Th only difference between "good" and "ugly" traces is in shaders code:
The "ugly" has: #define NO_SHADER_TEXTURE_LOD (texture2D is used in this case)
The "good" has: #extension GL_ARB_shader_texture_lod : enable (texture2DLod is
used)
For some reason the game does not enable texture_lod extension for Intel
driver. But GL_ARB_shader_texture_lod is supported by the i965 driver!
We "hacked" gfx/FX/defines_glsl.fxh by adding these code:
#undef NO_SHADER_TEXTURE_LOD
#extension GL_ARB_shader_texture_lod : enable
This forces the shader to use the "good" variant. Everything looks ok (high
details, bump-mapping, no artefacts):
https://drive.google.com/open?id=0B1fY17pW39ZeRWJlbWlXbXpyZFU
Perhaps the game developers encountered some issues with Intel drivers before
or there are issues in some other places of the game (but I can't see them).
Kind regards,
Stream HPC Team
https://streamhpc.com/
--
You are receiving this mail because:
You are the assignee for the bug.
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/intel-3d-bugs/attachments/20170608/19f2f96f/attachment-0001.html>
More information about the intel-3d-bugs
mailing list