Jump to content
  • Advertisement
Sign in to follow this  
PdG

Lighting: Shader versus API

This topic is 3815 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

Hi. I'm reading the (very good) book of F.Luna: "introduction to 3d game programming with directx 9.0c, a shader approach", and i've learned to implement the lights illumination using vertex shaders. Then, i've discovered that there is already inside directx some class that implements illumination, and i presume also texturing and so on, without using HLSL. Now i wonder: what is the more efficent approach? HLSL is more flessible but also more difficult, you've to define all the equations of lighting and texture mapping. And performance? The graphics card has the T&L implemented by hardware.. also shaders are executed by GPU. So, what is the right way?

Share this post


Link to post
Share on other sites
Advertisement
It's been a long time since GPU's had seperate/dedicated Shader and Fixed Function hardware. Off the top of my head it was Nvidia's GeForceFX range that last did this.

As a consequence the performance difference is likely to be unmeasurable as the driver just translates FFP commands into shader instructions. If you're interested, look up the FixedFuncEmu sample in the DirectX SDK - it's for D3D10, but the HLSL is much the same.

Go with shaders - yes they've got a steeper learning curve and yes they're a little more tricky to deal with but they are the future. Direct3D 10 does NOT support this built-in fixed function pipeline, so you're better off just making the jump now if you're new to the whole D3D environment.

hth
Jack

Share this post


Link to post
Share on other sites
Quote:
Original post by jollyjeffers
It's been a long time since GPU's had seperate/dedicated Shader and Fixed Function hardware. Off the top of my head it was Nvidia's GeForceFX range that last did this.

As a consequence the performance difference is likely to be unmeasurable as the driver just translates FFP commands into shader instructions. If you're interested, look up the FixedFuncEmu sample in the DirectX SDK - it's for D3D10, but the HLSL is much the same.

Go with shaders - yes they've got a steeper learning curve and yes they're a little more tricky to deal with but they are the future. Direct3D 10 does NOT support this built-in fixed function pipeline, so you're better off just making the jump now if you're new to the whole D3D environment.

hth
Jack


Thank you very much, you was very precious.

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!