Jump to content
  • Advertisement
Sign in to follow this  
derek7

shader question

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

1. If I write a simple vs, so the transform and light in fixed pipeling will be replace by vs in spite of my vs is simple or complex?? 2. many HLSL language built-in function all are run on GPU??

Share this post


Link to post
Share on other sites
Advertisement
To understand why and what is replaced you must know what you are doing...
When you are writing/coding a vertex shader you are replacing your transform and lighting stage and this means that you will disable that part of the fixed function pipeline.

The Transform and Lighting stage looks like this
World Transform : Objects are placed in the world
View Transform : Objects are relocated around the camera and the camera is the center of the world.
Lighting : Lighting gets applied to the objects (lighting calculations gets done)
Projection Transform : The View frustum is clipped into a cubiod to give the effect of projection.
This means that you are able to replace all these "models" by your own model such as calculating the light differently such as creating detailed effects like normal mapping (bump mapping technique) and so forth.

I hope this helps.
Take care.

Share this post


Link to post
Share on other sites

2. many HLSL language built-in function all are run on GPU??

I know D3DX lib (math lib etc..)are all run on cpu.
HLSL built-in function like (like abs, cos, ...seem to better run on cpu ) all run GPU?




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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!