Virtual Shadow Depth Cube Textures

Started by
1 comment, last by BeastX 12 years, 1 month ago
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.
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
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.

This topic is closed to new replies.

Advertisement