ドキュメント

Unity Engine

Unity Engine

ColorPackedAsTwoFloats

The color of each particle, packed in a special format to allow decoding on GPUs that do not support bit-packing operations.
読み終わるまでの所要時間 1 分最終更新 1ヶ月前

Definition

  • Type: Field
  • Namespace: UnityEngine
  • Assembly: UnityEngine.ParticleSystemModule
ColorPackedAsTwoFloats = 47

Remarks

To unpack the color, use the following code:
float4 color = float4(floor(colorPacked.x) / 255, frac(colorPacked.x) / 0.999, floor(colorPacked.y) / 255, frac(colorPacked.y) / 0.999);
.