This is for models that use vertex colors. I want all faces with the max brightness of the object. So in daytime lighting it should look unshaded, but in a dark environment it should darken (like the thumbnail).

What I’ve tried:

  • using vertex_lighting* and then setting the normal directly (eg NORMAL = vec3(0.0, 1.0, 0.0);)
    • this works, but only if the lighting is perfectly overhead… a slightly wrong angle or even too far into the middle of an omnilight will create a shadow
  • attempting to save the original color value, change the normal, and then bring it the old brightness back via max() if the new value is dimmer
    • lots of moving parts/assumptions on my part here
  • other math stuff with NORMAL/VERTEX, abs() and normalize() etc
    • on top of the direction failure, there’s also failure to keep consistent brightness (with a spinning animation), and darkening across a TextMesh

I also know I could do this with unshaded and just multiply/mix it in the shader, but I don’t really like the idea of making a custom lighting/detection system (rather than using actual lights, that is).

I am not totally against diffuse shading, something like a vertex toon shader (2-3 brightness bands) could be interesting aesthetically. If that’s even possible, it seems like the vertex light calculation is hardcoded (though it’s also possible I just don’t understand it).

* this is a relatively re-added feature (4.4)