开发者

Hooks for Direct3D 6.1 to replace EMBM with shaders

I am writing Windows Hooks for DirectX 6.1. I want to intercept calls for EMBM (Environment Mapped Bump Mapping) and pass the data to own bump shader, so application which depend on EMBM will work correctly. The only problem is that DX 6.1 don't allow shaders at all. I can't simple replace Direct3DDevice3 with class from newer SDK, b开发者_Python百科ecause it's methods uses different sets of arguments and application that use my hooked dll will crash. I do not know how to workaround through. I am not so good at DirectX (maybe there is more effective way to implement bump in DX 6.1 that will work on modern hardware?) Maybe it is possible to query some interface in D3Device that will allow me to use shaders?

Anything that could point me in right direction would be much appreciated.


Each Direct 3D device derives directly from IUnknown so no you cannot QI from a v6 device to a v9 device.

The only way you can do what you want (above driver level) is to implement the entire v6 device and translate all calls to their v9 equivalents. Of course you then have a problem if the game implements embm via v7 or v8 ...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜