EsotericSoftware / spine-runtimes

2D skeletal animation runtimes for Spine.
http://esotericsoftware.com/
Other
4.42k stars 2.92k forks source link

[ts][threejs] Custom shader ignores light and shadows #2606

Open davidetan opened 3 months ago

davidetan commented 3 months ago

As reported by a user in this forum thread, the custom shader we use to render our meshes does not take into consideration lights and shadows.

It seems that using the onBeforeCompile callback is possible to modify the threejs base shader rather than replacing it.

See this official example (code here).