Setting effects variables in XNA

Posted by Badescu Alexandru on Game Development See other posts from Game Development or by Badescu Alexandru
Published on 2011-02-13T09:54:01Z Indexed on 2011/02/13 15:33 UTC
Read the original article Hit count: 409

Filed under:
|

Hello ! I am currently reading a book named "3D Graphics with XNA Game Studio 4.0" by Sean James and have some questions to ask :

If i create a effect parameter named lets say SpecularPower and have in my effect a variable named SpecularPower , if i do something like

effect.Parameters["SpecularPower"].SetValue(3)

That wil change the SpecularPower variable in my effect ?

And a second question, not regarding the book : If i have a spaceship and i've created a "boost" functionality that speeds up my spaceship, what effects should i implement to create the impresion oh high speed ? I was thinking of making everything except my spaceship blurry but i think there would be something missing . Any ideas ?

Regards, Alex Badescu

© Game Development or respective owner

Related posts about XNA

Related posts about effects