I'm getting some weird shader artifacts that appear at certain angles in my custom surface shader. It looks like they are appearing in certain triangles on my mesh. Fearing some precision issue, I changed my half's to floats, and disabled mesh compression on my mesh- but to no avail. I found the part of my code that seems to be causing it though- Code (CSharp): float mask = saturate(pow(1 - IN.color.a, _Power)); o.Albedo = mask; Any idea why this would be happening?
Okay, I figured out that I have to saturate my inverted vertex alpha first. Code (CSharp): pow(saturate(1 - IN.color.a), _Power); I'm not sure why that works, but it works...