blob: 6a6dc1b1c196d32b79c7d8987bfd6c0b47cae69f (
plain)
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
|
// pipeline-simple.slang.h
// TODO(tfoley): strip this down to a minimal pipeline
pipeline StandardPipeline
{
[Pinned]
input world MeshVertex;
world CoarseVertex;// : "glsl(vertex:projCoord)" using projCoord export standardExport;
world Fragment;// : "glsl" export fragmentExport;
require @CoarseVertex vec4 projCoord;
[VertexInput]
extern @CoarseVertex MeshVertex vertAttribIn;
import(MeshVertex->CoarseVertex) vertexImport()
{
return project(vertAttribIn);
}
extern @Fragment CoarseVertex CoarseVertexIn;
import(CoarseVertex->Fragment) standardImport()
// TODO(tfoley): this trait doesn't seem to be implemented on `vec3`
// require trait IsTriviallyPassable(CoarseVertex)
{
return project(CoarseVertexIn);
}
stage vs : VertexShader
{
World: CoarseVertex;
Position: projCoord;
}
stage fs : FragmentShader
{
World: Fragment;
}
}
|