When is the best time to learn vertex/pixel shading?

Started by
11 comments, last by Khatharr 11 years, 3 months ago

What does he mean when he says the "assembly way", I thought it was all HLSL?

Advertisement
Should I learn it early on (like on the early stages of a first game)? Or later (like mastered the DX fixed functions and have created some games)? Should I learn the assembly like way first then HLSL, or HLSL first then the assembly like way?
The challenge in graphics is understanding the math going on behind the scenes, not mastering any given API, whether DX, OGL, HLSL etc. Using shaders, or GPU acceleration in general, is just a matter of getting the same things done faster. The advice I have been given by my professor is to do everything on the CPU while you are figuring it out - keeping things simple and nice to debug - and move it to the GPU later if and when you actually need performance.

In short, I think messing with shaders is quite likely going too far into technical detail for a first game.
What does he mean when he says the "assembly way", I thought it was all HLSL?

HLSL is an easier (higher level) method of implementing shaders. Prior to HLSL you could just write GPU targeted assembly and assemble it the same way HLSL is compiled now. The assembly methods still exist and function correctly, but they don't really allow you to do much that HLSL doesn't unless you're really really into fiddling with individual registers and such. It's not even the same kind of assembly that you'd write for the CPU - it's a specific assembly language developed for use almost the same way that you'd use HLSL. In the end it's just a more complicated way of doing the exact same things.
void hurrrrrrrr() {__asm sub [ebp+4],5;}

There are ten kinds of people in this world: those who understand binary and those who don't.

This topic is closed to new replies.

Advertisement