Add slang shaders for headless samples
This commit is contained in:
parent
a442bdd683
commit
04ab171247
4 changed files with 104 additions and 9 deletions
32
shaders/slang/renderheadless/triangle.slang
Normal file
32
shaders/slang/renderheadless/triangle.slang
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
/* Copyright (c) 2025, Sascha Willems
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
struct VSInput
|
||||
{
|
||||
float3 Pos;
|
||||
float3 Color;
|
||||
};
|
||||
|
||||
struct VSOutput
|
||||
{
|
||||
float4 Pos : SV_POSITION;
|
||||
float3 Color;
|
||||
};
|
||||
|
||||
[shader("vertex")]
|
||||
VSOutput vertexMain(VSInput input, uniform float4x4 mvp)
|
||||
{
|
||||
VSOutput output;
|
||||
output.Color = input.Color;
|
||||
output.Pos = mul(mvp, float4(input.Pos.xyz, 1.0));
|
||||
return output;
|
||||
}
|
||||
|
||||
[shader("fragment")]
|
||||
float4 fragmentMain(VSOutput input)
|
||||
{
|
||||
return float4(input.Color, 1.0);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue