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.
Comments
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
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
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
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
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
-SGMS
did this file change again with the latest patch?
http://answers.ea.com/t5/Technical-Issues/New-Lighting-InteriorSunShadows/m-p/6232366#M97688