Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


#Actualgeorge7378

Posted 12 April 2013 - 01:01 PM

OK, I've been trying to implement some simple shaders today, and I can't get it working. Here are my problems:

 

- Do fixed function things like SetRenderState, etc.. still work if I use a shader too? Say I want to enable specular lighting alongside my simple diffuse lighting shader - can't I just enable specular lighting via SetRenderState? Do I now have to do all this stuff with my shader? The same goes for transforms - do I still need to use SetTransform to make my objects appear in the right place, or should this be done in the shader?

 

- I don't really get vertex declarations - I've been using FVFs up until now, but they don't seem to be used for shaders. How do I know what I need to have in my vertex declaration? What happens if I don't provide the right declaration?

 

Thanks.


#1george7378

Posted 12 April 2013 - 01:00 PM

OK, I've been trying to implement some simple shaders today, and I can't get it working. Here are my problems:

 

- Do fixed function things like SetRenderState, etc.. still work if I use a shader too? Say I want to enable specular lighting alongside my simple diffuse lighting shader - can't I just enable specular lighting via SetRenderState? Do I now have to do all this stuff with my shader?

 

- I don't really get vertex declarations - I've been using FVFs up until now, but they don't seem to be used for shaders. How do I know what I need to have in my vertex declaration? What happens if I don't provide the right declaration?

 

Thanks.


PARTNERS