blob: 2467013ac3f7cae1921d824217a410cebb4323eb (
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
|
//DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK):-target spirv
struct Light
{
float3 position;
float radius;
float3 color;
float intensity;
};
[vk::binding(0, 0)]
StructuredBuffer<Light> globalLightList;
struct Lighting
{
//CHECK: ([[# @LINE+1]]): error 20102
float3 DoLighting(Light light);
{
// Not emitted
return float3(1.0, 1.0, 1.0);
}
};
[shader("fragment")]
float4 fragment(float4 color: COLOR0)
{
float4 albedo = color;
if (albedo.a < 0.025)
discard;
Lighting light = Lighting();
albedo.xyz = light.DoLighting(globalLightList[0]);
return albedo;
}
|