Skip to main content

camera2d

2d · render · 15 properties · 2D

The orthographic camera a flat scene is drawn from. zoom scales it, ambient lights every 2D surface, and the last current camera wins.

In a scene, camera2d is the node key that applies it. A script reaches each property below as a field on node.camera2d: reading one asks the running component, and assigning one leaves the rest alone. The whole table is node.camera2d.get() and node.camera2d.set(table).

Properties

propertytypedefaultdescription
aberration_amountfloat0.004How far aberration slides red from blue at the frame's edge, as a fraction of it At least 0.
ambientcolor[0,0,0,1]Light every 2D surface gets before any light2d
bloom_intensityfloat0.6How much of the bloom is added back over the frame At least 0.
bloom_thresholdfloat1Brightness a pixel has to pass to bloom At least 0.
currentbooltrueWhether this camera drives the view; the last current one wins
grain_amountfloat0.06How much the grain pass lightens and darkens a pixel At least 0.
pixelate_sizefloat4The side of one block the pixelate pass reads the frame back in, in pixels At least 1.
poststrings[]The frame's passes, in order. bloom, ssao, ssr, dof, fxaa, sharpen, tonemap, vignette, aberration, grain, pixelate name the engine's own -- ssao, ssr and dof are 3D only, and where each physically runs is fixed by the pipeline. Any other name is a material asset drawn over the whole frame, and those run in the order given. tonemap is where the film becomes a picture: a material before it works in linear light and is what blooms, one after it works on the finished frame, and a list that does not name it has it at the head
ssao_biasfloat0.025How far in front of a surface a sample must be to occlude it. Too small and a glancing surface occludes itself into black At least 0.
ssao_intensityfloat1.2How strongly the ssao pass darkens At least 0.
ssao_powerfloat1.5The contrast the occlusion is raised to At least 0.001.
ssao_radiusfloat0.5How far the ssao pass looks for something occluding a point, in world units. Scale it with the scene At least 0.001.
vignette_amountfloat0.35How dark the corners go under the vignette pass Range 0–1.
vignette_roundnessfloat11 darkens in a circle whatever shape the frame is; 0 follows the frame Range 0–1.
zoomfloat60Zoom in logical pixels per world unit At least 0.01.