Computes the sorting key for depth value (quantized) Reference: http://aras-p.info/blog/2014/01/16/rough-sorting-by-depth/
| 135 | /// Reference: http://aras-p.info/blog/2014/01/16/rough-sorting-by-depth/ |
| 136 | /// </summary> |
| 137 | FORCE_INLINE static uint32 ComputeDistanceSortKey(float distance) |
| 138 | { |
| 139 | const uint32 distanceI = *((uint32*)&distance); |
| 140 | return ((uint32)(-(int32)(distanceI >> 31)) | 0x80000000) ^ distanceI; |
| 141 | } |
| 142 | |
| 143 | // Calculates the update frequency and phrase for the given cached data (eg. cascaded shadow map or global sdf cascade contents). Lower data indices are updated first and more frequent. |
| 144 | static void ComputeCascadeUpdateFrequency(int32 cascadeIndex, int32 cascadeCount, int32& updateFrequency, int32& updatePhrase, int32 updateMaxCountPerFrame = 1); |
no outgoing calls
no test coverage detected