Quote: "Any help?"
I took the time to write a thoughtful response, including 6 references to what I feel are the best HLSL learing resources available. A simple thanks would have been nice.
Quote: "Hey Bond, would your shader work well on dynamic entities, liklke crates?
"
Yes, but you will have to modify the vertex shader portion of the fx file, the pixel shader portion will work as is. You'll need to remove the GPU skinning portion of the vertex shader. You'll probably want to remove the animated glow from the pixel shader too, and substitute some generic self-illumination instead (you'll see I've commented this line out).
Of the references I listed, two are the most important for starting out. The first DVD I mentioned does a great job of explaining the structure of an HLSL file. I've wathced this DVD 3 times to ingrain it in my memory.
Then get the book
3D Math Primer for Graphics and Game Development. You'll need this to get a good understanding of the math involved. The great thing about the book is that it gives the
geometric interpretation of the equations. The actual math isn't important because it is automatically calculated in the code. What IS important is the geometric implications. For example, when you see a calcuation of a dot product between two vectors in a shader, you'll know that it is probably calculating some type of diffuse lighting equation. Hope this helps.
EDIT: You'll need to modify the texture portion too. Guns use the D/N/R suffixes. Other entities use the D/N/I/S suffixes.
----------------------------------------
"bond1 - You see this name, you think dirty."