Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
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 (AndrewAMD, Ayumi), 853 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
lorikob361, LucasJoshua, Baklazhan, Hanky27, firatv
19054 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Including files in HLSL #362792
03/09/11 17:41
03/09/11 17:41
Joined: Jan 2002
Posts: 4,225
Germany / Essen
Uhrwerk Offline OP
Expert
Uhrwerk  Offline OP
Expert

Joined: Jan 2002
Posts: 4,225
Germany / Essen
Hello everybody,

I've got several .fx files in my project. These .fx files all have the same lighting algorithm in common, so that I wanted to extract that algorithm to another file and include that one in the others.

The MS HLSL documentation said that I could use a simple #include "file.fx" command to do this or alternatively #include <file.fx> when the file is on a path passed as a command line argument to the HLSL compiler. As I don't have influence on the command line arguments I simply placed two files in the same directory and included one into the other with #include "file2.fx". However, the compiler throws an error message he cannot find the included file.

Is there anything specific I have to take care of in GameStudio?


Always learn from history, to be sure you make the same mistakes again...
Re: Including files in HLSL [Re: Uhrwerk] #362799
03/09/11 17:56
03/09/11 17:56
Joined: Jul 2010
Posts: 974
United Arab Emirates, Dubai
TheShooter Offline
User
TheShooter  Offline
User

Joined: Jul 2010
Posts: 974
United Arab Emirates, Dubai
I guess with the newest A8 version can you write more than one shader in one .fx file. Or was it the 8.11 beta? Dont know, sry. took a look on the forecast.


Staub ist das neue Prime!!

Programming is like sex:
One mistake and you have to support it for the rest of your life.

Aktuelles Projekt: http://thisiswargame.bplaced.net/index.html

A8 Commercial *freu*
Re: Including files in HLSL [Re: TheShooter] #362802
03/09/11 18:05
03/09/11 18:05
Joined: Jan 2002
Posts: 4,225
Germany / Essen
Uhrwerk Offline OP
Expert
Uhrwerk  Offline OP
Expert

Joined: Jan 2002
Posts: 4,225
Germany / Essen
I know, but I'd prefer different files in terms of clarity.


Always learn from history, to be sure you make the same mistakes again...

Moderated by  Blink, Hummel, Superku 

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