- Home /
Color depending on vertex normal
Hello everyone,
I'm really a noob with shaders (and with english... i hope someone understands this) and wondered how would it look like a shader that assignes two different colors based on vertex' normal. Like, if a vertex does have a specific normal, it has color1 assigned, otherwise it has color2 assigned.
I want to see if with this shader i would obtain something like a very stylized shadowing.
Someone could help? Thanks in advance.
Answer by Waelwindows · Jun 23, 2016 at 09:52 PM
Here's a shader using the world normal with the method you prescribed
here's a picture too
It works but it doesn't have much uses other than using it for testing purposes
Your answer
![](https://koobas.hobune.stream/wayback/20220613134359im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Need help with using world position in shader 1 Answer
Strange artifacts on Vertex Color Shader 0 Answers
Problem of color in custom vertex shader 0 Answers
how can i catch the sky box and do a reflection in object 0 Answers
Why does my shader only shade objects based on their normals in the X axis? 1 Answer