blob: f53a937430723dad61d11c97b59b3d410ca43362 (
plain) (
blame)
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
35
36
37
38
39
40
41
42
43
|
#ifdef DESC
[program]
type: graphics
vertex: main
fragment: main
[binding]
name: mesh
rate: vertex
[attribute]
name: position
type: vec3
[struct]
name: MVP
[variable]
name: model
type: mat4
[variable]
name: view_projection
type: mat4
[cbuffer]
name: c_mvp
type: MVP
stage: vertex
#endif
#ifdef VERTEX_SHADER
void main() {
vec4 pos = c_mvp.model * vec4(position, 1.0);
gl_Position = c_mvp.view_projection * pos;
}
#endif
#ifdef FRAGMENT_SHADER
void main() {}
#endif
|