Hello. If anyone's wondering what I've been up to lately, I've been developing 3D engine. So far, the engine has lots of cool features like animation, automatic texture streaming/unloading, high dynamic range rendering, deferred lighting and more. The engine is targeted at OGL 2.x hardware (surprised? ^^).

When developing the engine I encountered a few problems. For example, I encountered a bug (hmm, more like a gap in the OpenGL specifications) in the AMD drivers when using packed depth-stencil textures for a deferred lighting optimization which I had to work around to not get visual artifacts all over the screen on some GPUs. Now it turns out that the game crashes during shader compilation on OGL 2 hardware. Sadly, I don't have any OGL 2 GPUs around to test it. My old Geforce GTX 7900 gave up a few months ago.

I am currently trying to solve the shader compilation crash which seems to be caused by my skeleton animation shader. If someone has access to one of the following GPUs and can chat with me over Skype while testing, I'd be really grateful. Cards that should fulfill the minimum requirements are:

did you test it with AMDs ShaderAnalyzer.A tool which can compile a shader as if compiled on any of AMD GPUs, it also gives hints if the shader is alu, texture fetch ... bound

Thanks for the link! It seems like a very useful tool! Sadly it doesn't support anything older than the HD2000 series, which is what I'm most interested in testing on. I tried to compile the problematic shader but it immediately threw an error saying that the shader uses too many uniforms. Weird since it's been running fine on a HD4870... On the positive side, it seems like the limit it's enforcing (1024 components) seems to be exactly the limit of the older cards, so it might be possible to use the program to fix the shader.

I got lucky and managed to get in touch with someone who just by chance happened to have an old Nvidia Geforce 7600GS lying around so I've had my chance to try to get it working there, and it's at least going forward. I've also had it tested on a super old so far unnamed Radeon GPU but it's more fond of crashing and showing funny magenta pixels than actually running the engine at the moment. Still no Sandy Bridge GPU to test on but I suspect it won't be a problem since they support OGL 3 after all.

What I've been neglecting a bit is Macs. davedes was kind enough to offer to test it on his Mac, but it turns out he has an outdated version which won't let him run Java 7 which the game uses. If you have a Mac computer with a not-brand-new graphics card (8000-9000 series or 200 series), it'd be really nice if you could test the engine out. PM me for a download link.

Rant about old hardware:

So we fire up the engine on the 7600GS and get an instant VM crash on startup in glGenerateFramebuffers(). It was obvious the driver was just spitting us in the face, so after a driver update it actually started! The UI renders, everything else is black! Turn off all special effects... Okay, it's still black but at least I can see the rim lighting on objects, which means something in my super merge shader is going wrong...

Fog and outlineStrength are fine since it's not completely black. rimLight is also working and glow is off, meaning that either ambientColor, ssao or diffuseColor is always 0. ambientColor definitely isn't 0 since it's a uniform variable and diffuseColor is just a simple texture read using GL11 functionality, leaving us with our main suspect: ssao.

Since SSAO (it's a lighting effect that darkens the ambient light in narrow places like under a car) is disabled I'm using a white dummy 4x4 for the SSAO reading instead. Basically, I allocated the texture and glClear()ed it each frame to ensure it was white. Apparently glClear() wasn't working, probably since I wasn't actually rendering anything to it. Simply setting it to white permanently using glTexImage2D() worked though.

So I basically dissected the whole engine just to realize that clearing a texture to a color doesn't actually set it to that color on old hardware. It probably just marks it invalid or something and does the clear later when you start rendering to it. Don't you just love old hardware?

java-gaming.org is not responsible for the content posted by its members, including references to external websites,
and other references that may or may not have a relation with our primarily
gaming and game production oriented community.
inquiries and complaints can be sent via email to the info‑account of the
company managing the website of java‑gaming.org