-
Notifications
You must be signed in to change notification settings - Fork 5
/
contours.yaml
28 lines (27 loc) · 1011 Bytes
/
contours.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
import:
- ../block.yaml
- normal.yaml
- ../functions/aastep.yaml
styles:
elevation-contours:
base: polygons
mix: [block, elevation-normal, functions-aastep]
lighting: false
raster: custom
animated: true
blend: add
shaders:
defines:
CONTOURS_COLOR: color.rgb
CONTOURS_ALPHA: color.a
CONTOURS_BACKGROUND_COLOR: vec3(0.0)
CONTOURS_BACKGROUND_ALPHA: 1.0
CONTOURS_SCALE: 60.
CONTOURS_SPEED: -0.1
CONTOURS_OFFSET: u_time*CONTOURS_SPEED
blocks:
color: |
color = mix(vec4(CONTOURS_BACKGROUND_COLOR,CONTOURS_BACKGROUND_ALPHA),
vec4(CONTOURS_COLOR,CONTOURS_ALPHA),
aastep( dot(normal, vec3(0.,0.,1.)),
abs(sin((normal_elv_raster.a*PI)*CONTOURS_SCALE+CONTOURS_OFFSET)) ) );