Gamestudio Links
Zorro Links
Newest Posts
ZorroGPT
by TipmyPip. 03/28/26 14:01
TMFs on options in live trading
by Spirit. 03/26/26 19:52
TDAmeritrade plugin with new Schwab accountt?
by AndrewAMD. 03/24/26 17:11
Black Book, 4th edition
by jcl. 03/17/26 09:28
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
2 registered members (Grant, 1 invisible), 3,483 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
mredit, vestriaa, Lukudo, mldenoiser, the1
19204 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
PP Shader with more than 4 parameters #432317
11/04/13 19:34
11/04/13 19:34
Joined: Mar 2007
Posts: 197
Y
yorisimo Offline OP
Member
yorisimo  Offline OP
Member
Y

Joined: Mar 2007
Posts: 197
I am building a postprocessing (pixel) shader that needs more than 4 parameters. The manual specifies use of the material's vecSkill1 (skill1-skill4) to modify parameters. This works for me, but only allows 4 parameters to be passed. How can I pass more information?

Re: PP Shader with more than 4 parameters [Re: yorisimo] #432321
11/04/13 19:42
11/04/13 19:42
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
What I normally do (instead of using Material skills) is define vars (or floats or VECTORs) in lite-C and use those in the shader as follows:

var game_time = 0;
...
while(1)
{
game_time += time_frame;
wait(1);
}

Shader:

float game_time_var; // the _var / _flt feature is explained in detail in the manual

return (0.5+0.5*sin(game_time_var)); // pixel shader


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: PP Shader with more than 4 parameters [Re: Superku] #432322
11/04/13 19:56
11/04/13 19:56
Joined: Mar 2007
Posts: 197
Y
yorisimo Offline OP
Member
yorisimo  Offline OP
Member
Y

Joined: Mar 2007
Posts: 197
Thanks! Looks like that should work. Didn't know about this feature laugh


Joris Lambrecht
My Contributions: Relative Rotation, Window Sizing
Re: PP Shader with more than 4 parameters [Re: yorisimo] #432324
11/04/13 20:14
11/04/13 20:14
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
Kartoffel Offline
Expert
Kartoffel  Offline
Expert

Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
there's also vecSkill5, 9 and 13 and 17


POTATO-MAN saves the day! - Random
Re: PP Shader with more than 4 parameters [Re: Kartoffel] #432326
11/04/13 20:26
11/04/13 20:26
Joined: Mar 2007
Posts: 197
Y
yorisimo Offline OP
Member
yorisimo  Offline OP
Member
Y

Joined: Mar 2007
Posts: 197
Thanks. That works too. I misread the manual. I was trying to use vecSkill2 which doesn't exist


Joris Lambrecht
My Contributions: Relative Rotation, Window Sizing

Moderated by  Blink, Hummel, Superku 

Gamestudio download | 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