difference bewteen the vs code , hlsl and effect

Started by
5 comments, last by davidx9 19 years, 7 months ago
i am not clear about the difference beween vs code( ps code ) and hlsl. what is the difference betwwen the effect and vs code. vs code is like asm, and hlsl is more simple than it. They do the same thing? Is there the only diffence beween them? Effect cound be generated from vs code and hlsl, It is the high abstract of vs or hlsl ? i am not sure. Who can give a clear answer. I have read the sdk. I know each of them, but don't know the difference about them. Thans in advance.
Advertisement
I have never used any of them, but this is how i understand the difference....

if a vs/ps is like assambler,then hlsl is like c++.
i think hlsl is compiled to vs/ps on runtime,
and can addapt to the pressent hardware.

hlsl is a higher level language then vs/ps, so sais the name.
(high level shader language)

i dont know if hlsl contains more information then vs/ps
-Anders-Oredsson-Norway-
PS and VS asm is equivalent to processor specific machine code

HLSL therefore, is equivalent to a language like C, it is compiled to create PS and VS asm code.

Effects are a way of combining HLSL, PS & VS asm, render states and multiple render passes, externally form your rendering engine, so they can be modified without re-writing executable program code.

This also allows users to use specific effects that their graphics cards can handle, whilst using more optimised effects for those that can't.
No bombs, No guns, just an army of game creators...
Thanks for your explains.
Do you think that the hlsl is only higher language than vs(ps),
there is no other difference ? They play the same roles?

vs(ps) can uesed in d3d sperately(not in effect), and can used in effect, Is there differenct in them ? Can they both run on GPU?

Quote:
This also allows users to use specific effects that their graphics cards can handle, whilst using more optimised effects for those that can't.

Useing effect can changed to optimised effects for those they can't use this effects automatically? the question may be very foolish ? i am a newbie. -:)

the hlsl only used in effect?


If i used vs(ps) separetely (not in effect), i also can update my render code by vs file(or ps file). Is there difference with the effect file?

Thanks!
If you're good with vs/ps-asm then you could have a little bittle performance gain. But with the HLSL-compilers getting better, I think you should think about stepping over, since HLSL is much cleaner.
Quote:Original post by Pipo DeClown
If you're good with vs/ps-asm then you could have a little bittle performance gain. But with the HLSL-compilers getting better, I think you should think about stepping over, since HLSL is much cleaner.


Thanks!
Now i only used vs(ps) in the past. I never used effect.So i am not sure where is difference between them.The code used vs(ps) can be runned on GUP, and the effect also can be runned on GPU.
If i used fixed shader pipe, will it can be runned on GPU? -:)
Thanks!

HLSL can only be used as an effect.

You can define the effect anywhere, external file, in memory, as a resource. DirectX has lots of ways of loading them.
No bombs, No guns, just an army of game creators...

This topic is closed to new replies.

Advertisement