Operating system or device - Godot version:
Arch Linux, Intel HD4000 (Mesa 17.1.4), Godot 3 master
Issue description:
I ran into a couple of graphical issues (glitches?) running the new material tester demo.
see the attached screenshot for details.
The grid-like artifacts all over the place (especially visible in the lower left part of the image)
I suspect this is either a driver issue or a quality setting of sorts?
The cheese example has this strange lighting effect on top, if you zoom in, select the Lobby as a background and move the camera a specific way so the window is behind the cheese.
This doesn't look realistic, since cheese should neither reflect so much light nor let it pass through the material so much.

I also have this issue.
Antergos x86_64 - Godot 3.0 master branch
(I'm probably using Intel/Mesa. I don't really know how to get hardware/driver info so I'll just spam command output in here. :P)
00:02.0 VGA compatible controller: Intel Corporation 4th Generation Core Processor Family Integrated Graphics Controller (rev 06)
...
01:00.0 3D controller: NVIDIA Corporation GF117M [GeForce 610M/710M/810M/820M / GT 620M/625M/630M/720M] (rev a1)
Extended renderer info (GLX_MESA_query_renderer):
Vendor: Intel Open Source Technology Center (0x8086)
Device: Mesa DRI Intel(R) Haswell (0x41e)
Version: 17.1.4
Accelerated: yes
Video memory: 1536MB
Unified memory: yes
Preferred profile: core (0x1)
Max core profile version: 4.5
Max compat profile version: 3.0
Max GLES1 profile version: 1.1
Max GLES[23] profile version: 3.1
...
OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) Haswell
OpenGL core profile version string: 4.5 (Core Profile) Mesa 17.1.4
...
OpenGL version string: 3.0 Mesa 17.1.4
...
OpenGL ES profile version string: OpenGL ES 3.1 Mesa 17.1.4
(off-topic)
(I'm probably using Intel/Mesa. I don't really know how to get hardware/driver info so I'll just spam command output in here. :P)
00:02.0 VGA compatible controller: Intel Corporation 4th Generation Core Processor Family Integrated Graphics Controller (rev 06)
01:00.0 3D controller: NVIDIA Corporation GF117M [GeForce 610M/710M/810M/820M / GT 620M/625M/630M/720M] (rev a1)
You're indeed using Intel Haswell, though you do have a NVIDIA discrete GPU (Optimus) which you don't use. Check https://wiki.archlinux.org/index.php/NVIDIA_Optimus if you'd like to learn how to use it.
So I played around with the environment settings a bit and found out that the "grid effect" is caused by SSAO. Turning off SSAO completely or changing the bias settings to a higher value removes or reduces the effect. I suppose AO bias settings shouldn't really be gpu or driver specific?
So I played around with the environment settings a bit and found out that the "grid effect" is caused by SSAO. Turning off SSAO completely or changing the bias settings to a higher value removes or reduces the effect. I suppose AO bias settings shouldn't really be gpu or driver specific?
That part might be #8708.
Sounds like it's indeed a matter of the bias setting for the SSAO. However, Juan's default for this demo seemed to have worked for him (and others too) - so I guess this is still a gpu/driver specific issue.
So I've enabled secondary GPU and used both simultaneously.
Both have different issues.
Left: Nvidia/Nouveau (DRI_PRIME=1) | Right: Intel/Mesa

The issue on Nvidia/Nouveau won't happen until the scene is reloaded. The object will flash black then shadow artifacts appear.
The following screenshot is when the scene is not reloaded yet.

Have you tried the proprietary Nvidia driver yet? I think Nouveau also uses Mesa for its 3D rendering.
Using proprietary driver: Works perfectly. No any of the mentioned artifacts. Demo runs with higher framerate. ( Sorry, RMS :( )

Edit: The light issue with cheese is still there though.

For the SSAO issue, I think this is probably MESA's fault, we should probably report it
The cheese issue needs a bugfix, but i don't remember it being that bad, will have to check
I'll try to ask MESA devs for guidance on how we can debug that/report issues efficiently to them.
On 7c679dd83 with AMD Carrizo (R5) amdgpu, MESA 17.1.2, if I manage to pass the import (sometimes hangs the system, like Unreal when running) it looks really good but has the same cheesy problem as the OP.

And turning off SSAO does not solve the problem.
Turning on 篓follow surface篓 ssurf scattering option makes the cheese looks like it should, could it be related?
@eon-s the bug with the cheese material is not related to SSAO, but to subsurface scattering (see #9530). This issue is not driver related. The problem with SSAO on MESA is the grid-like artifacts.
@vnen ah, okok, I was confused by the kaleidoscopic cheeses.
I don't see any SSAO artifact with that configuration then.
I saw a similar problem trying out Evee engine in the new Blender release. So I assume this is going to be quite a pain to resolve. xD
I am still out of Intel HD 4000 to test. Anyone else will have to fix the SSAO problem. The subsurf scattering problem i'm working on it
subsurf scatter issue is a duplicate of #9530
subsurf scatter issue is fixed, can't test SSAO
Arch Linux, HD4000 with Mesa 17.1.7
This is how the material tester demo looks on my system right now. Godot and the Demo are both on the latest version. observations:

[edit]
Some of my initial observations were a little pre-mature and are actually non-issues.
I have the same issue on the same configuration.
I may investigate a little bit, but I'm not a shader expert.
With a SSAO-Bias setting of about 0.4 (from default 0.01) all of the artifacts are gone. However, there also doesn't seem to be any visible effect os SSAO being enabled

[edit]
This is probably not related at all, but the only thing I could find on the internet regarding HD4000 + SSAO was this issue from Super Tux Kart.
https://github.com/supertuxkart/stk-code/issues/1751
This doesn't look at all like the artifacts we are seeing here, but maybe the way they fixed their issue helps in some way:
https://github.com/supertuxkart/stk-code/commit/cdae5957244c3624497f27e587fd36ae2bd91399
If I apply the following patch, I've got no artifacts anymore:
- float randomPatternRotationAngle = float((3 * ssC.x ^ ssC.y + ssC.x * ssC.y) * 10);
+ //float randomPatternRotationAngle = float((3 * ssC.x ^ ssC.y + ssC.x * ssC.y) * 10);
+ float randomPatternRotationAngle = 0.0;
need to investigate :)
@novemberist , could you check with the last master if the issue is still present ?
Already did. It's gone for me :) Good job! :+1:
Most helpful comment
Already did. It's gone for me :) Good job! :+1: