Gamestudio Links
Zorro Links
Newest Posts
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (Ayumi, 1 invisible), 584 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
fxo compiler #358670
02/12/11 18:15
02/12/11 18:15
Joined: Sep 2003
Posts: 9,859
F
FBL Offline OP
Senior Expert
FBL  Offline OP
Senior Expert
F

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:
Quote:

-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: FBL] #358676
02/12/11 18:39
02/12/11 18:39
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
I did not try it, yet, but I thought you could just pre-compile a single effect file.
If not, that's indeed bullshit.


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: fxo compiler [Re: Superku] #358692
02/12/11 20:59
02/12/11 20:59
Joined: Oct 2004
Posts: 900
Lgh
rojart Offline
User
rojart  Offline
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.

Regards, Robert

Quote
Everything should be made as simple as possible, but not one bit simpler.
by Albert Einstein

PhysX Preview of Cloth, Fluid and Soft Body

A8.47.1P
Re: fxo compiler [Re: rojart] #358695
02/12/11 21:05
02/12/11 21:05
Joined: Sep 2003
Posts: 9,859
F
FBL Offline OP
Senior Expert
FBL  Offline OP
Senior Expert
F

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] #358697
02/12/11 21:14
02/12/11 21:14
Joined: Sep 2003
Posts: 9,859
F
FBL Offline OP
Senior Expert
FBL  Offline OP
Senior Expert
F

Joined: Sep 2003
Posts: 9,859
Ah... it DOES compile... it just doesn't place the fxo file in the same location as the original fx file.


WHY
DO I
ALWAYS
HAVE
TO COPY
THINGS
AROUND
MAUALLY
!?

This is soooooooooooooo annoying.

Re: fxo compiler [Re: FBL] #358700
02/12/11 21:21
02/12/11 21:21
Joined: Oct 2004
Posts: 900
Lgh
rojart Offline
User
rojart  Offline
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.

Regards, Robert

Quote
Everything should be made as simple as possible, but not one bit simpler.
by Albert Einstein

PhysX Preview of Cloth, Fluid and Soft Body

A8.47.1P
Re: fxo compiler [Re: rojart] #358701
02/12/11 21:27
02/12/11 21:27
Joined: Sep 2003
Posts: 9,859
F
FBL Offline OP
Senior Expert
FBL  Offline OP
Senior Expert
F

Joined: Sep 2003
Posts: 9,859
I'm using add_folder(), that's probably the reason.

Re: fxo compiler [Re: FBL] #358708
02/12/11 21:42
02/12/11 21:42
Joined: Sep 2003
Posts: 9,859
F
FBL Offline OP
Senior Expert
FBL  Offline OP
Senior Expert
F

Joined: Sep 2003
Posts: 9,859
So the right way to do it is this:

- add -fxo in SED preferences
- run script one time, exit right away
- replace .fx with .fxo in all your scripts
- copy all .fxo files from the project root to the appropriate subfolders
- before starting again make sure to remove -fxo from SED preferences unless you want to read many many weird warnings
- if you need to change a shader replace .fxo with .fx in all your scripts
- repeat all the steps above

- cry because of the non existent workflow



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 Offline

Moderator
Tobias  Offline

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?

Quote:
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 grin.

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
F
FBL Offline OP
Senior Expert
FBL  Offline OP
Senior Expert
F

Joined: Sep 2003
Posts: 9,859
Where did you get this from?

That's what my manual says:

Quote:

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.

Page 1 of 2 1 2

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1