I have a not so old Asymptote code and my settings of currentlight do not longer work with a more recent version. This is the code:

currentlight = light(gray(0.85), ambient=black, specularfactor=3,
                     (0.5,0.5,1), specular=gray(0.6), viewport=false);
currentlight.background = rgb("363940ff");

The compilation complains about the usage of the light function. Something has changed?

1 Answer 1


Four years ago Asymptote upgraded from the Phong-Blinn lighting model to physically based rendering, which has no ambient attribute. The viewport argument was removed a few months before that. Just use

currentlight = light(gray(0.85), specularfactor=3,(0.5,0.5,1), specular=gray(0.6));

currentlight also accepts an optional background argument.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .