On Unity's web site (https://docs.unity3d.com/2017.3/Documentation/Manual/SL-SurfaceShaderExamples.html), 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) {
UNITY_INITIALIZE_OUTPUT(Input,o);
o.customColor = normalize(abs(v.normal));
}
Then correct result is:
if debugging is the art of removing bugs, then programming must be the art of inserting them..
Subscribe to:
Post Comments (Atom)
Visual Studio Keyboard Shortcuts
Playing with keyboard shortcuts is very interesting and reduce the headache of using the mouse again and again while programming with visu...
-
Delete: /YOUR PATH TO WORKSPACE/.metadata/.plugins/org.eclipse.core.resources
-
Playing with keyboard shortcuts is very interesting and reduce the headache of using the mouse again and again while programming with visu...
-
Unity NavMesh vs Apex Path vs A* Pathfinding Project Update June 2017: Unity 5.6 comes with improved NavMeshes! They are now component-b...
No comments:
Post a Comment