Forum Announcement, Click Here to Read More From EA_Cade.

Shaders_Win32.precomp info

«1
SimGuruModSquadSimGuruModSquad Posts: 597 Member
edited March 5 in Nominated Threads
Hey guys, I was asked in another thread about the format of the Shaders_Win32.precomp file, which contains the game shaders. A bt file for this resource is attached.

Also, note that you can modify your "Mods" resource CFG to override the precomp file so that you can install modded shaders in the Mods folder and not have to replace the one in the game install directory. As follows:
FileType 0x27fe5365 precomp
DirectoryFiles shadermod autoupdate

... this change would load the precomp out of the "shadermod" subdirectory.
Post edited by EA_Cade on

Comments

  • IngeJonesIngeJones Posts: 3,247 Member
    Thanks very much for doing this :)
  • LeviniLevini Posts: 45 Member
    Oooh cool! Thank you :). I've been peeking in it and trying out stuff so it's been helpful.
    -This Space for rent!-
  • IngeJonesIngeJones Posts: 3,247 Member
    Is there anywhere to get a list of the names of the existing valid shaders for TS4?
  • pboxpbox Posts: 630 Member
    @IngeJones do you mean the one in this post perhaps?
    Stuff for TS2 · TS3 · TS4
  • IngeJonesIngeJones Posts: 3,247 Member
    Unfortunately not, I think those are just property settings. I was after the actual names, which presumably were hashed to make the shader entries. Mainly because names are pretty good hints about the role of each shader.
  • LeviniLevini Posts: 45 Member
    Inge that contains most of the Shader names though. You have to dig down a bit but it's still there. Either way, the shader names are the same as the TS3 ones from what I've seen and noticed, but Trying out the TS3 shader Precomp in the TS4 mods folder with that mods folder arguement ModSquad provided doesn't work.
    -This Space for rent!-
  • TokfarbrornTokfarbrorn Posts: 15 New Member
    Been trying to get the game to load my modified .precomp but it does not seem to be working. If i replace the original .repcomp in the game installation directory it works. Can it be confirmed that custom .precomp files are loaded if you modify the Resource.cfg like the example in the first post?

    What I did was to create a copy of the "Counters" shader and named it "Counters2" and replaced the pixel shader with a custom one that makes all pixels purple. Changed the shader property in the material for a custom counter.
    Object is purple when I replace the original .precomp, that would indicate that the custom shader is working correct. Placing it in the Mods/shadermod folder just like the first post here suggest, gives me a shader error. (red pulsating mesh).

    regards
    Micke Sundberg
  • SimGuruModSquadSimGuruModSquad Posts: 597 Member
    Hi @Tokfarbrorn,

    There should be no difference between loading out of the game's data dir or out of the Mods dir. Perhaps try moving the EA-authored file into the Mods folder to see if it loads successfully. That would at least prove the unmodified file is loading correctly out of the Mods folder. I have tried that, and works fine for me.

    -SGMS
  • TokfarbrornTokfarbrorn Posts: 15 New Member
    Hi and thanks for your answer.

    Yes, that does actually work, even the modified file will be loaded from the Mods folder if there is no .precomp file in the "res" folder in the game install folder. Once I put the ea-authored file back in the "res" folder the one in "Mods" stops working.

    regards,
    Micke Sundberg
  • TokfarbrornTokfarbrorn Posts: 15 New Member
    Ok, been doing some testing now and found that the file needs to be named Shaders_Win32.precomp for the game to even start. It needs to be located in either the game installation folder or in the Mods folder.
    I can't get the game to load any other precomp file other than that. I know that the modified file is working since it will load if I move the ea-authored file out from the game installation dir.

    Maybe we´re not supposed to add new shaders just modify the existing ones? As I wrote before I added a new shader "Counters2".
    Or maybe there´s more to modding shaders than just adding a new one to the file?

    /micke
  • SimGuruModSquadSimGuruModSquad Posts: 597 Member
    Hi yeah sorry I was not clear on the limitations of the system. The game will only load "Shaders_Win32.precomp", it will not load multiple shader files. You should be able to modify existing shaders or add new shaders to that file, but the file must include all shaders in addition to your modifications.
  • IngeJonesIngeJones Posts: 3,247 Member
    So there is no way of defining a material on a custom object and linking that to a custom shader that is included in the package (for example)?
  • SimGuruModSquadSimGuruModSquad Posts: 597 Member
    @IngeJones That should be possible. If you guys can't get that working let me know and I can look into it.
  • TokfarbrornTokfarbrorn Posts: 15 New Member
    Thanks @SimGuruModSquad I was afraid that there was a limitation like that.

    I´ve tested to put a compressed .precomp file inside a .package within a entry of type 0x27fe5365 , a longshot I know. That did not work.
    If there was a way of including a custom shader inside a .package it would be awesome.

    regards,
    Micke Sundberg
  • TokfarbrornTokfarbrorn Posts: 15 New Member
    Just bumping this thread =D @SimGuruModSquad
  • SimGuruModSquadSimGuruModSquad Posts: 597 Member
    @Tokfarbrorn not 100% sure what you are asking but there is no way to add a single custom shader to a package file, the entire Shaders_Win32.precomp file needs to be replaced.
  • TokfarbrornTokfarbrorn Posts: 15 New Member
    Not sure if this has been discussed in any other thread... did the Shaders_Win32.precomp just change with the latest patch @SimGuruModSquad ?
  • TokfarbrornTokfarbrorn Posts: 15 New Member
    @SimGuruModSquad
  • SimGuruModSquadSimGuruModSquad Posts: 597 Member
    Hi there, yes it did change! Updated BT attached.

    -SGMS
  • TokfarbrornTokfarbrorn Posts: 15 New Member
    hi again,

    did this file change again with the latest patch?
  • TokfarbrornTokfarbrorn Posts: 15 New Member
    @SimGuruModSquad
  • IngeJonesIngeJones Posts: 3,247 Member
    Argh too many patches! :D
  • TokfarbrornTokfarbrorn Posts: 15 New Member
    yeah, i can't seem to figure out what changed in the latest patch... )=
  • TokfarbrornTokfarbrorn Posts: 15 New Member
    found it, it seems to be a array of strings "paramset:...." after each ShaderSet.
  • MikeWoolfMikeWoolf Posts: 39 Member
    Hey, some solution for this? I put this here because I can't publish in the forum


    http://answers.ea.com/t5/Technical-Issues/New-Lighting-InteriorSunShadows/m-p/6232366#M97688

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file
Return to top