Shadow mapping for point lights demo

Humus

Crazy coder
Veteran
I've uploaded a new demo to my site. It's a demo of shadowmapping for point lights, something conventional shadow mapping can't do.
The idea is quite simple, instead of rendering the depth into a texture as with normal shadow mapping I render the radial distance into a cubemap. The radial distance is easy to look up in a 3d texture. A check with the stored distance and the currently calculated distance is done in a fragment shader and can easily interact with perpixel lighting. The final result is a very realistic shadow effect.

Should run on Radeon 8500/9700.

http://humus2.campus.luth.se/~humus/
 
How about good ol' GF3:s, are we left out in the dark here? :)

They do support both 3D textures and cubemaps, so it should work, right?


*G*
 
Yeah, it should be possible to do on GF3. It's just that I don't have the hardware to test on, plus that I'm no fan of the register combiners interface. I'll look into it today though.
 
Humus said:
Oki, I've uploaded a new version which might work on GF3 if we're very lucky :)

How could it run on a GF3 if it still requires an ATi extention? (Trying to run it on my Ti4600, haven't tried it on my 8500 yet.)
 
Oops! :)

Forgot to fix the extension detection code, fixed that now though. Try again ... :p
 
humus, just a suggestion. casting shadows of a cube is fairly simple. does this technique works good with more complicated bodies? could we see the same demo with a coathanger or a statue, for example?
 
it complains about WGL_ARB_render_texture on my Ti4600
it detects the other ones properly though

any ideas?
 
quattro said:
humus, just a suggestion. casting shadows of a cube is fairly simple. does this technique works good with more complicated bodies? could we see the same demo with a coathanger or a statue, for example?

Mmm, I think the problem is not in the technique, but rather in lack of precision. Currently I have 8bits to play with, so doing more complex scenes may give artefacts. Not sure how soon the problem will occure though. I'll play around more with the technique though.
 
Ante P said:
it complains about WGL_ARB_render_texture on my Ti4600
it detects the other ones properly though

any ideas?

Hmm ... update drivers maybe? It should be supported on GF3/4.
 
Oki, got some help of MZ from opengl.org ... should work on GF3 now, although performance seams low.
 
WGL_ARB_render_texture is supported from Geforce up (maybe TNT)and it is in drivers for almost a year now. glGetString(GL_EXTENSIONS) doesnt return all WGL extensions, you must use wglGetExtensionsARB for those.
 
Yeah, I know that. The problem was that initialising the wglGetExtensionsARB didn't work. Fore some odd reason the spec states that I shouldn't check the extension string for this extension, I should rather just call wglGetProcAddress and check if it returns NULL. Why is completely beyond me though. I've fixed that now though. Can anyone verify now that it works for GF3/4?
 
Back
Top