ASM vs HLSL Shaders

Started by
10 comments, last by S1CA 16 years, 8 months ago
Is there a proformance differnce between using ASM shaders and HLSL shaders? I know quite a bit of asm shaders but wanted to pick up a book on HLSL since it supposely a little easier to use.
Advertisement
Well I have used both ASM and HLSL shaders and to be honest I can't see any performance difference. I use HLSL exclusively because it is so easy to develop for. Also you can have the shader compiler generate the assembly source of the HLSL shader for comparison with your own assembler routines.
Thx like hearing from someone who has experenced both. That was the same reason I thinking about picking up HLSL for ease of use. I just didnt want it to take a performance hit. Thx I think I will pick up a book on HLSL now...
No problem, if you do take a performance hit it is more to do with your algorithm and or the way you are programming the shader in your code. I always check the generated assembler source to make sure the HLSL shader is doing what it should.
I prefer HLSL since it's relatively easier for me (since it blends with C), but I don't mind a little ASM every now and then, which is useful if you're working with D3D8 for some reason.

This book is what I used to get my feet wet with shaders. First it goes into detail of ASM shaders then begins to teach HLSL, providing several examples after and then a reference in the back.
The only reason to use ASM is if you have to make ps 1.x shaders. Otherwise use HLSL.
Quote:Original post by Matt Aufderheide
The only reason to use ASM is if you have to make ps 1.x shaders. Otherwise use HLSL.


Yea perty much I've decided to not support out of date systems already considering this project still has a few years till finish... actauly have a comment in my system enum check. "//No shader support... sucks to be you(exit)" So it looks like I got some reading ahead of me HLSL should be fun to learn...
If I ever get that message I will know who to strangle =)
Quote:"//No shader support... sucks to be you(exit)".


All games should have that.. mine has somehting similar as well for less than 2.0 support..
From what I've seen the HLSL compiler produces very good code. You'll be pushed to outcode it in asm.

This topic is closed to new replies.

Advertisement