2 registered members (Ayumi, 1 invisible),
584
guests, and 1
spider. |
Key:
Admin,
Global Mod,
Mod
|
|
|
fxo compiler
#358670
02/12/11 18:15
02/12/11 18:15
|
Joined: Sep 2003
Posts: 9,859
FBL
OP
Senior Expert
|
OP
Senior Expert
Joined: Sep 2003
Posts: 9,859
|
The integrated shader compiling process appears to be crap. - it is not clear what needs to be done - the manual only comes up with: -fxo P A8 Kompiliert alle .fx-Effektdateien. Kompilierte Effekte können die Ladezeit des Levels sowie die Dauer der Materialerstellung deutlich reduzieren. Es werden nur Effekte, die einem sichtbaren Objekt zugewiesen sind, kompiliert. Ersetzen Sie zum Verwenden der kompilierten Effekte. die .fx effect file names in den Materialien durch .fxo
What is this fuzz about assigned to visible objects only? I want to compile my .fx files regardless to how I'm using them! - it simply does not seem to do anything. And the manual does not really help in finding out what I'm doing obviously wrong - I don't want to start the project in order to compile .fxo, then re-edit all .fx to .fxo in the scripts and then run the project again. This is major fail in workflow. When I changed some shaders I need to do the whole renaming process again or what? - why doesn't the engine automatically search for .fxo for any given .fx file and vice versa? I'm really annoyed right now.
|
|
|
Re: fxo compiler
[Re: Superku]
#358692
02/12/11 20:59
02/12/11 20:59
|
Joined: Oct 2004
Posts: 900 Lgh
rojart
User
|
User
Joined: Oct 2004
Posts: 900
Lgh
|
yes, I also had a small problem to get the fxo files, but this way should be work.
Add in SED->Options->Preferences->Command Line Options-> -fxo
Now run your current script as allways once, then the compiler will Compiles all .fx effect from your code files to .fxo files.
Close your Applications and Edit->Replace the .fx effect file names in the .fxo for using the compiled effects and test it again.
Last edited by rojart; 02/12/11 21:07.
|
|
|
Re: fxo compiler
[Re: rojart]
#358695
02/12/11 21:05
02/12/11 21:05
|
Joined: Sep 2003
Posts: 9,859
FBL
OP
Senior Expert
|
OP
Senior Expert
Joined: Sep 2003
Posts: 9,859
|
Unfortunately this does not work. It seems to be related to the fact, that I create everything dynamically and the fx filename is stored in a char array and not assigned to some entity...
And yes, I'm using the Pro version.
Last edited by Firoball; 02/12/11 21:07.
|
|
|
Re: fxo compiler
[Re: FBL]
#358700
02/12/11 21:21
02/12/11 21:21
|
Joined: Oct 2004
Posts: 900 Lgh
rojart
User
|
User
Joined: Oct 2004
Posts: 900
Lgh
|
Hmm strange, my fx and fxo files are in the same folder as my app.c too.
As example try to compile the fxo files with shadowmapping.c app from sample folder, it should compile in the same folder.
Last edited by rojart; 02/12/11 21:27.
|
|
|
Re: fxo compiler
[Re: FBL]
#360482
02/24/11 13:14
02/24/11 13:14
|
Joined: Aug 2000
Posts: 1,140 Baunatal, Germany
Tobias
Moderator
|
Moderator
Joined: Aug 2000
Posts: 1,140
Baunatal, Germany
|
I compile shaders all the time but never had the idea to replace .fx with .fxo in all scripts or to copy all fxo files to subfolders. The engine knows anyways if its an .fx or .fxo file to load, so why want you to replace all the names in the script? P If a precompiled effect (*.fxo) exists and is newer than the effect file (*.fx) from the material definition, the precompiled effect will be loaded. This will speed up material loading. It also makes it unnecessary to include the shader compiler (d3dcompiler_42.dll) in the published version when precompiled effects are included instead. The only thing you really need is your step 1. Of course you can also do all the other steps, but I dont think its required for the script, its more a personal hobby then . Shader compiling is highly recommended, it not only loads faster but your shader code is then protected, users cant decompile it. Otherwise even when you use WRS, the shader code can theoretically be ripped with a memory tool.
|
|
|
Re: fxo compiler
[Re: Tobias]
#360509
02/24/11 16:32
02/24/11 16:32
|
Joined: Sep 2003
Posts: 9,859
FBL
OP
Senior Expert
|
OP
Senior Expert
Joined: Sep 2003
Posts: 9,859
|
Where did you get this from? That's what my manual says: Kompiliert alle .fx-Effektdateien. Kompilierte Effekte können die Ladezeit des Levels sowie die Dauer der Materialerstellung deutlich reduzieren. Es werden nur Effekte, die einem sichtbaren Objekt zugewiesen sind, kompiliert. Ersetzen Sie zum Verwenden der kompilierten Effekte. die .fx effect file names in den Materialien durch .fxo
..and that's exactly what I had to do in order to get it to work... besides copying everything in place, since the compiled files were put to the project root, not to the folder where the original .x resides. This folder issue was the main cause for all the trouble, as I kept looking at the fx file and expected a fxo file pop up next to it... Still, workflow = terrible.
|
|
|
|