I figured the color value 255 = 1.0, 0 = 0.0, and all other values fall somewhere in between. For testing purposes I created a simple gradient texture that ranges from 0,0,0,0 to 255,255,255,255 (RGBA). In my shader (using strumpy editor) I Tex2D the sample texture, Split the RGBA out to separate components, and then I Step (ie. compare) the X to the value 1.0 (255) and output that to emission. What this does is simply check the red channel to see if it is a 1.0 (255) and if it is then render it, otherwise render black. I expect to see every part of my gradient rendered black except for the last portion of the gradient which is 255,255,255,255. Instead, I see both 255 AND 254 portions of my gradient showing up! What the funk!!! Do both values 254 and 255 map to 1.0???
edit : I just did more testing and it seems as if every 2 color values (ie. 0 1, 2 3, … , 254 255) map to the same floating point range! This can’t be right so either I must be doing something very wrong or Strumpy has a bug.
.