• New Horizons on Maelstrom
    Maelstrom New Horizons


    Visit our website www.piratehorizons.com to quickly find download links for the newest versions of our New Horizons mods Beyond New Horizons and Maelstrom New Horizons!

Solved Intel Graphics Fix

I'm seeing stuff in the water again... pretty sure I was sober, too. :wp

The point is, this time I'm absolutely certain I'm seeing specific textures being rendered on the water, rather than distorted reflections.
Take a look at these screenshots, taken at different times and in different places:
Intel_test6.png


Intel_test7.png


Intel_test8.png
The first two images seem to show Icons.tga, because of some specific features you can make out.
In the first image, you can see a series of blurry shapes in between the stripy patches, and one of them is quite clearly a grappling hook.
The second image shows some arrows up close; the four nearest the centre of the image are actually two arrows split in half and offset across an imaginary line from the top left to bottom right of the image.
The style of arrow is that of the old blue interface, not the brown one, which tells me it's not Icons_new.tga. Note I had the brown interface set as my preference, not the blue one.

Anyway, the third image seems to show some flags in a grid, but so far I haven't been able to figure out which texture this is.
It looks like it should be a pennant texture, but it's hard to tell which one, since it could be distorted similarly to the icons texture.

It's also worth noting that there isn't always a messed up multicoloured patch of ocean. Sometimes the ocean is clean for an hour or two (in-game time), and then a weird patch appears/disappears on the weather change.
The patches are sometimes stripy and multicoloured (like the first image I posted on the previous page), other times they're more patchy and often pink or cyan. And they can appear both near land and in open sea.

So the mystery is, why are there random textures rendering on the ocean's surface, and how is the Intel fix related to it? :confused:
 
I've had this whole Intel problem on my mind for a while now, so I've been reading through Amplificar's posts again to see if there's anything useful I could do to help find a better solution.
This part in particular is pretty interesting:
It's possible that a superior fix could be created by "simplifying" the bad shader (instead of disabling it in the program's code). I wont be able to try that unless I find time, and I don't know exactly which shader is causing the problems. With either of the patched DLLs, the "bad" shader isn't being used, so one or more of the .sha files could be removed without affecting the game, thus identifying it.

Shader techniques are located in MODULES/techniques/*.sha
It looks like there's some interesting relevant stuff in MODULES/techniques/Weather/Shaders/

There appear to be specialized shaders for different graphics hardware (xbox, gfx, ati ~ and one of those may be getting used incompatibly for intel?)
I just tried removing some of the .sha files one at a time (Xbox, ATI and GeForce), and it would seem that the ATI shader is probably the culprit.
Removing the other two had no effect on the game, but removing the ATI shader caused the ocean to turn white:
white_sea.png
 
That looks.... WEEEEIIIIRD!!! :shock

(And... Nice ship in the harbour there. ;) )
 
Well, I did some more digging and found some very interesting stuff.

Each of the three hardware options (ATI, GeForce and Xbox) make different uses of vertex shaders and pixel shaders. These shaders are defined in MODULES\Techniques\Weather\Shaders, and the files that dictate which ones are used are in MODULES\Techniques\Weather\Sea (both groups are .sha files). Looking through the shader files, it becomes clear that the GeForce and Xbox shaders are nearly identical, whereas the ATI shader is very different.

Now, I noticed that the files in Weather\Sea make reference to vertex shaders and pixel shaders separately; ATI and GF both use their own shaders, but Xbox uses the GF vertex shader and its own pixel shader.
This got me thinking that you could potentially mix and match the shaders, so I found this section in RadeonSea.sha:
Code:
            VertexShader = "SeaVS_ATIReflect";
            PixelShader = "SeaPS_ATIReflect";
Changing the PixelShader line to "SeaPS_GF3Reflect", to use the GeForce pixel shader with the ATI vertex shader, makes the sea look like this:
sea_no_reflect.png
The sea now looks darker and seems to lack any reflectivity, which I'm assuming is down to incompatibility between the ATI and GF shaders in use.
Other than that, it displays almost as normal, and I reckon having no reflections is better than strange multi-coloured reflections.

I got the same result when using the Xbox pixel shader, which again indicates that something isn't working properly.
I also tried to run the game with these shaders selected and the original unpatched Sea.dll, but it still crashes in the same way as before.

Long story short: it seems the ATI pixel shader code probably holds the key to a potential fix. If it can be adjusted or rewritten to work with Intel graphics, we're onto a winner...
 
Here you go. Extract the file to MODULES\Techniques\Weather\Sea (and be sure to back up the original RadeonSea.sha). :doff
 

Attachments

  • RadeonSea.7z
    387 bytes · Views: 287
Thank you VERY much! It works like charm! Although I encountered a bug while playing that I couldn't save (it kept saying: you can't save now), but I don't think this is related to that.
 
Saving should be unrelated. In what instance were you unable to save? Did you get a Holy Relic from a monk?
 
Just a quick note: I tried the above modification on my old PC earlier, which uses AMD graphics, to see if it still crashes.
It actually didn't crash, and when it loaded, looked exactly the same as my screenshot in post #109.
This seems to imply that there is something else causing the crash on Intel graphics, besides the pixel shader code.

What's still bugging me, though, is wondering whether using some of the CoAS shaders might help.
It has always been said that "the two games aren't similar enough, etc.", but still I don't ever recall anyone proving this claim.

If someone could upload the CoAS MODULES folder, I'd really appreciate it so I can experiment with some of the shaders.
Even if it does turn out that they cannot work with PotC, at least we'd have some kind of proof.
 
I know the DLL files aren't interchangeable. No clue about the shaders though. See attached CoAS' full MODULES folder.
Hopefully you can figure out something with them. Good luck! :onya
 

Attachments

  • modules_CoAS.7z
    1.3 MB · Views: 252
Saving should be unrelated. In what instance were you unable to save? Did you get a Holy Relic from a monk?
This problem started right after a boarding operation ended and then I couldn't save anywhere. Anyway, I re-launched the game and loaded from my last save and it was fixed.

What I noticed at the sea, however, is that it rarely flashes and turns green, blue or red for a second and then it goes normal again.
 
What I noticed at the sea, however, is that it rarely flashes and turns green, blue or red for a second and then it goes normal again.
That's odd; I haven't noticed that yet during testing. :read

No miracles yet, by the way. I'm still getting weird effects when using the CoAS shaders so far. o_O
 
With attached file, we no longer need to keep two copies of WhrInitValues.c . If you put an "IntelCard.txt" file in your main game folder, it will load Armada's Intel colours.
So we can include that file in the Intel fix and DON'T need to modify the PROGRAM folder anymore. That should save us potential compatibility issues later on. :doff

Since we need that "IntelCard.txt" file anyway, could someone write up a short explanatory text on what the Intel fix does?
There might as well be something sensible in that file, no? :cheeky
 

Attachments

  • WhrInitValues.zip
    2.5 KB · Views: 250
The Intel Graphics fix allows the game to run properly on systems with Intel integrated GPUs, by disabling various parts of the game's ocean shaders.
This compromises the quality of the ocean's appearance, but does not affect gameplay, and allows the game to run just as smoothly as it otherwise would on comparable ATI and Nvidia hardware.

DISCLAIMER: This fix is not made by or affiliated with Intel in any way.

How does that sound? :)
 
Back
Top