My First Shader™

I finally sat down and wrote a shader for my play project:


I still haven’t found any good example HLSL shaders for the other effects I’m planning, but it’s a start.

The only surprising thing I discovered is that the texture coordinates are independent of any source rectangle that you might be using.  So, make sure you calculate the real extents and hardcode them or pass them in as params…  (he said, as if he weren’t the only writing MS HLSL shaders for a Linux project)