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

Shadowmapping DX11 - shadowmap return white texture in subresource

$
0
0

Hello,

I've tried to implement shadowmapping technique but I am failing to get correct values from shadowmap texture to compare it with current (.z / .w) value.

Here is how I am initializing my shadowmap texture:

Shadowmap texture initialization - using R24_UNORM_X8_TYPELESS

Here is the result:

Rendered shadowmap to texture from sun POV

Here is UVs from top of view:

UVs of rendered scenes. These UVs are used to sample shadowmap texture

And here is rendered scene with shader code below:

Rendered scene with shader code below
float4 ShadowCalculation(float3 normal, float4 lightPos, float3 pointToLight)
{
    const float bias = 0.001f;
    float2 …

Viewing all articles
Browse latest Browse all 17625

Trending Articles



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