I have tried the metallic / specular parameters in the terrain layers, I tried changing light intensity. Gloss does not go away. Even when I remove layers from the terrain, the raw model would shine.
Why?
I am trying to dig thru the URP terrain/lit shader and changed some values to find where that is happening, but I cannot find it. It is definitely coming from the one and only main directional light.
I found the cause but still no fix. I compared to the working 2020.3 project. When I change the Smoothness of a layer from 0 to 1 it shows exactly the same effect.
So, obviously the smoothness in 2021.2.15 is always 1 for all terrain layers. When I move the slider it does not change! So there must be an error in the shader?!
It seems I found a workaround!
Each texture has an output format which is set to automatic. When I change it to 24bit, the smoothness slider is working. One would say, yes but you have alpha source set. This is true but even setting it to none would not work.
So for me it seems, they broke something with the automatic format.
Yeah but that trick is horrible on mobile. All terrain textures uncompressed… bye bye RAM on android.
I played around with the shader and the bug seems to be on the smoothness. It’s completely ignored on Android. I edited the shader manually and set it to 0 and the reflection is gone.
The terrain lit shader. It gets the smoothness values and metallic values from who knows where. I’ve just edit the shader and set it to 0 and it works as expected in Android.
Those are not what you have to change. You actually need to go into the include hsls files and change the code by hand and set it to zero. That’s why I said I have no idea where it get those values from because the input (what you are changing) has no impact. You have to literally hard code those values into the shader files.
Edit: I actually found out where it’s getting those values from. From the alpha channel. That’s why setting the texture to anything that doesn’t have alpha, fixes it. But this is a major terrain shader bug.
When I change also .hlsl fileses and save,it compiles and after complied it returns back to original hlsl file.
TerrainLitPasses.hlsl
TerrainLitInput.hlsl
TerrainMetaPass.hlsl
i have changed, after save it returns back to original.
happen in 2022.3.19f1 LTS too !!
for workaround i try enable debug mode in inspector and override smoothness to 2 or 3 .
in case i cant afford rgb24 format due to memory