Original Post
Hi, All! edit: the (UPDATED and faster!) demo is here! Check it out (requires GLSL capable card) This demo has all the latest in it (including GLSL shader compilation error reporting, Parallax Occlusion Mapping, a few extra textures, square cones, a faster pre-processor that also outputs DDS files with mipmapping info [8^) edit: Here is the newest version of the video, hosted on my site. (If you can run the demo, don't bother with this...it's lower quality and slower, and a bigger download [8^) edit: (OUTDATED) Code-R has once again hosted a copy of the full demo here. Thanks!! edit: if you had the old demo already, then here is the Upgraded demo, download this as well (includes Parallax Occlusion Mapping and self-shadowing CSM!) and you will also need the new textures found here! edit: once again Code-R comes to the mirroring rescue! CSM Paper edit Feb 8, (3:20AM local): here's the alpha version of the paper documenting this method! edit Feb 8, 11:30PM: now it's the beta version...same links! edit: Monder has kindly mirrored the video here. (Thanks!!) edit: and Promit put up this one. (Thanks!!) ----------------- OK, I'm really excited because I just got a GeForce 6600 (I know, it's still not cutting edge) and can finally visit the happy land of shader developers! I am using TyphoonLabs Shader Developer with GLSL as I really am a beginner, and that seemed the easiest way to do GLSL. I am comparing my implementation against the Parallax&Bump and Relief Mapping demos that come with the app, so I'm not sure if those are the fastest implementations of their respective algorithms. I had been reading about relief mapping and steep parallax, both methods with a height-map walking type algorithm, and I came up with my own idea. It is kind of like "space leaping" or "sphere steps", but adapted to a heightmap instead of voxels. I pre-process a heightmap with a tool I wrote to get stepping and slope information, and then store height, step-info, df/dx, and df/dy (for normals w/o using the derivative operator) in the RGBA channels of an image. (can do tiled textures in x, y, both, or neither) First I approached the shader as an all-out solver (sorry, I'm a numerical-methods guy [8^). I got pretty decent performance with accurate results (between 0-15% slower than Relief Mapping, but very accurate...no hand tuning a "number_of_linear_steps" and "number_of_binary_steps"). By overrelaxing my own algorithm I could beat Relief Mapping's performance (by the same 15% margin). However that is still too slow for games, at least on my machine [8^) For performance reasons I modified the algorithm to be less of an exact solver (getting rid of all of the dynamic branching), and it just performs a fixed number of iterations (10 in the demo video). With only 1 iteration it looks very much like parallax mapping (each step is limited, so it may not go far enough, but definately will not go too far), and is a tiny bit slower. The good news is that I can do 5-10 more iterations with a minimal performance hit (runs at ~80% of parallax), and have results that look like Relief Mapping! Note 1: It is a 1MB XVID AVI, so this will eat up my available bandwidth pretty quick...anybody have some hosting capabilities they wouldn't mind sharing? Note 2: The timings may be suspicious...Shader Designer never seemed to go above 50 fps, even with just a flat shaded quad taking up approx. 100 pixels! I disabled vsync in the nVidia driver but that didn't change anything. The precompiled GLSL examples from the nVidia SDK run in the 100-300 fps range on my machine, so I'm not really sure what's going on...maybe SD has it's own compiler or automatically turns on debug info or something?? I'm now working to get this into an actual compiled demo for more serious testing. Note 3: the Relief Mapping code came with a second pass to determine self-shadowing. Since my shader doesn't do that yet, I just disabled that feature in the RM version to have it be comparable (instead of RM doing 2x the work) Note 4: if anybody is interested, I'd like to write this method up and submit it as an article here on GameDev. [Edited by - lonesock on May 11, 2006 12:26:36 PM]