Nov 13, 2017

Custom data computed per-vertex - Unity Shader Bug fix

On Unity's web site (, Custom data computed per-vertex Shader has a bug, when I try the shader I get correct result in Scene view but not int Game view.

The fix is normalizing the normals.Just add normalize.

void vert (inout appdata_full v, out Input o) {
            o.customColor = normalize(abs(v.normal));


Then correct result is:


No comments:

Post a Comment