The BC4 shader takes in a uniform that acts as a channel selector. With a couple ternaries, it's used to determine which channel the shader should compress. Instead of relying on this uniform, it's possible to set a texture swizzle on the texture object to remap the desired channel for compression to red/x. Then, the ternaries can be dropped. For some drivers, this optimization can save a bit of math when executing the shader.
The BC4 shader takes in a uniform that acts as a channel selector. With a couple ternaries, it's used to determine which channel the shader should compress. Instead of relying on this uniform, it's possible to set a texture swizzle on the texture object to remap the desired channel for compression to red/x. Then, the ternaries can be dropped. For some drivers, this optimization can save a bit of math when executing the shader.