Tried to apply changes to HLSL shader.

I couldn't test it, so check for typos please.