Add slang shader for shadow mapping and shadow mapping cascades sample

This commit is contained in:
Sascha Willems 2025-04-28 21:03:37 +02:00
parent 126231756a
commit 153aa3b932
7 changed files with 436 additions and 8 deletions

View file

@ -0,0 +1,23 @@
/* Copyright (c) 2025, Sascha Willems
*
* SPDX-License-Identifier: MIT
*
*/
struct UBO
{
float4x4 depthMVP;
};
ConstantBuffer<UBO> ubo;
[shader("vertex")]
float4 vertexMain(float3 Pos) : SV_POSITION
{
return mul(ubo.depthMVP, float4(Pos, 1.0));
}
[shader("fragment")]
float4 fragmentMain()
{
return float4(1.0, 0.0, 0.0, 1.0);
}