Jump to content
  • Advertisement
Sign in to follow this  
BeastX

Virtual Shadow Depth Cube Textures

This topic is 2470 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

For my generic forward renderer, to reduce passes, I've implemented spot and directional shadow mapping using a texture atlas that's subdivided to support several lights.

I'm using that same texture to implement VSDCTs for point lights. This looks correct except that I have edges, borders, outlines around each sampled face edge.


I've tried clamping my UVs, which shifts the shadow and just moves this "border"


I've tried increasing the shadow view's FOV beyond 90, which only has a slight effect after 130 degrees but that is excessive and destroys depth map precision.

I'd compare this to the seam issues with DPSMs, but I have several :)

Any suggestions would be greatly appreciated.

Share this post


Link to post
Share on other sites
Advertisement
For me CLAMP_TO_EDGE works pretty well
If this doesn't work you should check your shader for computation of corresponding cube face, but I think this should not be the problem because neighboring faces share same edge

Share this post


Link to post
Share on other sites
This isn't a standard cube map.

My cube faces are all on a single texture that's subdivided into an NxM grid. For each light, I render depth/shadow data to a viewport/cell on the grid instead of a unique FBO per face. This saves me FBO changes, texture units, and allows me to render multiple lights and shadows per pass.

CLAMP_TO_EDGE won't work with the subdivided texture because not all edges are on the texture's border.

Clamping UVs in the fragment shader, to not cross cell boundaries, behaves as I'd expect it to but doesn't fix the outline.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!