Hello everyone,
I have been working on a terrain shader for a few days now. I was trying to combine a few techniques that I have been reading about. So far I have successfully implemented Tri-Planar Mapping and Height Blending for Albedo, but I am having trouble setting o.Normal in the surf function. Everything that I have tried so far has left my terrain completely black.
I’m trying to use “Texture Type: Default” and override to RGBA 32 bit so I can use the alpha channel of the normal map in the terrain shader. I can get the normal map to work as the o.Albedo, but when I set the o.Normal to anything at all the terrain goes black. I have also tried using “Texture Type: normal” and not overriding the settings but the terrain still goes black.
Here is the Albedo, with no normal set. It looks great! I can’t wait to get the normals working
o.Albedo = finColor;
//o.Normal = normalize(finNormal * 2 - 1);
Here is the Normal set as the Albedo, and the normal not set. Just so you can see that the color information does appear to be correct.
o.Albedo = finNormal;
//o.Normal = normalize(finNormal * 2 - 1);
And Here is what happens when I set the o.Normal
o.Albedo = finColor;
o.Normal = normalize(findNormal * 2 - 1);
I have tried a few things such as
o.Normal = finNormal;
o.Normal = finNormal * 2 - 1;
o.Normal = normalize(finNormal * 2 - 1);
o.Normal = UnpackNormal(tex2D(_Normal0, IN.uv_Control)); //This one didn't work either! I thought this was very strange
So I am not sure what is happening and I am hoping that someone has an idea of what I am doing incorrectly.


