blob: 261b581eae4c0708e98f4a969c3e0e90b6a51d6e (
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
42
|
// 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;
}
}
|