Hey Aras, I need to show the Unity _ShadowmapTexture on a texture. It works for a ATI GPU , but not Nvidia. Any idea?

Depends on how you sample it , what platform etc. I'd find it unlikely that it would be GPU-dependent; my guess is that you're perhaps using it in an "undefined" way.

The built-in shadowmap texture is valid only for the duration that "shadows are rendered at", so e.g. sampling it outside of deferred lighting pass, or outside of forward rendering pass that applies lighting (ForwardBase/ForwardAdd) is likely undefined - it can get that texture, or some other texture, or nothing at all.

Also, depending on the platform, depends on how you want to sample it. E.g. on DX9, you can't sample raw depth value from a shadowmap at all; it can only do depth comparison.

View more

About Aras Pranckevičius:

Graphics programmer and code plumber at Unity

Kaunas, Lithuania

#graphics #programming