17

How can I achieve per-vertex lighting (like in single/multi-texture shading) in GLSL with all of the other GLSL features (like buffer shadows, texture layers, etc.)? Bonus points if it can be done in the viewport.

I could bake the lights to v-cols but that is not realtime and I don't get any of the GLSL features (or hemi lamps for the matter) with single/multi-texture shading.

gandalf3
  • 157,169
  • 58
  • 601
  • 1,133
Nero1024
  • 643
  • 1
  • 7
  • 15
  • 2
    Not sure if that's possible. You'd have to write your own GLSL vertex/frag shader to simulate a per-vertex lighting. But then, you lose the ability take advantage of the Blender material system. – Mike Pan Feb 13 '14 at 18:37
  • 1
    Correct me if I'm wrong, but doesn't this tutorial from Blender Cookie do what you're looking for? http://cgcookie.com/blender/2014/06/17/realtime-glsl-lighting-shading/ – Justin Jul 17 '14 at 19:25
  • 1
    Could you light everything like normal but change the shading type to tangent shading? I don't know much about per-vertex lighting, but if it just makes the lighting look a different way as per normal, then you could go to the Materials Tab and under the Shading header, tick the boxes for Tangent Shading and Cubic Interpolation? – christai Jul 17 '14 at 22:30
  • 2
    Why do you want to do this? – gandalf3 Oct 26 '14 at 18:33
  • 1
    I think this would probably require custom blender code, it probably hasn't been developed due to the lack of need. – GiantCowFilms Jul 23 '14 at 01:43
  • 1
    could you Instance a lamp to each one of the vertices? – 4nof Jun 25 '20 at 00:11

0 Answers0