Quantcast
Channel: Community | MonoGame - Latest topics
Viewing all articles
Browse latest Browse all 6821

Problem with cascade shadow maps

$
0
0

@StainlessTobii wrote:

I am just adding cascade shadow maps to my engine and run into a problem.

I started with a simple test application that just rendered a single mesh, and it worked fine.

So I copied the code into my engine , and now it doesn't work at all.

I have checked everything I can think of. I know the shadow map is rendering correctly.

I know all the values are set correctly, but everything is black. Not shadowed as it should be, black.

I have tracked the problem down to a single line of code.

return ShadowMap.SampleCmpLevelZero(ShadowSampler, float3(shadowPos.xy, cascadeIdx), lightDepth);

Which is always returning 0

Has anyone come across any issues with this?

It is in a shader include file which works fine in the test app, but the test app is a much simpler shader. Just shadowed, textured mesh with diffuse lighting.

I am trying to add it to my ocean shader which is much more complex.

I am worried it is a shader compiler issue.

Ideas please guys, pretty stuck at the moment.

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 6821

Trending Articles