Jump to content
  • Advertisement
Sign in to follow this  
howie_007

disillusioned by vertex shaders

This topic is 3025 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm rather unhappy by this assuming I'm correct. Just by the act of using a vertex shader, I now have to do the transformations and lighting, in addition to what ever the effect is that I'm trying to do. bah. The transformations is not that big a deal but to have to also replace the current lighting with my own now.... sigh. [Edited by - howie_007 on March 5, 2010 10:14:15 AM]

Share this post


Link to post
Share on other sites
Advertisement
Correct. There used to be shaders somewhere (NVidia or ATI's site) which were just the fixed function pipeline in shader form - they might be a good starting point.

On the plus side, you're not limited to 8 dynamic lights any more...

Share this post


Link to post
Share on other sites
Quote:
Original post by Evil Steve
On the plus side, you're not limited to 8 dynamic lights any more...
And potentially a bigger plus, you can implement per-pixel lighting fairly trivially.

Share this post


Link to post
Share on other sites
Quote:
Original post by Evil Steve
On the plus side, you're not limited to 8 dynamic lights any more...

That is a plus but I didn't factor this into my engine design. This is one of those "all or nothing" decisions and now you have the added overhead of passing in the light data. uuugghh.

Share this post


Link to post
Share on other sites
Quote:
Original post by swiftcoder
And potentially a bigger plus, you can implement per-pixel lighting fairly trivially.

That is true but I have a feeling that would cost some serious FPS.

Share this post


Link to post
Share on other sites
Quote:
Original post by howie_007
Quote:
Original post by Evil Steve
On the plus side, you're not limited to 8 dynamic lights any more...

That is a plus but I didn't factor this into my engine design. This is one of those "all or nothing" decisions and now you have the added overhead of passing in the light data. uuugghh.
The overhead is no more than it was with the fixed function pipeline; you just need to pass the light data in as a global.

Share this post


Link to post
Share on other sites
I for one, never regret rewriting everything to use shaders and completely abandon the fixed function pipeline. :) The FFP code was unflexable and in the most part black magic, as I did't understand how some stuff worked and why. Shaders actually open you eyes and untie your hands :)

Share this post


Link to post
Share on other sites
Quote:
Original post by howie_007
Quote:
Original post by swiftcoder
And potentially a bigger plus, you can implement per-pixel lighting fairly trivially.
That is true but I have a feeling that would cost some serious FPS.
On even moderately modern hardware, you won't notice the hit.

Simple per-pixel lighting involves one square root and two dot products in the pixel shader - certainly lower cost than any other pixel-shader effect you will be implementing.

Share this post


Link to post
Share on other sites
Quote:
Original post by Evil Steve
Correct. There used to be shaders somewhere (NVidia or ATI's site) which were just the fixed function pipeline in shader form - they might be a good starting point.


It was ATI. [smile]

Share this post


Link to post
Share on other sites
Quote:
Original post by MJP
It was ATI. [smile]

Thanks for providing a link to that. Thanks to all helping me "get my mind right" about adopting the vertex shader for standard lighting. One other benefit I now see for this is if you do your transformations first, you don't have to translate your light position based to your model in model space. One of my big gripes with DirectX.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!