Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (7th_zorro), 927 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 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