Builtin Library
- ..
- README.md986 B
- module.wgsl5.4 KB
README.md
particle_lighting
The light a particle takes from the scene it is drawn in, shared by the sprite and mesh particle shaders.
#include "@builtin::deprecated.deprecatedParticles.particle_lighting"
| Function | Answers |
|---|---|
zero_particle_point_light(input) | The multiplier the point lights near this fragment add — 1 outside every light's radius. |
zero_particle_scene_light(input) | The scene's own light at this fragment — the ambient term plus the sun through a wrapped diffuse. |
zero_particle_lit(input, rgb, light_influence, light_emission) | rgb with an emitter's two light declarations honoured. Both at 0 returns rgb unchanged. |
light_influence is how much of the scene's light the particle takes;
light_emission is how much of itself it emits regardless. A ParticleEmitter
carries them as lightInfluence and lightEmission, and the particle
materials this package ships read them from material properties of the same
names.