Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- float4x4 xLightsWorldViewProjection;
- struct SMapPixelToFrame
- {
- float4 Color : SV_TARGET;
- };
- struct SMapVertexToPixel
- {
- float4 Position : SV_POSITION;
- float depth : DEPTH;
- };
- SMapVertexToPixel ShadowMapVertexShader( float4 inPos : POSITION)
- {
- SMapVertexToPixel Output = (SMapVertexToPixel)0;
- Output.Position = mul(inPos, xLightsWorldViewProjection);
- Output.depth = float4(Output.Position.z/Output.Position.w, 0, 0, 0);
- return Output;
- }
- SMapPixelToFrame ShadowMapPixelShader(SMapVertexToPixel input)
- {
- SMapPixelToFrame Output = (SMapPixelToFrame)0;
- Output.Color = input.depth;
- return Output;
- }
- technique ShadowMap
- {
- pass Pass0
- {
- VertexShader = compile vs_5_0 ShadowMapVertexShader();
- PixelShader = compile ps_5_0 ShadowMapPixelShader();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement