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

Terrain: shader support for sampling DEM elevation from float textures #10652

Merged
merged 1 commit into from
May 7, 2021

Conversation

astojilj
Copy link
Contributor

@astojilj astojilj commented May 7, 2021

This feature is implemented in gl-native first. As TERRAIN_DEM_FLOAT_FORMAT is not defined, code here has no effect on gl-js.
Submitting here only shared shader code change.

@@ -31,6 +36,10 @@ float decodeElevation(vec4 v) {
}

float currentElevation(vec2 apos) {
#ifdef DEM_FLOAT_FORMAT
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we be consistent with the other define and name that TERRAIN_DEM_FLOAT_FORMAT? (we already have TERRAIN_DEM_NEAREST_FILTER)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At first, I didn't follow it because it is used in hillshade too, without terrain. Renamed to TERRAIN_DEM_FLOAT_FORMAT - it is terrain DEM anyway.

@astojilj astojilj force-pushed the astojilj-dem-float-shader-support branch from c2c70c2 to d176132 Compare May 7, 2021 16:17
Feature is implemented in gl-native first. Since shader code is shared, code here is
not used by gl-js (`TERRAIN_DEM_FLOAT_FORMAT` is not defined).
@astojilj astojilj force-pushed the astojilj-dem-float-shader-support branch from d176132 to 2a73031 Compare May 7, 2021 19:12
@astojilj astojilj merged commit c48f8ae into main May 7, 2021
@astojilj astojilj deleted the astojilj-dem-float-shader-support branch May 7, 2021 19:26
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

Successfully merging this pull request may close these issues.

2 participants