cancel
Showing results for 
Search instead for 
Did you mean: 

Bug Causing 2D Texture Crawling in 0.4.3 (Fix Inside)

cegli
Honored Guest
I'm working on DolphinVR and found that updating to 0.4.3 caused a serious visual quality drop on 2D menu's and scenes in OpenGL mode. The effect looks like large amounts of chromatic aberration, combined with edges constantly crawling (almost like aliasing) even when the headset is stationary on a desk. After a lot of debugging, I've found the source of the bug:

In CAPI_GL_DistortionShaders.h, line 319-321, the following was changed:

(0.4.2)
" float ResultR = _TEXTURELOD(Texture0, oTexCoord0, 0.0).r;\n"
" float ResultG = _TEXTURELOD(Texture0, oTexCoord1, 0.0).g;\n"
" float ResultB = _TEXTURELOD(Texture0, oTexCoord2, 0.0).b;\n"

to
(0.4.3)
" float ResultR = _TEXTURE(Texture0, oTexCoord0, 0.0).r;\n"
" float ResultG = _TEXTURE(Texture0, oTexCoord1, 0.0).g;\n"
" float ResultB = _TEXTURE(Texture0, oTexCoord2, 0.0).b;\n"

This is the source of the issue. Reverting these lines back to TEXTURELOD and building my own custom 0.4.3 SDK fixes the issue. Can this be fixed in the next SDK version? Is there any advantage to using TEXTURE, rather than TEXTURELOD? It's possible that the AMD drivers don't play well with TEXTURE as well. I don't have a Nvidia card on hard to see if the same thing happens on Nvidia systems.

Looking at the two calls, they look like they should be roughly equivalent...
https://www.opengl.org/sdk/docs/man/html/texture.xhtml
https://www.opengl.org/sdk/docs/man/html/textureLod.xhtml

My specs:
Windows 7 x64
AMD 7970HD GHz Edition (14.7 RC3 Drivers)
Intel i5 3570 @ 4.4GHz
8GB RAM

Any input would be appreciated! I may see if I can get it running on my laptop with a Nvidia GPU, to see if the same thing happens (even if it only displays at 5fps).
2 REPLIES 2

cybereality
Grand Champion
OK, seems like a bug to me. I have filed a report.
AMD Ryzen 7 1800X | MSI X370 Titanium | G.Skill 16GB DDR4 3200 | EVGA SuperNOVA 1000 | Corsair Hydro H110i Gigabyte RX Vega 64 x2 | Samsung 960 Evo M.2 500GB | Seagate FireCuda SSHD 2TB | Phanteks ENTHOO EVOLV

cegli
Honored Guest
Thanks! Let me know if you/the developers need anymore information.