| 1 |
#include "_included.glsl" |
| 2 |
|
| 3 |
#[modes] |
| 4 |
|
| 5 |
mode_ninepatch = #define USE_NINEPATCH |
| 6 |
/* clang-format off */ |
| 7 |
#[specializations] |
| 8 |
|
| 9 |
DISABLE_LIGHTING = false |
| 10 |
|
| 11 |
#[vertex] |
| 12 |
|
| 13 |
precision highp float; |
| 14 |
precision highp int; |
| 15 |
/* clang-format on */ |
| 16 |
layout(location = 0) in highp vec3 vertex; |
| 17 |
|
| 18 |
out highp vec4 position_interp; |
| 19 |
|
| 20 |
void main() { |
| 21 |
position_interp = vec4(vertex.x, 1, 0, 1); |
| 22 |
} |
| 23 |
|
| 24 |
#[fragment] |
| 25 |
|
| 26 |
precision highp float; |
| 27 |
precision highp int; |
| 28 |
|
| 29 |
in highp vec4 position_interp; |
| 30 |
|
| 31 |
void main() { |
| 32 |
highp float depth = ((position_interp.z / position_interp.w) + 1.0); |
| 33 |
frag_color = vec4(depth); |
| 34 |
} |