How is this / is this a particular shader technique?

Hey there,

I was wondering if anyone is able to describe to me how this is done: in the screenshot here from the game Cube World, a procedurally generated world of cubes, the creator has this really nice gradient color across the cubes. Is this a shader? How is this accomplished?

I ask because I’d like to implement it in my own procedural generator (which is not necessarily cube-based) which right now only uses solid color tile sheets. Any direction or indication from those more experiences would be greatly appreciated!

Yes, it’s called vertex colours. You just need to create darkness for anything which has less air. Less air blocks = more darkness.

If performance isn’t a consideration and you have pro, dump SSAO on it.

Hippocoder: thanks for the reply!

Just to clarify, it’s not the lighting I’m interested in, it’s the color gradation effect. It might be more clear with this screenshot. Mainly, there seems to be an “oscillation” of color from the lighter green to the darker green (which doesn’t seem to be an effect of the lighting). In the first screenshot, the colors fade from a yellow to an orangish color. Does this fall under the vertex color shader?

Thanks again.