[go: up one dir, main page]

Map: add support for dynamic lighting

ℹ️ Funded by Sourcepole.

Currently, maps use a static model for lighting called hillshading: the light direction is expressed by a pair (azimuth, zenith), which is completely distinct from the actual lights in the THREE.js scene. Moreover, this static model does not work with curved earth (#424 (closed)), because the zenith and azimuth actually depends on the location on earth.

All shaded materials in THREE.js support dynamic lights, normal mapping and shadows via shader chunks, that should be fairly straightforward to transpose to our custom shaders.

Edited by Sébastien Guimmara