Personally, I’ve never even really looked at DPSM. Seems to me you’d be far better off looking into shadow cube-maps using the G80 and the upcoming R600. This new technology is insane; it’s here to stay; it’s much easier to use; it’s probably going to look better; and it requires no subdivision of your world geometry for reasonable results.
Check out the texture_array extension and the *_shader4 flavors as well.
ok as i got no further replies i tried to implement shadow cubemaps. so far i’ve managed to render the six views next to each other into one 3072x2048 texture. i’m not sure how to get them into a cubemap, however. can i have shadow cubemaps on a gf7 at all?
ah crap… so what can i do? use a regular color cubemap and do the depth compararison myself in the fragment shader? i’ll lose filtering on nv cards then, right?
Cubemaps are ugly on GPUs that didn’t support them (6 renderpasses per lighsource).
Look at my project http://sourceforge.net/project/screenshots.php?group_id=186618
The shadow gear is an included example. It shouldn’t be a problem to translate the scriptcode to another language…
your code looks a little similar to mine
yeah i guess we both have the code from the tutorial at delphigl.com however, it seems to work fine in your example, but not for me. i’m quite sure that i’m not reading the shadow map correctly in my fragment shader. you’re doing it for eight lights at the same time which is even more confusing. maybe we could pm or chat on icq, i’d greatly appreciate that you seem to be the only one here who supports dpsm anyway.
ok as almost everyone told me that i should use cube maps instead of dual-paraboloid maps, i gave that a try; as you can see there are (at least) two issues left:
there are artifacts in the corners (probably caused by too little precision? i’m using 16bit floating point textures already, though)
the shadows are not consistent at the borders of the cube maps (see klesk’s feet)
i can solve #2 by reducing the projection’s angle from 90° to 85°, but then i get worse artifacts; or i can increase the depth offset (when rendering the shadow maps) a bit, this gets rid of the artifacts but then the inconsistence at the border gets worse.
u will have issues at the border, (with GL_LINEAR) due to cubemaps not sampling from adjacent faces
but no way should they be as bad as what youre seeing.
it looks like youre creating the side + bottom SMs from different positions
for cubemaps, the projection matrix must be 90 degree FOV and 1.0 aspect ratio. i just use:
gluPerspective(90, 1.0, zNear, zFar)
btw… i have experimented a lot with DPSM and i didn’t like them. tessellating a large map takes forever(!), especially as you really have to subdivide a lot. DPSM demos have small maps and don’t tessellate quite as much as is really needed to avoid artifacts. the massive number of vertices makes it very vertex-limited.
also, i needed a 1024x1024 sized DPSM to match the shadow-edge quality of a 512 sized cube shadow map. that is 4 MB compared to 6 MB. not very much of a savings considering the massive number of vertices needed.
the only benefit for DPSM is larger batches, and the ability to use depth-textures.
if you really want, i can see if i still have any of my fragment-program code to sample a DPSM from a 3-component direction vector. maybe DPSM will work better for you?