yum-mirror/slang

Making it easier to work with shaders

git clone https://git.yummers.dev/yum-mirror/slang

skallweitNVRefactor shader cache (#2558)c2dc1a86e

master
411 B24 linesraw
1// shader-cache-graphics-fragment.slang
2
3// Output of the vertex shader, and input to the fragment shader.
4struct CoarseVertex
5{
6    float3 color;
7};
8
9// Output of the fragment shader
10struct Fragment
11{
12    float4 color;
13};
14
15// Fragment Shader
16
17[shader("fragment")]
18float4 main(
19    CoarseVertex coarseVertex : CoarseVertex) : SV_Target
20{
21    float3 color = coarseVertex.color;
22
23    return float4(color, 1.0);
24}