Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Author
Message
nruser
18
Years of Service
User Offline
Joined: 22nd Dec 2007
Location: Serbia
Posted: 18th Apr 2010 21:34
How can I use fx files that I have made with FX Composer 2.5 in DBP?
I always get many errors like unexpected identifier and stuff.

If anyone wants to join my team and help me with development of my sci-fi fps game, please send me an e-mail.
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 18th Apr 2010 23:33
Quote: "I always get many errors like unexpected identifier and stuff."


An example would be more helpful. I've had no problems using shaders made with FX Composer 2.5.
nruser
18
Years of Service
User Offline
Joined: 22nd Dec 2007
Location: Serbia
Posted: 18th Apr 2010 23:50
simple enough, I used example that came with the FX Composer 2.5, the one with the tire. I made a FX file and tried to load it in FX mini browser that came as example with DBP. And it returned error.

If anyone wants to join my team and help me with development of my sci-fi fps game, please send me an e-mail.
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 19th Apr 2010 01:19
Why not give us the shader code so we don't waste time testing the wrong version?
nruser
18
Years of Service
User Offline
Joined: 22nd Dec 2007
Location: Serbia
Posted: 19th Apr 2010 17:14
here is fx file:

try testing this in FX mini browser

If anyone wants to join my team and help me with development of my sci-fi fps game, please send me an e-mail.
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 19th Apr 2010 18:38
Thanks.

Just tested it in the FX Browser but don't see any errors - but then it doesn't work either.

I then tested it in DarkShader and that gives the FX compiler errors you were probably talking about.

I think the shader is using some DirectX10 Shader Model 4 (SM4) commands or possibly some FX Composer specific functions. Using that assumption I commented out all the SM4 stuff plus anything else DarkShader objected to, i.e. lines such as




which you can reinstate if you wish using the usual SM2 syntax



I don't know enough about Shader Model 4 to tell whether the problem is with FX Composer specific stuff or just the use of SM4 itself.

Anyway, with those changes the shader compiles and runs in both FX Browser and DarkShader.

Here's the final code I tested:



I very rarely use FX Composer shaders in their original form. The first thing I do is prune out everything I don't need (or don't understand ). Then edit the rest into a form I find more readable.

I mainly find FXC useful as a source of ideas.

Login to post a reply

Server time is: 2026-07-26 07:36:16
Your offset time is: 2026-07-26 07:36:16