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
struct Uniforms {
float4x4 mvp;
};
cbuffer uniforms_CB : register(b0, space0) {
Uniforms uniforms;
};
struct VertexInput {
float3 position : TEXCOORD0;
float2 uv : TEXCOORD1;
};
struct Interpolated {
float4 position : SV_Position;
float2 uv : TEXCOORD0;
float3 normal : TEXCOORD1;
};
struct FragmentOutput {
float4 color : SV_Target0;
};
Interpolated vs_main(VertexInput input) {
Interpolated __luma_output;
float4 clip_pos = mul(uniforms.mvp, float4(input.position, 1.0));
__luma_output.position = clip_pos;
__luma_output.uv = input.uv;
__luma_output.normal = float3(0.0, 1.0, 0.0);
return __luma_output;
}
FragmentOutput fs_main(Interpolated input) {
FragmentOutput __luma_output;
__luma_output.color = float4(input.uv, 0.0, 1.0);
return __luma_output;
}