Gamestudio Links
Zorro Links
Newest Posts
M1 Oversampling
by Petra. 04/24/24 10:34
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Data from CSV not parsed correctly
by EternallyCurious. 04/20/24 21:39
Scripts not found
by juergen_wue. 04/20/24 18:51
zorro 64bit command line support
by 7th_zorro. 04/20/24 10:06
StartWeek not working as it should
by jcl. 04/20/24 08:38
folder management functions
by VoroneTZ. 04/17/24 06:52
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (AndrewAMD, Ayumi, Quad, PeWi), 488 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Mega_Rod, EternallyCurious, howardR, 11honza11, ccorrea
19048 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