-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Apply fog in fragment shader in terrain_raster program (#12423)
* Add render test for fog with terrain and zero exaggeration * Return early in elevation function when zero exaggeration is used * Calculate fog opacity in terrain raster fragment shader when zero exaggeration is used
- Loading branch information
Showing
6 changed files
with
75 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+53.7 KB
test/integration/render-tests/fog/terrain/zero-exaggeration/expected.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
59 changes: 59 additions & 0 deletions
59
test/integration/render-tests/fog/terrain/zero-exaggeration/style.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
{ | ||
"version": 8, | ||
"metadata": { | ||
"test": { | ||
"height": 256, | ||
"width": 256 | ||
} | ||
}, | ||
"center": [-113.32296, 35.94662], | ||
"zoom": 5.5, | ||
"pitch": 80.0, | ||
"bearing": 64.5, | ||
"terrain": { | ||
"source": "rgbterrain", | ||
"exaggeration": 0.0 | ||
}, | ||
"fog": { | ||
"range": [-0.2, 0.5], | ||
"color": "white", | ||
"horizon-blend": 0.15 | ||
}, | ||
"sources": { | ||
"rgbterrain": { | ||
"type": "raster-dem", | ||
"tiles": [ | ||
"local://tiles/{z}-{x}-{y}.terrain.png" | ||
], | ||
"maxzoom": 12, | ||
"tileSize": 256 | ||
}, | ||
"satellite": { | ||
"type": "raster", | ||
"tiles": [ | ||
"local://tiles/{z}-{x}-{y}.satellite.png" | ||
], | ||
"maxzoom": 17, | ||
"tileSize": 256 | ||
} | ||
}, | ||
"layers": [ | ||
{ | ||
"id": "sky", | ||
"type": "sky", | ||
"paint": { | ||
"sky-type": "atmosphere", | ||
"sky-atmosphere-sun": [0, 0], | ||
"sky-atmosphere-sun-intensity": 15 | ||
} | ||
}, | ||
{ | ||
"id": "raster", | ||
"type": "raster", | ||
"source": "satellite", | ||
"paint": { | ||
"raster-fade-duration": 0 | ||
} | ||
} | ||
] | ||
} |