Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hillshade layer #4

Open
kylebarron opened this issue Apr 19, 2020 · 1 comment
Open

Hillshade layer #4

kylebarron opened this issue Apr 19, 2020 · 1 comment

Comments

@kylebarron
Copy link
Owner

You could probably create a 2D hillshade layer simply using the existing Lighting modules.

Here normals are computed from the mesh and then passed to lighting_getLightColor. If you passed a tile of normals, from the terrain tiles, then it would be like 1 step to apply the lighting?
https://github.com/visgl/deck.gl/blob/7b3b615edb86c7a6adf9230bdcb139a58e9933d3/modules/mesh-layers/src/simple-mesh-layer/simple-mesh-layer-fragment.glsl.js#L39

@kylebarron
Copy link
Owner Author

kylebarron commented Jun 19, 2020

Multidirectional hillshade: https://pubs.usgs.gov/of/1992/of92-422/of92-422.pdf

it looks pretty simple... you compute the hillshade 4 times, add, divide by 2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant