You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
By default, the alpha value of the particle (built from `textureAlpha * particleColorAlpha`) is used as the index to get the ramp color from the ramp gradient using this formula: `finalColor = textureColor * particleColor * rampColor`.
44
46
45
-
Ramp gradient: <Playgroundid="#0K3AQ2#3944"title="Ramp Gradient Example"description="Simple example of using ramp gradients."/>
47
+
Ramp gradient: <Playgroundid="#I2D9MM#17"title="Ramp Gradient Example"description="Simple example of using ramp gradients."/>
46
48
47
49
To give you more control, you can use a remap function to change the index over time with:
The color remap gradients define a min and max that will vary over the particle lifetime. The index is then remapped from [min, max] to [0, 1] with this formula: `finalIndex = clamp((index - min) / (max - min), 0.0, 1.0)`.
64
66
65
-
With remap over lifetime of particle: <Playgroundid="#0K3AQ2#3945"title="Ramp Gradient With Remap Over Lifetime"description="Simple example of using ramp gradients with a remap over the lifetime of the particle."/>
67
+
With remap over lifetime of particle: <Playgroundid="#E3VU3R#1"title="Ramp Gradient With Remap Over Lifetime"description="Simple example of using ramp gradients with a remap over the lifetime of the particle."/>
66
68
67
69
Ultimately, you can also remap the alpha value generated per pixel with:
68
70
@@ -117,4 +119,4 @@ Billboard mode Y - steam: <Playground id="#B9HKG0#28" title="Billboard Mode Y" d
117
119
Billboard false - spherical: <Playgroundid="#EV0SEQ#39"title="Billboard Mode False"description="Simple example of setting billboard mode to false."/>
118
120
Multiply blend mode - smoke pillar: <Playgroundid="#KUDH9F#46"title="Multiply Blend Mode"description="Simple example of setting particle blend mode to multiply."/>
119
121
Add blend mode and billboard mode stretched - sparks (select scene, press space): <Playgroundid="#M1HYFH#10"title="Add Blend Mode And Stretched Billboard Mode"description="Simple example of setting particle blend mode to add and billboard mode to stretched."/>
120
-
Ramp and blend - explosion (select scene, press space): <Playgroundid="#XPVJMM#3"title="Ramp and Blend"description="Simple example of a ramp and blend."/>
122
+
Ramp and blend - explosion (select scene, press space): <Playgroundid="#XPVJMM#5"title="Ramp and Blend"description="Simple example of a ramp and blend."/>
0 commit comments