0
\$\begingroup\$

I want to have both Point Lights, aswell as Spot Lights. For the Point Lights I have a TextureCubeArray and for the Spot Lights I have a Texture2DArray. Is it possible to combine these two into a single Texture2DArray and treat the Point Light Shadow Maps as Cubemaps, and treat the SpotLight shadow maps as single textures?
I would like to bind only one array instead of multiple ones.

\$\endgroup\$
  • \$\begingroup\$ Your code for reading a value from each of these texture types will be different, so I don't see a benefit of storing them interleaved in a single array, when instead you could have one array for one code path, and a second array for the other code path. \$\endgroup\$ – DMGregory Aug 27 at 11:32
0
\$\begingroup\$

Use atlas for shadowmapss and combine cubemaps manually in shader. Also, this approach will allow to use variable shadow map resolution for close and distant lights.

| improve this answer | |
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.