"For too long, many nations, including my own, tolerated, even excused, oppression in the Middle East in the name of stability. Oppression became common, but stability never arrived. We must take a different approach. We must help the reformers of the Middle East as they work for freedom, and strive to build a community of peaceful, democratic nations."
- George W. Bush
More pages: 1 2 3 4 5
API overriding tools
Tuesday, July 5, 2005 | Permalink

Today I'm adding two API overriding tools to the Cool stuff section, one for OpenGL and one for Direct3D. The main purpose of these is to solve the problem with alpha-tested textures in games, which look very aliased with multisample antialiasing. With these tools you can force alpha-test into alpha-to-coverage, which looks a whole lot better.

Caution: Be careful with online games using PunkBuster or other anti-cheat measures. They don't neccesarily like overriding the API and may think you're cheating, so if you're going to try, I wouldn't try on my favourite server first.

If there are any other features you'd like to see added to these tools, please let me know.

Name

Comment

Enter the code below



Humus
Sunday, July 31, 2005

HL2 doesn't use mipmapping on their alpha-tested textures. I tried implementing some automatic mipmap generation, but it turned out to require quite a bit of management under the hood to work nicely so I dropped the idea.

As for black squares, it sounds like the multisampling didn't work. Note that the ForceMMSAMode option only overrides the ChoosePixelFormat() functionality, so if the games doesn't use the returned pixel format for some reason it's not going to work. The ForcePixelFormat option on the other hand overrides the SetPixelFormat() functionality, so it's always going to work. Try using that instead.

tEd
Sunday, July 31, 2005

..and how do i know which pixelformat i need. There are alot of them and tried 1 or 2 but i only get a flickering screen

tEd
Sunday, July 31, 2005

Here screenshot how it looks like

http://www.gaeugf.ch/ted/mohaa.jpg

Humus
Monday, August 1, 2005

You can use glview to list pixel formats. Select one with DBuf = 1, Multisample = 6 (for instance), Acc Buff = 0, ColorBits = 32. On my X850 the pixel format 15 is what I use, but it may be different on your machine depending on card and driver.

tEd
Monday, August 1, 2005

pixelformat 15/16 works but i get some of the see through dithering artefacts i also get in serious sam second entcounter

tEd
Monday, August 1, 2005

screenshot forced pixelformat 16/ MSAA 6x

http://www.gaeugf.ch/ted/mohaa1.jpg

Bj�rn
Wednesday, August 3, 2005

That would be great Humus! =)

Anyhow, I'll try out the patch for HL2 again. see if I can see anything.

But, one question, is there any difference in the x64 driver from the x86 driver? I know that it's meant for different systems, but I mean "things" in the driver. Features. =)

BJ�rn
Wednesday, August 3, 2005

HL2 refuses to start if I put the D3D anywhere around the exe's of the game...
Probably 'caus I got x64?

Take care =)

More pages: 1 2 3 4 5