Page 3 of 4

Re: Invisible grid in ground textures in cities

Posted: Wed Jul 03, 2019 1:04 am
by Interkarma
BansheeXYZ wrote: ā†‘Mon Jul 01, 2019 2:39 am Seems Pango has made some recent bugfixes for this. Any chance we could get some test builds to see if it works on all hardware? I use Intel graphics and get the seams badly, others seem to be getting them on certain AMD and Intel cards.
I'm dropping new builds on Friday with this change merged. Hopefully it helps, but from Pango's description of the problem it may not be so easily resolved in this case. Let us know how you go with next builds.

Re: Invisible grid in ground textures in cities

Posted: Sun Jul 21, 2019 8:38 pm
by pango
I found this reading interesting, pointing the problem to fmod() usage:
https://stackoverflow.com/questions/147 ... s-aliasing
i'm not sure how useful it is though, as UNITY_SAMPLE_TEX2DARRAY* have no variant that takes derivatives.
(but maybe it's about the "math" seams?)

On an old Radeon HD 3450, I managed to fix (hide?) the seams by replacing

Code: Select all

float2 uv = fmod(unwrappedUV, 1.0);
with

Code: Select all

float2 uv = fmod(unwrappedUV + 1.0 / _TilemapDim, 1.0);
But that feels like black magic... Also, this fix only works for that card; All other cards start displaying seams :(

Re: Invisible grid in ground textures in cities

Posted: Mon Jul 22, 2019 2:28 am
by Teralitha
AMD Radeon RX 570 here. No mods. I also see these lines on the ground, but I didnt think anything of them. Gameplay is more important to me.

Re: Invisible grid in ground textures in cities

Posted: Sun Aug 18, 2019 4:59 am
by Mummelpuffin
Just gonna pop in and necro this to confirm that this is occurring on my rx580 on 0.10.4.

Re: Invisible grid in ground textures in cities

Posted: Sun Aug 18, 2019 9:04 am
by pango
I know, it's not gone on Intel and AMD :(

For reference I came across this, with more ideas of stuff to try: https://gamedev.stackexchange.com/quest ... ured-cubes

This looks a lot like what we're facing, but it's unclear how it's fixed. A similar trick to the one I used for my old card (add an offset to uv) is mentioned: https://forums.torque3d.org/viewtopic.php?t=231

Re: Invisible grid in ground textures in cities

Posted: Fri May 22, 2020 2:48 am
by pango
I tried to give it another shot, but I no longer have any AMD/ATI videocard at hand (the old motherboard died), so that's a blind attempt...
The hypothesis is a bug in the implementation of texture clamping with Tex2DArrays, and implement some pseudo CLAMP_TO_EDGE manually:
https://github.com/Interkarma/daggerfal ... e-clamping
(to be clear if you want to try it you need to be able to compile Daggerfall Unity on your own).

Re: Invisible grid in ground textures in cities

Posted: Fri May 22, 2020 3:14 am
by pango
While on the topic of textures filtering, border of tiles with classic textures and bi/trilinear filtering will never look better than
trilinear classic tile borders.jpg
trilinear classic tile borders.jpg (109.81 KiB) Viewed 2139 times
(unless somebody reimplements bi/trilinear filtering on top of tiles texture indirection instead of beneath). If you use classic textures, Main Filter = Point is highly recommended anyway.

And if I'm not mistaken trilinear filtering for GUI and Video textures makes no sense since they don't have mipmaps... No harm done, but it should give the same result as bilinear filtering.

Re: Invisible grid in ground textures in cities

Posted: Sat May 23, 2020 9:24 pm
by TheLacus
pango wrote: ā†‘Fri May 22, 2020 2:48 am I tried to give it another shot, but I no longer have any AMD/ATI videocard at hand (the old motherboard died), so that's a blind attempt...
The hypothesis is a bug in the implementation of texture clamping with Tex2DArrays, and implement some pseudo CLAMP_TO_EDGE manually:
https://github.com/Interkarma/daggerfal ... e-clamping
(to be clear if you want to try it you need to be able to compile Daggerfall Unity on your own).
I tested it on an AMD card, didn't help šŸ˜”

Re: Invisible grid in ground textures in cities

Posted: Sun May 24, 2020 12:54 am
by pango
Crap. Well, that was worth a shot I guess. It will be difficult to fix without the hardware at hand.

Re: Invisible grid in ground textures in cities

Posted: Mon May 25, 2020 3:13 pm
by JordRobbo98
Just wanted to let you know, I have these grid lines also, with or without texture mods, I am using an AMD card too (5700XT). Any testing you guys need Iā€™m more than happy just drop me a PM, love how far this has come in the past few years alone, anything I can do to help just let me know, Keep it up!šŸ˜€