I am implementing SDSM and in a GLSL compute shader I need to min/max vec3 values to compute the shadow map bounds. The sample implementation (in HLSL) uses vectors in "light space" that spans from 0-1 and then casts them with touint (in GLSL uintBitsToFloat) so that it can call InterlockedMinMax (atomicMin/Max) with them.
I was wondering if it is a better idea to quantize the values to an uint using the bounding volume in light space as uints instead of moving them into the 0-1 range so integer min/max works on the float bit pattern?
On the one hand using float bits in unit throws about about 2/3 the precision, because the sign bit and exponent are ignored. On the other hand almost all algorithms I came up to quantize the values somehow go past the 0-1 float range and would probably loose the precision anyway.