PixelShaderGen: Sample the correct texture layer.