1. Dismiss Notice
  2. GOG.com logo

    Thanks to YOUR votes, GOG.com now sells:
    - Sea Dogs - Sea Dogs: Caribbean Tales
    - Sea Dogs: City of Abandoned Ships

    Vote now to add Pirates of the Caribbean to the list!

    Dismiss Notice
  3. Under the Crossbones Podcast

    A Pirate Podcast with Interviews
    Music, Comedy and all things Pirate!

    - Episode Guide - About - Subscribe -
    - Twitter - Facebook - iTunes - Android -
    - Youtube - Fill the Coffers -

    Dismiss Notice
  4. New Horizons logo

    Quick links for PotC: New Horizons
    - Download latest version
    - Wiki - FAQ - Report bugs here
    - ModDB profile

  5. GOF logo

    Quick links for AoP2: Gentlemen of Fortune 2
    - Downloads and info
    - Historical Immersion Supermod
    - ModDB Profile

Dismiss Notice
New to the forum?
Please take a moment to read our Welcome Message and Forum Rules.

Solved Intel Graphics Fix

Discussion in 'Technical Help' started by amplificar, Aug 20, 2012.

  1. silent122

    silent122 Landlubber

    Joined:
    Mar 31, 2013
    Messages:
    5
    Gender:
    Male
    It's cool i have this problem and now game is work very good thx man :X
     
  2. Armada

    Armada Sea Dog Staff Member Administrator Project Manager 3D Artist Storm Modder

    Joined:
    Jun 11, 2010
    Messages:
    8,078
    Gender:
    Male
    Occupation:
    Game Developer
    Location:
    Somerset, England
    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:
    [​IMG]

    [​IMG]

    [​IMG]
    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:
     
  3. Hylie Pistof

    Hylie Pistof Curmudgeon Staff Member QA Tester Storm Modder

    Joined:
    Jan 15, 2010
    Messages:
    13,768
    Gender:
    Male
    Amplificar is the one to ask about this.
     
  4. Pieter Boelen

    Pieter Boelen (Not So) Old Seadog Staff Member Administrator Storm Modder Hearts of Oak Donator

    Joined:
    Nov 11, 2004
    Messages:
    66,622
    Gender:
    Male
    Occupation:
    Maritime Research: Project Engineer (Analysis)
    Location:
    Wageningen, The Netherlands
    Thatsa pretty weirda... :shock
     
  5. Armada

    Armada Sea Dog Staff Member Administrator Project Manager 3D Artist Storm Modder

    Joined:
    Jun 11, 2010
    Messages:
    8,078
    Gender:
    Male
    Occupation:
    Game Developer
    Location:
    Somerset, England
    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:
    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
     
  6. Pieter Boelen

    Pieter Boelen (Not So) Old Seadog Staff Member Administrator Storm Modder Hearts of Oak Donator

    Joined:
    Nov 11, 2004
    Messages:
    66,622
    Gender:
    Male
    Occupation:
    Maritime Research: Project Engineer (Analysis)
    Location:
    Wageningen, The Netherlands
    That looks.... WEEEEIIIIRD!!! :shock

    (And... Nice ship in the harbour there. ;) )
     
  7. Hylie Pistof

    Hylie Pistof Curmudgeon Staff Member QA Tester Storm Modder

    Joined:
    Jan 15, 2010
    Messages:
    13,768
    Gender:
    Male
    Everybody loves a good mystery. Now, who knows anything at all about .dlls?
     
  8. Pieter Boelen

    Pieter Boelen (Not So) Old Seadog Staff Member Administrator Storm Modder Hearts of Oak Donator

    Joined:
    Nov 11, 2004
    Messages:
    66,622
    Gender:
    Male
    Occupation:
    Maritime Research: Project Engineer (Analysis)
    Location:
    Wageningen, The Netherlands
    I haven't the faintest clue on them.
     
  9. Armada

    Armada Sea Dog Staff Member Administrator Project Manager 3D Artist Storm Modder

    Joined:
    Jun 11, 2010
    Messages:
    8,078
    Gender:
    Male
    Occupation:
    Game Developer
    Location:
    Somerset, England
    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...
     
    Pieter Boelen likes this.
  10. superkid

    superkid Sailor

    Joined:
    Sep 4, 2011
    Messages:
    158
    Gender:
    Male
    Could you please give me the files you changed to try it as well? I would be really greatful if possible.
     
  11. Armada

    Armada Sea Dog Staff Member Administrator Project Manager 3D Artist Storm Modder

    Joined:
    Jun 11, 2010
    Messages:
    8,078
    Gender:
    Male
    Occupation:
    Game Developer
    Location:
    Somerset, England
    Here you go. Extract the file to MODULES\Techniques\Weather\Sea (and be sure to back up the original RadeonSea.sha). :doff
     

    Attached Files:

  12. superkid

    superkid Sailor

    Joined:
    Sep 4, 2011
    Messages:
    158
    Gender:
    Male
    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.
     
  13. Pieter Boelen

    Pieter Boelen (Not So) Old Seadog Staff Member Administrator Storm Modder Hearts of Oak Donator

    Joined:
    Nov 11, 2004
    Messages:
    66,622
    Gender:
    Male
    Occupation:
    Maritime Research: Project Engineer (Analysis)
    Location:
    Wageningen, The Netherlands
    Saving should be unrelated. In what instance were you unable to save? Did you get a Holy Relic from a monk?
     
  14. Armada

    Armada Sea Dog Staff Member Administrator Project Manager 3D Artist Storm Modder

    Joined:
    Jun 11, 2010
    Messages:
    8,078
    Gender:
    Male
    Occupation:
    Game Developer
    Location:
    Somerset, England
    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.
     
  15. Pieter Boelen

    Pieter Boelen (Not So) Old Seadog Staff Member Administrator Storm Modder Hearts of Oak Donator

    Joined:
    Nov 11, 2004
    Messages:
    66,622
    Gender:
    Male
    Occupation:
    Maritime Research: Project Engineer (Analysis)
    Location:
    Wageningen, The Netherlands
    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
     

    Attached Files:

  16. Armada

    Armada Sea Dog Staff Member Administrator Project Manager 3D Artist Storm Modder

    Joined:
    Jun 11, 2010
    Messages:
    8,078
    Gender:
    Male
    Occupation:
    Game Developer
    Location:
    Somerset, England
    Thanks! I'm not exactly expecting miracles, but we'll see what happens.
     
    superkid and Pieter Boelen like this.
  17. superkid

    superkid Sailor

    Joined:
    Sep 4, 2011
    Messages:
    158
    Gender:
    Male
    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.
     
  18. Armada

    Armada Sea Dog Staff Member Administrator Project Manager 3D Artist Storm Modder

    Joined:
    Jun 11, 2010
    Messages:
    8,078
    Gender:
    Male
    Occupation:
    Game Developer
    Location:
    Somerset, England
    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
     
  19. Pieter Boelen

    Pieter Boelen (Not So) Old Seadog Staff Member Administrator Storm Modder Hearts of Oak Donator

    Joined:
    Nov 11, 2004
    Messages:
    66,622
    Gender:
    Male
    Occupation:
    Maritime Research: Project Engineer (Analysis)
    Location:
    Wageningen, The Netherlands
    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
     

    Attached Files:

  20. Armada

    Armada Sea Dog Staff Member Administrator Project Manager 3D Artist Storm Modder

    Joined:
    Jun 11, 2010
    Messages:
    8,078
    Gender:
    Male
    Occupation:
    Game Developer
    Location:
    Somerset, England
    How does that sound? :)
     

Share This Page