Godot version:
3.2.2 stable
OS/device including version:
Windows 10 v2004
Lenovo y710 Cube
Intel i7 6700
Nvidia GTX1080
16GB RAM
Issue description:
Visual Shader will not show a specular reflection caused by directional, omni or spotlight. A Spatial Material with identical properties (Roughness 0.2, Specular 0.5 for example) will show the specular just fine.
I have experimented with roughness maps and assigning values to Albedo/Specular/Roughness/Metalness via scalar constants and uniforms, along with checking the light, world and project settings. Nothing seems to allow specular to appear on a VisualShader material.
Steps to reproduce:
Minimal reproduction project:
VisualShaderSpecular_Bug.zip
Update:
Blinn, Phong and other specular modes appear to work. SchlickGGX does not show a specular in any diffuse modes, whereas the others will.
It's also worth taking note that the default diffuse mode for VisualShaders is Lambert, whereas the default for PBR workflows and SpatialMaterial is Burley.
It looks like when you set diffuse to burley or specular to schlick_ggx the visual shader does not insert the render mode at all. However, the shader assumes that you will have at least one specular render mode set.
Im guessing something in the logic here is rejecting the first render_mode in the list:
CC @Chaosus
I've no idea about shader code so I won't be much help on that front, but very happy to test things if anyone takes a shot at a fix.
This looks like its related to this
https://github.com/godotengine/godot/pull/12091
Ok, I take a look
@WickedInsignia

To be honest, I don't see a difference between those two (Windows10/GTX1060), maybe a problem somewhere else?
@Chaosus You need to rotate the scene around so the directional light is facing the camera.
The object on the right (SpatialMaterial) will show a specular for the directional light. The object on the left (VisualShader) will not.
Something is not initiating the specular in Visual Shaders with GGX.