Vertex Shaders and fixed function lighting.
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?
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.
so,in your particular case, you have to implement lighting and every other logic you want in your shaders.
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
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
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement