This commit is contained in:
2025-01-14 02:26:26 +01:00
parent 0d556f12b4
commit 9805c7a2c1
26 changed files with 4868 additions and 4 deletions

View File

@@ -0,0 +1,2 @@
# Blender 4.3.2 MTL File: 'None'
# www.blender.org

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,40 @@
float4x4 gLightWorldViewProj : WorldViewProjection;
float4x4 gWorldViewProj: WorldViewProjection; //For compatibility sake
Texture2D gShadowMap : register(t0); // Shadow map texture
SamplerState gShadowMapSampler : register(s0); // Shadow map sampler
struct VS_Input
{
float3 Position : POSITION;
};
struct VS_Output
{
float4 Position : SV_POSITION;
};
VS_Output VS_Shadow(VS_Input input)
{
VS_Output output;
// Transform vertex position to light's clip space
output.Position = mul(float4(input.Position, 1.0f), gLightWorldViewProj);
return output;
}
float4 PS_Shadow(VS_Output input) : SV_TARGET
{
// Output depth information (Z/W in clip space)
return float4(input.Position.z / input.Position.w, 0.0f, 0.0f, 1.0f);
}
// Technique for rendering shadow map
technique11 DefaultTechnique
{
pass P0
{
SetVertexShader(CompileShader(vs_5_0, VS_Shadow()));
SetPixelShader(CompileShader(ps_5_0, PS_Shadow()));
}
}