- Home /
Uniform face colour flat shading using Shader Graph
I'm currently making a game around procedurally generated low-poly planets. To achieve the low-poly look, the vertices were duplicated so that each face has unique vertices.
I am now trying to set the colour of the face based on the distance from the centre of the planet (Ex. blue for the ocean, then transition to yellow then green as it gets higher).
Currently I am using shader graph and setting the albedo based on the distance from the centre of the planet (see output below). This isn't exactly what I would like as there is some interpolation happening between vertices so the faces are not of uniform colour. Can I get the colour to be uniform across a face based on the position of its centre while still using shader graph? Thank you very much!
Your answer
Follow this Question
Related Questions
MaterialPropertyBlock works with DrawMesh but not DrawMeshInstanced. 0 Answers
Render to GBuffer in command buffer 0 Answers
Render object ID to texture 2 Answers
Point light becomes invisible when in front of UI panel 1 Answer
UI Blur shader not working 0 Answers