Hi guys,
I encountered some really strange errors today from my CG program in my Surface Shader.
Here’s what I mean:
Works.
o.Albedo = tex2D(_WaterBase, i.uv_WaterBase).rgb;
o.Alpha = 1;
Works.
o.Albedo = 1;
o.Alpha = i.uv_WaterBase.r;
Does not work.
o.Albedo = tex2D(_WaterBase, i.uv_WaterBase).rgb;
o.Alpha = i.uv_WaterBase.r;
The first one uses the texture coords to determine color, and has a constant alpha.
The second one uses the texture coords to determine alpha, and has a constant color.
The third one tries to use the texture coords to determine both color AND alpha,
but it ends up being completely transparent.
Also, I can’t use the isnan function. Even when I call isnan(1.0), it says there is no
matching overloaded function found!
This is all very frustrating. Could someone please lend a hand?