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.

  • 1
    $\begingroup$ 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. $\endgroup$ – Mike Pan Feb 13 '14 at 18:37
  • $\begingroup$ Correct me if I'm wrong, but doesn't this tutorial from Blender Cookie do what you're looking for? cgcookie.com/blender/2014/06/17/realtime-glsl-lighting-shading $\endgroup$ – Justin Jul 17 '14 at 19:25
  • $\begingroup$ 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? $\endgroup$ – christai Jul 17 '14 at 22:30
  • $\begingroup$ I think this would probably require custom blender code, it probably hasn't been developed due to the lack of need. $\endgroup$ – GiantCowFilms Jul 23 '14 at 1:43
  • $\begingroup$ Why do you want to do this? $\endgroup$ – gandalf3 Oct 26 '14 at 18:33


looks like there is a example of what you seek in this thread " Hey, I add a few shader examples to the file: Light(1).blend -reduce code for hemi light. -lighting for all lightypes (use properties)

By the way will the lightype patch (with or without compatibility) find his way into official Blender in the future?

-different kinds of normalmapping like in Blender -Vertex lighting (useful for things that don't need detailed lighting to get better performance) -functions for all specular shading methods that are available in blender

And I make an example with lighting and a diffuse texture. I don't get it like in Blender maybe someone can help?


.blend inside thread


Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.