Move shaders into glsl and hlsl directories

Move `data/shaders` to `data/shaders/glsl`
Move `data/hlsl` to `data/shaders/hlsl`

Fix up shader paths in the cpp files to point to the new glsl location.

`data/shaders/hlsl/compile.py` still overwrites the glsl .spv files (for
now).

Issue: #723
This commit is contained in:
Ben Clayton 2020-05-29 16:08:53 +01:00
parent cac1d2e850
commit ca884587a4
1043 changed files with 1207 additions and 1201 deletions

View file

@ -1,52 +0,0 @@
// Copyright 2020 Google LLC
struct VSOutput
{
float4 Pos : SV_POSITION;
[[vk::location(0)]] float3 Normal : NORMAL0;
[[vk::location(1)]] float3 Color : COLOR0;
[[vk::location(2)]] float3 ViewVec : TEXCOORD1;
[[vk::location(3)]] float3 LightVec : TEXCOORD2;
};
struct HSOutput
{
float4 Pos : SV_POSITION;
[[vk::location(0)]] float3 Normal : NORMAL0;
[[vk::location(1)]] float3 Color : COLOR0;
[[vk::location(2)]] float3 ViewVec : TEXCOORD1;
[[vk::location(3)]] float3 LightVec : TEXCOORD2;
};
struct ConstantsHSOutput
{
float TessLevelOuter[3] : SV_TessFactor;
float TessLevelInner : SV_InsideTessFactor;
};
ConstantsHSOutput ConstantsHS(InputPatch<VSOutput, 3> patch, uint InvocationID : SV_PrimitiveID)
{
ConstantsHSOutput output = (ConstantsHSOutput)0;
output.TessLevelInner = 2.0;
output.TessLevelOuter[0] = 1.0;
output.TessLevelOuter[1] = 1.0;
output.TessLevelOuter[2] = 1.0;
return output;
}
[domain("tri")]
[partitioning("integer")]
[outputtopology("triangle_ccw")]
[outputcontrolpoints(3)]
[patchconstantfunc("ConstantsHS")]
[maxtessfactor(20.0f)]
HSOutput main(InputPatch<VSOutput, 3> patch, uint InvocationID : SV_OutputControlPointID)
{
HSOutput output = (HSOutput)0;
output.Pos = patch[InvocationID].Pos;
output.Normal = patch[InvocationID].Normal;
output.Color = patch[InvocationID].Color;
output.ViewVec = patch[InvocationID].ViewVec;
output.LightVec = patch[InvocationID].LightVec;
return output;
}