If you want to map the range [0,255] to [0,1], you need to divide by 255, not by 256. If you're storing the output in an 8-bit unsigned normalised texture, conversion from floating point will...