CesiumGS / CesiumGS/cesium

Supply both slope and aspect to shader in radians

Open
#7,409 6 comments 0 reactions 0 assignees View on GitHub
category - graphics type - enhancement
Dominant language
JavaScript
Stars
15.7k
Forks
3.9k
Avg merge
4d 6h
Merged PRs (30d)
34

Description

The **czm_materialInput.slope** parameter should be in radians. To fix this, simply return the arc-cosine of the currently computed slope. Also, there should be a **czm_materialInput.aspect** parameter supplied to the shader that is also in radians. Zero radians should mean _East_, pi/2 radians should mean _North_, pi radians should mean _West_, and 3pi/2 radians should mean _South_.

I have forked the cesium repo and am trying to get a pull-request together for this new feature. The math is not hard given the needed inputs for the calculation. The challenge is getting those inputs.

Can anyone concur that this is a good idea? I really need aspect along with slope in a Cesium-based project I am currently working on.

Contributor guide

Open the contributing guide

Research direction

Start by locating where czm_materialInput.slope is computed and where shader material inputs are supplied; the issue names no file or test. Compare the existing slope inputs with the requested radians and define the aspect calculation using the stated East/North/West/South convention. Done means shaders receive both slope and aspect in the requested units.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
computer-graphics
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.