|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
#if SSS_RANDOM_ROTATION |
|
|
|
float startAngle = TWO_PI * GenerateHashedRandomFloat(asuint(centerPosVS)); |
|
|
|
// Previously, we used asuint(centerPosVS) as the seed. |
|
|
|
// This was not temporarily stable for some reason (pattern changed every frame), |
|
|
|
// even if both the camera and the scene were completely static. |
|
|
|
// Note that GenerateHashedRandomFloat() only uses the 23 low bits, hence the 2^24 factor. |
|
|
|
float startAngle = TWO_PI * GenerateHashedRandomFloat(uint3(pixelCoord, (uint)(centerDepth * 16777216))); |
|
|
|
#else |
|
|
|
float startAngle = 0; |
|
|
|
#endif |
|
|
|