Wstecz
· 1 min czytania
2D global illumination
The gi pass on camera2d: soft light from every light2d and soft shadows from every occluder2d outline, through kiss3d's Gi2d.
- Dragos Balaur
post = ["gi"] on a camera2d lights the frame by marching rays from every pixel to every light, so shadows widen and soften with distance.

- Every
light2demits from a disc ofsource_radius, 0.25 world units by default. A spot has no cone here, and a directional light no form. - Every
occluder2doutline and every tile map wall blocks the light, up to 128 segments; up to 32 lights emit. gi_solverisray_march, a fan ofgi_raysper pixel, orcascades, probe grids that gather farther light for less.gi_temporal_blendkeeps 0.85 of last frame's light, andgi_downscalehalves the light field by default.- With
giin the list the light map does not draw, so nothing is lit twice.ambient_colorlights where no ray reaches. - The march steps in field pixels, so a world at 60 pixels to the unit resolves as finely as one counted in pixels.
[nodes.camera2d]
post = ["gi"]
gi_rays = 48
ambient_color = [0.02, 0.02, 0.03, 1.0]