STAR WARS™ Empire at War: Gold Pack

STAR WARS™ Empire at War: Gold Pack

Change the way you play
Upload and subscribe to user created mods for Star Wars: Empire at War™. Don’t forget to rate and review your favorite mods. User created mods are not officially supported by Disney.
Learn More
Fix for green models- compile shaders
Reposting here for better visibility/applicability.

I have discovered a fix for problems with green colored ships etc in mods. It is not an easy fix, so this needs to be done by workshop maintainers and mod makers, although users can attempt it as well if they want.

The cause of the problem is Shaders. Since the update, custom shaders have not been automatically compiled by the game, so ships show up green (the default shader). Uncompiled shaders have the file extension .fx and .fxh instead of .fxo.

Mod shaders are located in the Data/Art/Shaders directory of the mod. Workshop mods are located in steamapps/workshop/content/32470 and then are in numbered folders. Other mods are located in the game's local files.

To fix the problem, mod makers and workshop maintainers need to COMPILE their shaders.

1) Go to https://www.microsoft.com/en-us/download/confirmation.aspx?id=6812 and acquire the Microsoft DirectX Software Development Kit

2) Either install the SDK or open the installer with an archive reader like 7-Zip

3) Go to the Utilities/bin folder and find the program fxc.exe

4) Put fxc.exe where you have uncompiled shaders

5) Open Command Prompt and make sure it is set to the directory where your fxc.exe and shaders are (so if you run fxc.exe /? you get help text)

6) Run the command fxc.exe /Tfx_2_0 /LD /Fo"ShaderOutputName.fxo" "ShaderInputName.fx"

7) Your compiled .fxo shader should be in the same folder as fxc.exe. Now you can put it in your mod, Data/Art/Shaders folder and the game should read it in.

8) Run the mod and check that models look normal

To Petroglyph: it seems that you removed calls to D3DCompileFromFile when you updated the game executable. I'm not sure how realistic it is to put back in.
< >
Showing 1-15 of 28 comments
Uthog Sep 3, 2017 @ 3:24am 
I cant compile it says something like code not produced, i followed your guide from 1 to 6 but it just wont compile. Any fix for that?
MOV Sep 3, 2017 @ 4:03am 
or just delete the shader folder
Joey_Stalin Sep 3, 2017 @ 5:41am 
Originally posted by Storm312:
or just delete the shader folder
does that really fix the green shaders issue?
Originally posted by Joey Stalin:
Originally posted by Storm312:
or just delete the shader folder
does that really fix the green shaders issue?

It works for me
evilbobthebob 5 Sep 3, 2017 @ 8:38am 
Originally posted by Uthog:
I cant compile it says something like code not produced, i followed your guide from 1 to 6 but it just wont compile. Any fix for that?

Then there may be an issue with the way the shader you have was written, or you may be missing shader header files (.fxh) that you need to compile. Can't really diagnose without more information like the full compile error code.
Kratec Sep 3, 2017 @ 9:27am 
hi all, i dont understand the step 4.
evilbobthebob 5 Sep 3, 2017 @ 9:28am 
Originally posted by Kratec:
hi all, i dont understand the step 4.
It means that you place the fxc.exe file in the same folder as the shaders which need to be compiled. This would usually be Data/Art/Shaders of whatever mod.
Kratec Sep 3, 2017 @ 9:46am 
ok, ty
Zephyros00 Sep 3, 2017 @ 3:00pm 
Originally posted by Storm312:
or just delete the shader folder
This can fix the issue but it can also crash the game. Atleast for me it did.
Ghosty Sep 3, 2017 @ 3:12pm 
Originally posted by ARGamingChannel:
Originally posted by Storm312:
or just delete the shader folder
This can fix the issue but it can also crash the game. Atleast for me it did.
The crashes are there regularly, even if you were to keep the Shader the mod would crash, its unstable and has been reported so online.
GPSZEON Sep 3, 2017 @ 11:13pm 
is it possible for someone with the mod that has the shaders fix to repost the mod on the workshop with the fix in place. I have the green texture problem but dont want to start messing with the files since i am not well versed in that sort of thing. If its possible to repost with the fix in place or make it public another way that would be fantastic.
RadicalEdward2 1 Sep 4, 2017 @ 11:25am 
So if I was to follow these steps, would it also fix how the character models are all in T-poses?
When I tried running the mod right after the update, not only was everything green but, none of the infantry (CIS or Clone) seemed to have animations anymore.
Locutus 2 Sep 4, 2017 @ 3:56pm 
I can't confirm any of this working.
We are already using compiled fxo shaders but ingame the models do still appear green. Has it even been confirmed that with the patch the mod/.../shader folder can be read?
Usually one had to put all shaders in the vanilla data folder for the game to read them.

We can confirm the issue with the ground models as well, all custom ground units just stand there in a t-pose with seemingly no rskin shader applied.
evilbobthebob 5 Sep 4, 2017 @ 5:03pm 
Well I have it working in Phoenix Rising v1.2, you can subscribe to it to test and see what's there if you want.
i dont understand step 6 :(
< >
Showing 1-15 of 28 comments
Per page: 1530 50

Date Posted: Sep 2, 2017 @ 4:10pm
Posts: 28