-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dear Crosire!Please help with Correcting/Remove night pixelshader effect of Operation Flashpoint 1.96 #142
Comments
please,download it here,if you need OFP 1.96 game file, please noted me |
I guess the best way to solve this is to modify (hack) the d3d8.dll that works with the configurator and have it load something like d3dx.dll. Then rename the d3d8to9 file to d3dx.dll. |
Incorporating color correction into the new d3d8 should be easy for crosire, but for us it was very difficult |
I quickly hacked the Configurator dll to have it load Hacked package update: dxdll10_hacked.zip |
Copy that I'll test it immediately! |
The test is over, the game fails to start, and no errors are reported, just double-click to open but the program doesn't respond. I deleted d3dx.dll and kept d3d8.dll, same as above. The effect of d3dx.dll on the game frame rate: unknown, after deleting d3d8.dll, the screen is gray and white, no correction effect, is there any other information can I check for you? |
https://www.legendsworld.net/shooter/game/1730 |
hello elishacloud,could you continue to help us?it is our honour! |
Ok, try this one. I think it should work for you now. I fixed the hack so that the Configurator dll loads New version: dxdll10_hacked_d3dx.zip |
I tested and it seems to work on my test installation :) Not sure about the night effect as @NATO2000 has to confirm it, but the game started and both .dlls were loaded. Nice job with the fix @elishacloud. The |
@elishacloud @HerMajestyDrMona The second test is over, and the results are as follows: The night image correction function is effective, but some of the original features of the DXLL tool fail, such as turning off vertical sync. This defeats the purpose of fusing the dll files, because our purpose is to fix the night screen + increase the game frame rate. When the OFP frame rate is 60FPS, there is a serious mouse floating problem. 90% of players around the world may not realize this problem. They are used to the state of the mouse floating around. However, increasing the game frame rate to more than 80FPS can greatly improve the game operation experience. |
Good.
This is probably a bug with d3d8to9. I've seen this in other games. If this is the only issue, we should focus on fixing this. |
That reminds me of another thing, I haven't tested myself but there are reports that enb converter fixes flickering of shadows in original Mafia: ThirteenAG/WidescreenFixesPack#1022 Would be interesting to know why, and why d3d8to9 doesn't. |
A few years ago, I fixed the FPS limit in my project, by adding:
At the end of this function: Line 118 in 8648e85
(note that I'm not sure if it's really disabling the Vsync, but seems to do exactly what I needed). You can test it by using this d3dx.dll file (compiled with the /MT runtime library): d3dx_D3DPRESENT_INTERVAL_IMMEDIATE.zip I remember it was discussed before that d3d8to9 could have some configuration file where such tweaks could be applied. Maybe if that's confirmed to work we could focus on the config file if @crosire has nothing against it. |
How do you disable vertical sync with DXLL? I could not find the option. We could hard code it off, but I prefer to fix the issue. In the version of the game I have it is sending |
@elishacloud Thank you very much for your efforts and help! Next, I use other computers to test different versions of d3d8tod9.dll of crosire one by one. I speculate that there may be differences in the improvement of frame rate between different versions of d3d8tod9.dll. There may be a version that maximizes the frame rate of OFP, and this version requires I found out by testing. At the same time, if possible, is it possible to issue instructions through dll or Configurator.exe to make the game implement 16X anisotropic filtering mode. This is because many OFP players may use the integrated graphics card to play OFP, and the integrated graphics driver, you know, is very simple and basically cannot provide any effective optimization options. I can only describe it as horror. Doing this, however, may greatly increase your workload. Let's find out what caused the vertical sync function to be turned on again. |
check the DXDLL TOOLS for OFP,may be can find some lead, it was disable vertical sync automaticly |
It sounds like you want more options. d3d8to9 is just a straight conversation from Direct3D8 to Direct3D9. My dxwrapper project has other options. You can use this dll instead, which uses d3d8to9, but adds all kinds of options: d3dx.zip |
Yes,it is,DXDLL TOOS for OFP contains Configurator,d3d8.dll and config.cfg,there is "no disable vertical sync" in the Configurator but it is indeed already turn the vertical sync off,I don't know this due to d3d8.dll or Configurator,so it may be a lead about disabling vertical sync |
I checked the parameters that are sent to Direct3D8 and neither Configurator nor the d3d8.dll turns off vertical sync. Maybe this is a bug in Direct3D8? But they are definitely turning ON vertical sync. The game is sending "The driver will wait for the vertical retrace period. Present operations will not be affected more frequently than the screen refresh." AND "Unless this value is D3DPRESENT_INTERVAL_IMMEDIATE, the presentation will be synchronized with the vertical sync of the monitor." |
@elishacloud, I noticed it before too, on EE2 in DX8 mode on Windows 10/11. 60Hz laptop:
Windows is doing some strange things with DX8 games (Nvidia and AMD drivers too). I'd say it's the best to simply workaround it in d3d8to9. |
oh my god,it is a bug? |
ok,OK, can you consider another solution, just write the function of removing black and white shader effects into d3d8tod9.dll? |
This brings up a philosophical question. Should d3d8to9 just do direct translation from Driect3D8 to Direct3D9 or should it it try and copy how Direct3D8 works even if Direct3D8 is ignoring or not doing what the game requests? Currently, d3d8to9 just does direct translation from Driect3D8 to Direct3D9. If we try to copy how Direct3D8 works then we would have to do some work reversing Direct3D8 to figure out what cases it to disable v-sync even when the game requests it to be enabled. This could lead to game settings not working when the user specifically enables it.
@NATO2000 I don't think that will ever happen with d3d8to9 because it goes far outside the realm of what d3d8to9 is supposed to do. This is something more for a custom fix for Operation Flashpoint, which is what DXDLL seems to be doing. For other customizations I recommend using dxwrapper. I already gave you a build here that enables d3d8to9 and anisotropic filtering and disables v-sync. |
In my opinion the first one (direct translation, as it's done currently). There are so many possibilities: Intel, AMD, Nvidia "tweaks", Windows fullscreen optimization option that also changes how things are rendered, dual graphics card laptops (Nvidia Optimus for example does not allow to use the better GPU for DX8 games), source. Not to mention that things might even differ depending on the output screen or GSync/FreeSync. Or... this weird Windows 10/11 Game Mode (but it's probably only settings CPU priorities). Oh, and there's Wine that actually tries to reproduce things just as they should be in documentation, and I know that some Linux users use d3d8to9 on it too. A good solution would be a configuration file where users could overwrite the default d3d8to9 behaviour (for example the basic Vsync switch), but... It's already available in dxwrapper, so that also doesn't make much sense and only might cause more complications in projects that use d8to9 as source for the further enhancements. I think this DX8 Vsync off thing causes a false first-impression when people are testing d3d8to9 for the first time. They might actually think it works "worse". Maybe adding extra information to the README could be helpful? But then, we still would need some confirmation of these philosophical theories. |
Hello, today I changed a computer with a discrete graphics card, and did the final test of the previous New version: dxdll10_hacked_d3dx.zip, and also tested each version of d3d8tod9 individually. For discrete graphics card users, they can implement 16x anisotropic filtering and turn off VSync through the driver panel. Basically achieve the perfect ending. For integrated graphics users, since VSync is enabled by default, dxdll10_hacked_d3dx.zip doesn't make much sense, either they use the original dxdll tool to fix night images, or they use dxwrapper, which cannot fix night images. |
I think there is a misunderstanding here. dxwrapper can replace d3d8to9 and work in tandem with dxdll. In other words, you can get all the features of dxdll and the features of dxwrapper together. With dxwrapper you can disable v-sync and enable anisotropic filtering. With dxdll you can fix the night sky. So with both of them you can get all of this. I gave you the build of dxwrapper to do this in the comment here. Just use the hacked version of dxdll I gave you and then overwrite the d3dx.dll file with the files from the comment listed and you will get everything you need. To simplify this I created a package with both dxdll and dxwrapper: dxdll10_hacked_d3dx_dxwrapper.zip |
hello,
@elishacloud Let me understand, your D3DX.dll is not the same thing as Crosire's D3D8toD9, but these two dlls serve the same purpose? Can you help me with my confusion, thanks a lot, haha I quickly learned D3DX.INI [d3d9] According to the underlying binary language, 0 is off and 1 is on However, AnisotropicFiltering=1, like the default, is trilinear filtering. I filled in 16, and it is still trilinear filtering. What is the code for 16 times anisotropic filtering? Also, is there any code to limit the FPS, let's say when I need to limit the FPS that is too high, how can I write the code? FPSlimits=144? |
My dxwrapper includes all of Crosire's d3d8to9 code in it. Dxwrapper is a multi-purpose tool which includes lots of different tools.
My dxwrapper can do everything d3d8to9 can do and more.
No, I am not Crosire.
Correct.
Correct.
When AnisotropicFiltering=1 then the code will query the GPU and use the highest available AnisotropicFiltering supported by the GPU. In most cases it is better to keep it at 1 than setting it to 16. But you could manually set it to 16 if you want.
No, I have not created any code to limit the speed. The limit should be based on either some limit in the game or the limit of your hardware. |
@elishacloud Big news! Great discovery! At first I set AnisotropicFiltering=1 or 16, and the game defaults to trilinear filtering! Then I immediately started repeating the experiment. The experimental results showed that the first entry into the game was indeed a tri-linear filtering mode, but by first minimizing and then maximizing, 16 times anisotropic filtering could be activated! Ha ha ha ha |
@elishacloud My dear elishacloud, you have made outstanding contributions to OFP players around the world, and your new tools have greatly enhanced the vitality of OFP! In addition, OFP has a fatal problem, the mouse is not accurate, unlike standard FPS games (such as Counter Strike, Half-Life, Quake, etc.), his mouse crosshair, whether in the game menu, or in In the actual game, there is a floating range of the crosshair. I noticed that there are some settings related to mouse positioning and input in dxwrapper. I wonder if dxwrapper has a function to solve the inaccurate positioning of the crosshair of the game mouse? |
That does not sound right. Can you try with this build and see if it helps. Keep your existing
I don't have anything in dxwrapper that could help with this. I wonder if it is similar to the issue here. |
Great it works well,Really! |
Crosire's D3D8TOD9 can be used in XP systems. You may have questions, why use winXP system? Under the extreme scenario test, However, in XP system, OFP without any D3D8.DLL can directly reach 780FPS. It's strange that OFP is so powerful in XP without any d3d8tod9 loaded. It is more powerful than D3D8toD9 loaded in win7 system. In XP, OFP killed win7+D3D8TOD9 with bare hands. The above test results are very unexpected. Originally, I thought that the operating efficiency of OFP has reached its peak state in XP system. At this time, with the help of D3D8TOD9, the ultimate evolution of OFP can be achieved, but the test results are completely unexpected. However, I have repeatedly tested more complex scenarios and found more interesting things. As the scenarios become more and more complex, XP+D3D8toD9.dll will indeed have some improvement, but the improvement is not as obvious as in the win7 system. So, wondering if you can make a D3DX dxwrapper for XP systems? I can do more tests. |
I sincerely hope this won't be even considered by @elishacloud. If you still would like to test these things on XP, I would recommend you to install some old version of Visual Studio Community and try to compile the project yourself, based on the source code that is available. There's a few % of chance that the code would be compatible. |
You are all over the place man.
I agree then it's far from being some pressing deal breaker, but not last due to the aforementioned (if confused) claims it would certainly be an interesting comparison. Though I doubt that could eventually really boil down to operating system differences native profiling hasn't been available for 10 years though by now). |
It would be very difficult for me to support dxwrapper on Windows XP. This goes against the purpose of dxwrapper, which is to get old games working on new operating systems. I think it would be much easier to make a version of d3d8to9 with v-sync disabled, antialiasing enabled and anisotropic filtering enabled. Maybe in the future I will make a branch of d3d8to9 with these features. |
I mean, oldest games used to break there too. |
I believe the performance issues started with Vista. As I understand it the reason is that Microsoft changed their underlying architecture and removed support for anything older than DirectX 9. These older DirectX versions are simply emulated/re-implemented on top of their new architecture. This broke lots of games and made other games run slowly. dxwrapper should work fine on Vista and newer. However, supporting XP would be difficult mainly because of the changes done in DDrawCompat. |
Taking OFP as an example, I did a detailed performance comparison test on win7 (bothX64 and X86) and XP (only X86). In any case, the frame rate of XP is twice as high as that of win7. Even if I use the same version number of drivers like DRIVER 252.61 for XP and Win7. |
@elishacloud @HerMajestyDrMona In fact, there is another way to solve the problem, but it must require the use of an old graphics card and an old version of the driver. RivaTuner 2.24C and previous versions can modify the graphics card driver and disable the pixel rendering function of the graphics card driver. This fixes the nighttime imagery of Operation Flashpoint. But RivaTuner2.24C is a very old thing, now RivaTuner has degenerated into video recording software (too bad) When I found that the wrapper could not be used on the XP system, I used RivaTuner2.24C to force the pixel shader off. Then place d3d8tod9 in the game root directory. The problem is solved. But only for me. There are very few people in the world like me who specially prepare a set of old computers for old games if set an of old computers only for OFP. Maybe I am the only one in the whole world. By the way, I haven't told you my configuration yet. i7 4790K+B85 Gaming+16G DDR3 1600+Geforce 7900GTX / GTX 280 Geforce 7900GTX with 93.71 Driver can run 99% old games on the best |
So, the only way around that (and perhaps elishacloud/dxwrapper#111 if the last idea wasn't to work either) is to rewrite smoothly the crippled functions? |
I've tried to add "ForceHardwareVertexProcessing = 1" to the "d3dx.ini" at [d3d9] but nothing works. Or do you have to add this to a new version? |
Does it work fine without ReShade?
Have you tried disabling antialiasing and anisotropic filtering? Maybe ReShade does not support these functions? Are you sure this is not a bug with ReShade? I have used ReShade along side dxwrapper a number of times in the past.
I have not added this feature yet. |
Unfortunately no, I started the game only with DXDLL water reflections, but PR Mod has the same blurry textures with DXDLL activated I also tried the first DXDLL version and the same happens
Could you add this feature? Do you have any ideas what could cause this problem? If you need any more information just ask and if you can test I would be happy to help. |
If you want, you can test this PR Mod with really nice textures and models:
|
update is not necessary when downloading the FULL version (I'm writing this as a mod author) |
The problem was solved with @NATO2000 In the "Configurator.exe" form DXDLL and under the "Postprocessing" the "Glare effect" have to be "Disabled" Now I'm happy to use your first DXDLL version with ReShade. But the issue with the version "dxdll10_hacked_d3dx_dxwrapper.zip" is still that ReShade isn't working anymore with this Version. |
Could anybody add this "d3d8.dll" to the latest version? Or is this already added? This "d3d8" improves the FPS. "This is a pseudo-driver module that intends to improve compatibility and stability in games using Direct3D 8 for rendering by converting all API calls and low-level shaders to equivalent Direct3D 9 ones." https://forums.bohemia.net/forums/topic/232454-d3d8to9-the-ultimate-ofpacwa-performance-booster/ |
It links here. We are the same thing. |
The D3DX tool you invented is amazing, used by a lot of people, and they all know your name Thank you very much for your outstanding contribution to OFP There are still some unresolved issues, can you find a way to add frame limit in D3DX? Because the use of external software or RTSS for frame limiting, it will increase the game input lag and increase the threshold for some players The game self-limits frames to achieve the lowest input latency. The second question, remember I once reported to you, there are some deadzone problems in OFP's mouse operation and aiming By using the D3DX components you invented, turning off vsync, using a high-performance gaming mouse, and lowering the DPI to less than 200, you can significantly reduce the huge negative impact of deadzone, but the source of the problem has not been eliminated, and OFP still cannot achieve accurate mouse aiming and reaction speed like CS:GO. I believe I consulted your posted input8 .dll, but it doesn't seem helpful for OFP Let me describe the mouse features of OFP in detail: The game engine seems to have a jumping phenomenon when processing mouse movements. The mouse of OFP is normal when dragged at high speed, but when aiming accurately at low speed, it starts to freeze If the CS:GO gaming mouse trajectory is a line (————————————————) Hope you will be interested in solving this problem
The D3DX tool you invented is amazing, used by a lot of people, and they all know your name Thank you very much for your outstanding contribution to OFP There are still some unresolved issues, can you find a way to add frame limit in D3DX? Because the use of external software or RTSS for frame limiting, it will increase the game input lag and increase the threshold for some players The game self-limits frames to achieve the lowest input latency. The second question, remember I once reported to you, there are some deadzone problems in OFP's mouse operation and aiming By using the D3DX components you invented, turning off vsync, using a high-performance gaming mouse, and lowering the DPI to less than 200, you can significantly reduce the huge negative impact of deadzone, but the source of the problem has not been eliminated, and OFP still cannot achieve accurate mouse aiming and reaction speed like CS:GO. I believe I consulted your posted input8 .dll, but it doesn't seem helpful for OFP Let me describe the mouse features of OFP in detail: The game engine seems to have a jumping phenomenon when processing mouse movements. The mouse of OFP is normal when dragged at high speed, but when aiming accurately at low speed, it starts to freeze If the CS:GO gaming mouse trajectory is a line (————————————————) Hope you will be interested in solving this problem |
Dear Crosire, have you played Operation Flashpoint? This year is my 19 year as a player of Operation Flashpoint.
Operation Flashpoint will accompany me throughout my life.
Operation Flashpoint has a unique problem, that is, starting from the DX9 graphics card, the night image effect in the game will become black and white.
[as you see,the second in game night time picture was amost black and grey]
The rendering on the DX8 graphics card is all normal.
I have checked the official technical information and player forums. They mentioned that the night rendering of the game performed abnormally on the DX9 graphics card, such as 6800GT, 7950GT and later graphics cards, but everything is normal on the FX5200 graphics card, because FX5200 is a DX8 graphics card, FX5200 The DX9 function is not complete.
What's more peculiar is that, among all the computer games in the world, Operation Flashpoint is the only game that has abnormal rendering problems with it's night images due to the upgrade of graphics card technology.
There is one ideas to solve this problem
There were two American (seem to be) players who have developed D3d8.dll for Operation Flashpoint, and matched it with Configurator.exe.
In Configurator.exe, there is such a setting:
Remove night pixelshader effect, after turning ON(not OFF) this option, the night image in the game can be rendered normally.
But this D3d8.dll does not make any optimizations to the frame rate and performance.
Those two authors had lost contact , their E-mailboxes wasn't existing anymore
and then your D3D8.DLL,https://github.com/crosire/d3d8to9/releases
provides a solution to improve the performance of the game.
This D3D8.DLL is really useful for improving the frame rate, but it does not support repairing the abnormal rendering of the game night image.
Your D3d8.dll file can effectively improve the game frame rate, but does not have the function of repairing night images, Two American Players's D3D8.DLL (DXDLL Tools
FOR OFP) has a visual effect optimization function, but does not have a frame rate lifting function, can you add the Remove Night Pixelshader Effect function in your D3D8.DLL? (I only need this feature, just provide a dedicated version for OFP)
So please help me
================================================
Some other information with DXDLL for OFP :
To install, extract this archive to your Operation Flashpoint
directory. Run dxdll/configurator.exe to configure, or edit
the dxdll/config.cfg file with a text editor.
Note! Do NOT copy the d3d8.dll into your windows system
directory, doing so will break Direct3D from your system!
Dxdll adds various effects to OFP, including postprocessing
effects, reflective water and other enhancements.
Postprocessing effects include hard light effect, desaturation
effect and glare effect. For more information run the configu-
rator. All postprocessing effects require a video card with
at least pixel shader v1.1 support. Water reflections require
environmental bumpmampping and render to texture support.
Most effects and settings can also be changed with various
in-game shortcuts, press the application key and'H' while
playing for more information. When changing settings in-game,
they are not saved into the configuration so if you want to
do permanent changes you need to edit the configuration.
Note that due to the way the DLL works, it is likely that
there are compatibility problems with some video cards. If you
encounter problems, try these procedures:
-Disable some effects from the DXDLL configuration
-Make sure HW T&L is enabled from OFP Preferences
-Make sure multitexturing is enabled from video options
-Try increasing the texture size settings from OFP Preferences
-Try changing to 16bit or 32bit color
-Decrease the hardware acceleration setting from windows display properties
-Make sure you have the latest drivers installed for you video card
dxdll10.zip
Known bugs
-Changing screen resolution will crash the game
-Reflected objects appear "laggy" since they come from
the last rendered frame
-Glare fade effect often "burns" shapes into the image
which do not disappear until bright objects come to view
-Reflected objects are counted from farthest to nearest
so when the reflected objects count limit is hit, objects
near player will not be visible in the reflection
-Reflected objects distance is relative to player's position,
not the camera position, so when using 3rd person view or other
external camera, reflected objects can appear wrong
-Changes to OFP default textures, like changing the water
texture, causes the dll not to recognise them and can
cause some effect to not work properly.
Credits
DXDLL is made by Kegetys [email protected]
and Feersum Endjinn [email protected]
Includes code from the zlib library,
Copyright (C) 1995-2002 Mark Adler
The text was updated successfully, but these errors were encountered: