I spent some time hacking on Doom 3 adding support for EGL and OpenGL ES2.0; obviously there is still a significant amount of work to be completed before this looks even remotely like the game. Some of you might make out the text console in this image, rendered with the incorrect shader. :-) Phoronix, go nuts... :-)
(Updated again 2012-05-07: Doom 3 is nothing without stencil shadow volumes!)
(Updated 2012-05-07: I discovered and fixed a little bug in the modelViewProjection matrix...)
Showing posts with label Bug. Show all posts
Showing posts with label Bug. Show all posts
Saturday, April 28, 2012
Sunday, April 22, 2012
Doom 3 GLSL
I recently implemented a GLSL renderer backend for Doom 3. Yes, there are already a couple of backends existing (e.g. raynorpat's) unfortunately these did not run successfully on my hardware and had serious rendering and pixel errors.
These images are from the first implementation of my backend, where I had accidentally called normalize() on a vector which was almost normalized. The result is pixel-imperfection when compared to the standard ARB2 backend, and the cost of pointless normalization in the fragment shader.
You can also see the importance of running a comparison or image-diff program when implementing a new backend. Can you see the differences between the first two images immediately, with the naked eye? I couldn't.

Finally, here is the backend running the hellhole level. The black regions are areas that would be rendered by the (currently unimplemented in GLSL) heatHaze shader. Not bad for an i965 GPU.
Just for the laughs, here is what happens when Doom 3 decides to try LSD; or fails to pass initialized texture coordinates from the vertex program to the fragment program in the ARB2 backend.
These images are from the first implementation of my backend, where I had accidentally called normalize() on a vector which was almost normalized. The result is pixel-imperfection when compared to the standard ARB2 backend, and the cost of pointless normalization in the fragment shader.
You can also see the importance of running a comparison or image-diff program when implementing a new backend. Can you see the differences between the first two images immediately, with the naked eye? I couldn't.

Finally, here is the backend running the hellhole level. The black regions are areas that would be rendered by the (currently unimplemented in GLSL) heatHaze shader. Not bad for an i965 GPU.
Just for the laughs, here is what happens when Doom 3 decides to try LSD; or fails to pass initialized texture coordinates from the vertex program to the fragment program in the ARB2 backend.
Labels:
Bug,
Development,
Doom 3,
GLSL,
OpenGL
Monday, December 21, 2009
Static analysis For The Win!

I caught on about clang, which is both a compiler and static analyzer, after it was mentioned on the xorg-devel list. Since then I've been running it on my own code and gradually fixing up errors.
Now, usually such tools are less than impressive (excluding extremely expensive proprietary tools such as Coverity.) However, clang has been really useful in eliminating a lot of dead code, unused variables (and the overhead of calling expensive functions to calculate those variables.)
I even discovered one major bug in the expression evaluator in my game engine which had gone overlooked for some time, which would result in two opcodes giving incorrect results and ultimately effecting the rendering of the shaders.
Clang is currently lacking Inter-Procedural Analysis but it seems like it's on the to-do shortlist, which will be a very nice feature. Hopefully it won't be long before Coverity's eating it's heart out.
Sunday, December 20, 2009
Building a better flashlight...

I started looking into the projective light issues in XreaL and my forked engine again. It turned out the problem was setting up the light rotation via both the quaternion and light projection vectors.
The flashlight was working, but would point in the opposite direction you were looking. Right was left and left was right. Of course, it seems simple in hindsight, but these kind of bugs always annoy me until I find out what was going wrong.
Boring screenshot included for the fun of it...
Saturday, December 19, 2009
New city, new job, new blog...
I decided to start blogging again, now that I've somewhat settled down in Helsinki, and hopefully I'll be able to keep some regularity in the postings this time. Picture is from Snellmaninkatu, near my apartment at about 14:00 yesterday.It's been an interesting year; moving to Finland, working for Nokia, speaking at this years X Developers Conference and Maemo Summit.
Maemo Summit was arguably the most interesting since I was giving a demo of an early version of Quake 3 running on the N900 (also another video.) The whole thing started from a weekend project after chatting to Phil Carmody, who wrote the touchscreen and accelerometer kernel drivers. Actually it ended up turning into a several weekend project, but I digress; funny what happens when engineers get bored after work...
Currently I'm working on fixing two XreaL bugs with projected lights; I did a quick patch for the first issue but the second one is being more troublesome; Robert will probably get that before I do, and when it's 05:30 in the morning, maybe it's time to call it quits for the day.
Although, tomorrow might see the N900 getting more of a workout than Quake 3...
Labels:
Bug,
Helsinki,
Maemo Summit,
Maesum,
N900,
Nokia,
Patch,
Quake 3,
Snellmaninkatu,
Winter,
X Developers Conference,
Xorg,
XreaL
Subscribe to:
Posts (Atom)



