I have created a procedural mesh and have applied the Standard Shader to its material, setting a procedurally created texture as the Albedo map dynamically. This all works and looks great.
I now want to add some shininess to some areas of the material (to simulate sun on water glow), so I have decided to use the “Standard (Specular setup)” shader instead.
Using this specular shader is fine if I just set my existing Albedo texture (the same one from the Standard shader) but when I try to use the specular map it looks wrong.
Based on my existing Albedo texture, I have created another texture using just a gray colour with alternating alpha values, and have set this as the specular map (_SpecGlossMap) in my shader.
This is not making my water areas shiny; it is instead making them highly reflective?! In fact I don’t see a glow, I see the skybox reflecting.
I was under the assumption that the specular map worked like this:
The colour of the glow is based on the colour of each pixel in the specular map.
The smoothness/strength of the glow is based on the alpha of each pixel in the specular map.
Are my assumptions correct, and can anyone think what I may be doing wrong?
Your assumptions for what the color and alpha values do are essentially correct. The one thing I’d say you’re missing is the alpha and color both control the brightness of the specular highlight. More over for PBR the specular color brightness controls the diffuse lighting much more than people may expect. For example, a solid white specular color is a perfect mirror with no diffuse lighting regardless of the alpha. An alpha of 1.0 would be like a mirror like one thinks of when the term mirror is used, a perfectly sharp reflection (depending on the reflection probe resolution). An alpha of 0.0 would be like brushed aluminum.
In the real world most non-metal objects have very dark specular colors. Even at a specular value of 128/255 that’s still basically a metal specular.
Water for example has a specular brightness of 0.02 in linear, that’s 14/255 in sRGB.