I'm making some idiot mistake.
but i noticed some strangeness when passing a double to shiftOut.
To use your words, yes, you are making some idiot mistake. The shiftOut function expects an integer value. Why are you passing it a double?
When posting code, at least post enough of it to let us see what the problem is.
In the snippet you posted, the types of sensorValue, sensorPinValue, lv, and ltLevel are not defined.
The analogRead function returns an integer. Then, you divide that value by 128 (an integer value), resulting in an integer value. Then, you pass that integer to round(). That was a waste of a function call.
As drhex pointed out, there are far faster, more efficient bit manipulation techniques that using pow(). Look at bitSet, bitWrite, bitClear, and bitRead.
Paying attention to types will pay off in the long run, too.