SpriteTextureSampler vs s0
You know i think he should be using the sampler he defined using s0 makes things a bit unclear.
The s0 here is independent now from the texture so if two textures were used later that s0 will confuse a new person.
These lines go together because SpriteTextureSampler is a texture sampler that is linked to SpriteTexture.
Texture2D SpriteTexture;
sampler2D SpriteTextureSampler = sampler_state{ Texture = <SpriteTexture>; };
…
then later in the pixelshader
…
return tex2D( SpriteTextureSampler, input.TextureCoordinates) * input.Color;
so since people keep reading this i just wanted to point out when he says…
Lets add a sampler2d you’ll be using these pretty often
SpriteTextureSampler is a sampler that in this case is using s0 but doesn’t have to.
This can be confusing for shaders later on that may use more then one texture.
Since s0 isn’t linked to any texture in his definitions SpriteTextureSampler is.