D3DLookingGlass v0.1

May 5, 2008

Update: Like all the other Direct3D hooks on the site, this doesn’t actually work anymore. Feel free to use it for reference or kindling or whatever, but don’t expect it to have any practical use. As soon as I get ’round to bring it up to scratch I’ll put out another post. Sorry about that. [...]

5

Run-time determination of VC++ virtual member function addresses: Take II

February 6, 2008

I wrote about this tricky little problem a while ago and wasn’t too happy with the desperate methods that seemed necessary. Since then, I’ve been shown a much cleaner way to do the same thing, by manipulating the vTable manually. It seems that Microsoft haven’t changed their vTable implementation since Visual Studio 6 (at least) [...]

15

Direct3D 9 Hook v1.1

February 1, 2008

Update: Since new DLLs were pushed out a while back, this doesn’t work any longer. The function offsets are wrong, and the hook injection method is a little too flaky to be relied upon. Feel free to use this code as a basis, but I’d recommend the use of Microsoft Detours for the hook injection. [...]

33

A framework to take the tedium out of code-injection in C++

December 20, 2007

Update: I’ve left this up for posterity, but unless you have a good reason not to, you should be using Microsoft Detours for this stuff. It’s just as easy to use and far more mature. I know I’ve been banging on about injection a lot recently, but I figured a good way to pinch off [...]

12

Protecting your game against the hackers

December 3, 2007

How should I best spend my valuable time, money and man-power so as to keep those dastardly crackers at bay, and the money rolling in? There are so many commercial protection schemes out there; some cheap and some certainly not, but they all seem to be compromised… Is it really worth all that money? Or [...]

12

Run-time determination of VC++ 2005 virtual member function addresses

November 29, 2007

I was recently somewhat surprised to find that there is really no C++ way to resolve a virtual function to its address at run-time. Admittedly, there is no good reason why anybody would morally need to do this, but when you’ve already lowered yourself to patching another process’s own code without consent, it seems like [...]

1

Drawing on another Direct3D program’s viewport

November 27, 2007

Update: A new version of this exists, but since new DLLs were pushed out a while back, neither sample works any longer. The function offsets are wrong, and the hook injection method is a little too flaky to be relied upon. Feel free to use the code as a basis, but I’d recommend the use [...]

39

Case study: Fraps

November 22, 2007

One of the topics that I often find myself bluffing through on GameDev is Direct3D hooking. In particular, how to display an overlay of your own on the window of another Direct3D program, often a commercial game. It’s pretty clear that the simplest method would involve somehow hooking the call to IDirect3DDevice8/9/10::Present, but the details [...]

10

RST decomposition of a general skew-free 3D transformation

November 18, 2007

First of all, I refer you to D3DMatrixDecompose. If you want to break a standard 3D transformation matrix into its rotational, translational and scaling parts, without caring how it’s done, then look no further. If your needs are a little more specific and you’re sure you aren’t reinventing this wheel, then read on. There is [...]

0

LDR tone-mapping and how to do it properly

November 13, 2007

I’m a huge fan of post-processing in games. It seems that no matter what I’m writing, I can’t resist the temptation to install an over-the-top bloom effect and some tone-mapping. And that’s me being conservative. The great thing about tone-mapping is that you can throw it on the end of just about any rendering pipeline [...]

0