shader files using #include

Posted By: Kartoffel

shader files using #include - 03/31/16 11:34

Hey there,

I noticed that using #include in a shader file works fine until you compile your application.
Once compiled the engine just crashes as soon as the shader gets compiled (i.e. when an object using the shader gets visible).

It's not a big deal since I'm going to join my shader files and compile them to .fxo-files when I'm done, but you might wanna look into this.
Posted By: FBL

Re: shader files using #include - 03/31/16 11:42

Hm... I think I once compiled some of the default shaders (they have several #include statements) to fxo without problems.
Also I regularly used the default shaders in compiled, published and also resourced projects without any problem noticed.

Are you including with <> or with ""?
Posted By: jcl

Re: shader files using #include - 03/31/16 11:48

What to you mean with "compile your application"? Compiling the shader, or publishing the application?

When you publish your game, you must manually include all files that are not automatically included. That's also all shader files that you need.
Posted By: Kartoffel

Re: shader files using #include - 03/31/16 13:43

Sorry, should have explained it a bit more precisely.

The crash is caused by uncompiled shaders (.fx-files) in a published application.

I've put all the required files are in the published folder.
Posted By: Kartoffel

Re: shader files using #include - 03/31/16 13:54

here's a small example: crash.zip
Posted By: jenGs

Re: shader files using #include - 03/31/16 14:06

I can confirm this. Had the same problem in a recent project.
Posted By: jcl

Re: shader files using #include - 04/01/16 12:29

Thanks for the example! I can confirm this problem - shader includes only work when they are compiled. We'll look into it in detail. Shader includes will be probably fully supported in the next update.

As a workaround, either compile the shader, or insert the code instead of an include.
Posted By: sivan

Re: shader files using #include - 08/08/16 07:15

Hi,
is there a date when it would be fixed?
Approx. 10-11 months ago I finished a new update for my MapBuilder (billboard model lod, some lighting fixes etc.), what I have wanted to release together with a new GitHub repository, but using no incudes in shaders or compiling them are no good in my case, I'm afraid it would break the workflow...
Posted By: jcl

Re: shader files using #include - 08/08/16 07:51

I have no ETA for the next update yet.
Posted By: sivan

Re: shader files using #include - 08/08/16 08:05

then is there a link to the previous engine version A8.46.2? I would move back and ask my users to do the same. (I have the installer on my disk but it would be better to use an official link)
Posted By: jcl

Re: shader files using #include - 08/08/16 08:13

Why would you want to do that?
Posted By: sivan

Re: shader files using #include - 08/12/16 11:48

in general, it would be great to have the links of the earlier versions available, they could be useful when one update has a bug stopping the project working as before. especially when updates are not so quick as before.
Posted By: jcl

Re: shader files using #include - 08/12/16 14:58

We don't want old versions to be around. Anyone should have the recent version. If one update really had a bug stopping the project working as before, then we would just fix that bug. Such a fix is normally released a few days after the buggy update, so I don't see why someone would need an old version.
Posted By: sivan

Re: shader files using #include - 11/03/16 10:18

Hi JCL, when can we get the bugfix update that cures the latest version what currently makes my project totally unusable?
Posted By: jcl

Re: shader files using #include - 11/04/16 15:05

Which bugfix update? Showstoppers of the last version have been all fixed as to my knowledge.
Posted By: sivan

Re: shader files using #include - 11/04/16 19:07

ahh, probably I missed that update, thanks
© 2024 lite-C Forums