Quantcast
Channel: GameDev.net
Viewing all articles
Browse latest Browse all 17560

weird shadow artifact Directx 11 shadow mapping

$
0
0

currently i am trying to do shadow mapping. i am rendering to a texture the depth data of the scene and then in shadow shader i am using it but as you can see the image i am not getting currect shadows actually no shadows at all… i cant seem to pinpoint the exact problem … what could be this???

depth shader

float4 main(PixelInputType input) : SV_TARGET
{
	float depthValue;
	float4 color;
	
    depthValue = (input.depthPosition.z / input.depthPosition.w );
		
	color = float4(depthValue, depthValue, depthValue, 1.0f);

	return color;
} 

shadow shader

float4 main(PixelInputType input) : SV_TARGET
{
	float2 projectTexCoord;
	float3 lightDir;
	float lightIntensity;
	float4 …

Viewing all articles
Browse latest Browse all 17560

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>