Sign in to follow this  
Funkymunky

assembly-style shader programming

Recommended Posts

well, yes of course there is a big difference...

what kind of difference do you mean? Its certainly harder to write a complex shader in assembly. If you are using ps 2.0 or a higher version, you'd have to be crazy or very technically assured to try to write assembly. These versions were made specifically for HLSL.

Sure its not hard to write a ps 1_1 shader that dose some basic stuff in assembly.. but modern shaders are normally far too complex to do it this way, and speed difference is probably minimal in most cases. Trust the compiler, unless something is clearly not working right.

Share this post


Link to post
Share on other sites
Defrag    175
Don't bother with anything but high level stuff these days. I think you'd have to be bonkers to consider writing ASM, yet strangely enough I still see a fair amount of people using ASM shaders. I've leafed through a few fairly recent shader books and many of the authors & chapters still persist with ASM shaders. It just obfuscates whatever it is they are trying to demonstrate and, IMO, it just serves to perpetuate ASM shaders' survival (as some people will read the book and see ASM, then say "hey there must be a reason ASM is used so I will use it too") when there's really little reason left to use anything other than high level stuff.

It is still useful to be able to read & understand ASM (particularly when you are targeting a shader model with a low instruction count and need to shave off a few ops) but I personally wouldn't bother unless there's something that pricks your interest, or you need to know. Well, that's the attitude I take anyway.

Share this post


Link to post
Share on other sites
Defrag    175
With any luck we won't have to endure sporadic chapters of ASM in shader books then :P (or even worse, chapter after chapter of ASM and the HLSL equivalent -- now that really is pointless).

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this