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.

Newcomers DBPro Corner / How do I manipulate an FX file from DBPro

Author
Message
sriveros
17
Years of Service
User Offline
Joined: 27th Jul 2007
Location: Edmonton, Alberta
Posted: 15th Feb 2008 16:15 Edited at: 15th Feb 2008 16:30
There is a line of code in the FX file that reads



How do I tweak this line of code dynamically from within DBPro?

I tried a few combinations like...


or


But it didn't work. If the FX code was like this...



then I would know to do this...



but this time it's so different.
AndrewT
17
Years of Service
User Offline
Joined: 11th Feb 2007
Location: MI, USA
Posted: 15th Feb 2008 18:16
You have to make a vector2:



Then, set the values like this:



Hope that helps.
sriveros
17
Years of Service
User Offline
Joined: 27th Jul 2007
Location: Edmonton, Alberta
Posted: 15th Feb 2008 22:40 Edited at: 16th Feb 2008 01:00
Thanks for your help.

The compiler does not seem to understand the command:



But if I remove the "2" it compiles and then the program crashes with a Runtime Error 7801 - Vector does not exist at line 83 which makes since.

How do I get it to understand a vector2?

I looked in the DarkBASIC Professional Help and only found a syntax for:

SET EFFECT CONSTANT VECTOR Effect Number, Constant String, Vector Number

And there is nothing with for vector2.

Do you thing I need to update my compiler?

It looks like this right now...

sriveros
17
Years of Service
User Offline
Joined: 27th Jul 2007
Location: Edmonton, Alberta
Posted: 16th Feb 2008 00:58 Edited at: 16th Feb 2008 01:00
I figured it out... AndrewT was using a Vector2 in DarkBasic, while shaders use Vector4. This is why it was not liking up and the compiler could not understand.

I changed it to...



This works...
AndrewT
17
Years of Service
User Offline
Joined: 11th Feb 2007
Location: MI, USA
Posted: 19th Feb 2008 20:06
Ahh, ya, sorry bout that, I was a bit tired.

Login to post a reply

Server time is: 2024-11-25 07:20:57
Your offset time is: 2024-11-25 07:20:57