I pass a float param with value 0.00291545 to fragment shader. But fragment function got n/a.
In Xcode debugger's "Bound Resources" view, it shows that the value is 0.003
In Xcode shader debugger view, I made some tests. It shows that 0.0004 will be cast to 0 and 0.0005 will be casted to 0.001. The float value behaves like half value.
So, my question is:
Why 0.00291545 is first casted to 0.003, then casted to 0 ?
Why float value has the same precision with half ?
How could I use float value that has normal precision ?