Create Vertex Color Shader with Shader Graph

Let’s start by adding a material using our shader graph. Start by creating a material.

I then created a sphere with the material on the sphere. Be sure to set the shader on the material to your color and SAVE your asset in shadergraph.

Next, let’s create the color. Set it as white, drag out the color channel and connect it to your albedo. Because the property is exposed, you can adjust in the material channel the color of your material live.

Now let’s create a vertex color. Right click, choose create node, and add a vertex color. Connect that to the albedo. Then install Polybrush.

With polybrush installed, you can now paint onto your object because your shader has vertex color enabled.

To go between the base color and the vertex color, we can use a lerp node.

You will also need a vector 1 to blend between the two. Set the mode to slider and now you can move between the two.

--

--

--

Unity Developer and Software Engineer who loves making games with GameDevHQ

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Algorithm Action: Class in JS

A Telegram Bot to retrieve data data from RuuviTag

Javascript vs Typescript

.prototype vs. .__proto__ vs. [[Prototype]], and Creating “new” Objects the OLOO Way

Quick hack how to debug ‘Dynamic’ JavaScript/TypeScript/Front-End/React.Js UI logic

neo.mjs nominated for “The most exciting Use of Technology”

React: useTransition() vs useDeferredValue()

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Al Heck

Al Heck

Unity Developer and Software Engineer who loves making games with GameDevHQ

More from Medium

UPDATE: Jan 6, 2022 FreedomFox // Fox2 update now LIVE

Comparative Application of Prims vs Kruskal’s Algorithm in real-life scenarios.