Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
You should probably start a new question, since your problem has nothing to do with the first question. You should provide your image loading code, so that we can see what internal format and pixel transfer formats you're using. Something is definitely wrong with the image data being uploaded
If it works with DDS-loaded textures but not JPEG loaded textures then your problem is almost certainly in your image loading code, not the shaders or texture binding.
@MSalters Yes, floating point operations are often slower than integer operations, but that's irrelevant - 0.4 and 0.56 could just as easily be converted to use integer operations. Furthermore, on modern x86 hardware, most floating point operations (other than FDIV, FSQRT, and other transcendental functions) cost essentially the same as their integer versions: 1 or 2 cycles per instruction.