Glimmer Shaders

Glimmer Shaders

22.2k Downloads

Colored artifacts in water reflections for Intel gpus on linux

hilariousppp opened this issue ยท 6 comments

commented

I've been getting a variety of artifacts in reflections on both my Arc A770 and UHD620, both with the i915 kernel driver. Weirdly, the artifacts vary wildly depending on the shader profile used and whether Distant Horizons is turned on or not, so I put together this matrix of screenshots, using the UHD because you have mentioned having one on Discord before the 1.0 release. It may also be worth testing with an AMD gpu on Linux to see if the issues is with Mesa's OpenGL implementation or with Intel's drivers specifically.

All screenshots taken with Glimmer 1.1, Iris 1.8.1, Sodium 0.6.5, and Distant Horizons 2.2.1a under Fedora Linux 41 Workstation.

UHD 620 DH ON DH OFF
Potato potato dh on, red, green and magenta triangles potato dh off, no artifacts
Toaster toaster dh on, no artifacts toaster dh off, no artifacts
Integrated integrated dh on, no artifacts integrated dh off, green and magenta triangles intersecting a quarter the way up the screen and going to each of the four corners
Dedicated dedicated dh on, green wedge going from screen center to bottom corners dedicated dh off, magenta everywhere

One detail not in the above screenshots is that with DH on, the artifacts only happen where there is solid vanilla terrain under the water's surface. With DH off, the artifacts cover the entire screen.

commented

This is probably due to the same mistake that was causing the issues on intel previously - that being uninitialised variables! Would you be happy to ping me on discord so that when I get a chance to look into this I can get you to test fixed builds? I have to unplug my GPU power connector to get my iGPU to work so it's a bit of a hassle.

commented

Testing AMD on Linux is certainly easier so I will see if I can replicate there as well.

commented

I did some poking around on the latest commit (b581087) this evening, and figured out that the issue is due to reflectedColor not being set if the ray doesn't actually hit anything. However, I found another minor bug where a red stripe shows up in some very specific positions relative to an arch over the water (pictured). It seems to be connected to the binary refinement code, because it goes away when i disable it, and it changes slightly depending on the value of BINARY_REFINEMENTS.

Image

commented

Didn't see this notification until now, thanks for looking into this. Not surprised it's an issue with an uninitialised variable, will do a bit of a sweep to try and remove all of them.

commented

@hilariousppp can you confirm whether the issue persists on the new release?

commented

SSR is working fine as of Glimmer 1.3.1!