Parallax bump mapping & infinite shadow volumes

Started by
15 comments, last by GameDev.net 19 years, 5 months ago
I finally got my parallax bump mapping w/ infinite shadow volumes demo working. I gave up on it a while ago because it appeared that there was a bug in the last set of nVidia drivers when writing gl_FragDepth using GlSlang. Whether it was a real bug or not I don't know, but I tried again with the newest drivers and (after a bit of tweaking) got it to work: And here's a zip containing the executable, data and sourcecode. Enigma
Advertisement
After grabbing a copy of glut32.dll (ver 3.7.6) I ran your GlSlang.exe but the program crashed.

The rendering window came up, was black, and it crashed in nvoglnt.dll

Windows XP Pro
Official Nvidia 66.93 Drivers
6800GT
Hmm. Interesting. I have three possibilities as to why that might be:
  1. Glut version mismatch - I can't remember which version I used. It should be the same.

  2. My lazy assumption that the uniforms would be in the same place for each shader.

  3. A bug in my extension loading code.

I've added the copy of glut32.dll to the zip and I've uploaded a version with some debug output. Would you mind running that and posting the contents of log.txt if it still crashes.

Thanks,

Enigma
Log File:

Entered main
Initialising Shaders
Loading Textures
Building Torus
Building Cube
Entering Main Loop
Clearing Buffers
Rendering Light
Rendering Unlit Background
Rendering Torus
Torus Rendered
Rendering Cube
Cube Rendered
Rendering Shadow Volumes
Rendering Torus Shadow
Torus Shadow Rendered
Rendering Lit Objects
Rendering Torus
Torus Rendered
Rendering Cube
Cube Rendered
Rendering Complete
Clearing Buffers
Rendering Light
Rendering Unlit Background
Rendering Torus
Torus Rendered
Rendering Cube
Cube Rendered
Rendering Shadow Volumes
Rendering Torus Shadow
Torus Shadow Rendered
Rendering Lit Objects
Rendering Torus
Torus Rendered
Rendering Cube
Cube Rendered
Rendering Complete
How very odd. It manages two complete loops of the rendering, so it can't be a problem with my extension loading code. I realised I had introduced a new bug with that debug version when I tried to fix the setting up of the uniforms, which is now fixed, but I don't see that being the problem. I hate remote debugging!

Enigma
Well, scatter n/0 prints to your log file inside your debug code and give me a link for that. I can run it and even email you a zipped file of the output (might be large). That may help.

Would be nice if I could compile/run it here but at the moment I just upgraded and have not yet installed much software. (I'm kind of busy these days.) Never used glut before either.

I'll watch this thread for a bit in case you want me to try something further.
OK. I've uploaded just the executable so you don't have to download all the data again as well. Many thanks for your help with this. I suspect the problem is going to turn out to be something I'm doing wrong with or in the vertex/fragment programs.

Just out of curiosity, has anybody else successfully run this or tried to run it and had it crash?

Enigma
Email with log output sent to your address in your profile
Thanks for that. It crashed exactly where I was predicting it would from the previous output - my glutSwapBuffers call. Unfortunately this means I've either clobbered the heap or completely confused the OpenGL drivers somehow.

I've uploaded another version (same link as last time) with the shaders disabled. Would you mind giving that a go?

Enigma
Ok. Uniformly lit grey rect with a lit, rotating torus inside it - lit just like your pic except the whole image is b/w without shadows.

Btw: If I change focus to another window - it crashes too. I can shut it down properly if I don't change focus from that window.

This topic is closed to new replies.

Advertisement