Sign in to follow this  
mortiz01

Vertex Shaders and fixed function lighting.

Recommended Posts

Hi, when I use my (simple) vertex shader to transform objects from world into projection space I'm completely losing all fixed function lighting. Is this a trade-off to using vertex shaders or is there a way to keep it?

Share this post


Link to post
Share on other sites
Passing the moment when you start using shaders you are completely giving up your FF functionality, but, that's why the shaders are here :) you are able to have absolutely(ok,i know i know, not absolutely but nearly :) )everything under control.
so,in your particular case, you have to implement lighting and every other logic you want in your shaders.

Share this post


Link to post
Share on other sites
Just to add to that - Fixed Function and Shaders are, for the most part, mutually exclusive. You can't mix-n-match [smile]

However, implementing parts (or all) of the fixed function lighting is not too complex. Have a search around for "Blinn-Phong" lighting or, if you have a recent SDK dig around in the "FixedFuncEmu" sample - it's for D3D10 but the maths should be extractable.

hth
Jack

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this