-
Notifications
You must be signed in to change notification settings - Fork 5
/
dash.yaml
34 lines (33 loc) · 1.25 KB
/
dash.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import:
- ../polygons/diagonal-dash.yaml
styles:
elevation-dash:
doc:
author:
name: Patricio Gonzalez Vivo
twitter: patriciogv
version: 0.0.1
tangram-version: 0.0.7
licence: MIT
description: |
Perfect for the `landuse` layer on your elevation maps, the `elevation-dash` modules use the color of the layer to draw a dash pattern that changes width based on the surface of the terrain.
base: polygons
mix: [polygons-diagonal-dash]
raster: custom
shaders:
defines:
DASH_COLOR: color.rgb*.5
DASH_BACKGROUND_COLOR: color.rgb
DASH_SCALE: 10.
DASH_SIZE: 0.9
DASH_TYPE: fill
DASH_TILE_STYLE: tile
DASH_DIR: vec3(-0.600,-0.420,0.560)
NORMAL_TEXTURE_INDEX: 0
DASH_MIN_SIZE: .8
DASH_MAX_SIZE: 1.
DASH_SIZE: shade
blocks:
normal: |
float shade = dot((sampleRaster(int(NORMAL_TEXTURE_INDEX)).rgb-.5)*2., DASH_DIR);
shade = mix(DASH_MIN_SIZE, DASH_MAX_SIZE, (shade*shade*shade)*4.);