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
Evident here also: p5js.org/reference/#/p5/lights
The ambient lighting is absent, hence the rendering is much darker.
If ambientMaterial() is set to 255, then the gray returns to what we saw prior to 1.5.0
Cause:
Due to PR#5774, the default ambient color is now 0.
Line 98 in src/webgl/p5.RendererGL.js:
Thanks for filing this! I noticed this issue too, and found I had to add the same ambientMaterial call to my code. Your proposed fix of defaulting this to [1, 1, 1, 1] makes sense, if you want to make a PR with the change! Otherwise I can also make the change the next time I get around to doing some p5 dev work.
jwdunn1
added a commit
to jwdunn1/p5.js
that referenced
this issue
Nov 11, 2022
Most appropriate sub-area of p5.js?
p5.js version
1.5.0
Steps to reproduce:
note the ambient color
https://editor.p5js.org/jwdunn1/sketches/GZTNLHnPd
note the absence of ambient color (it's suddenly a black cube)
https://editor.p5js.org/jwdunn1/sketches/Um5DLsasQ
must set the ambientMaterial to 255
https://editor.p5js.org/jwdunn1/sketches/k6Pi7uvtm
Evident here also: p5js.org/reference/#/p5/lights
The ambient lighting is absent, hence the rendering is much darker.
If ambientMaterial() is set to 255, then the gray returns to what we saw prior to 1.5.0
Cause:
Due to PR#5774, the default ambient color is now 0.
Line 98 in src/webgl/p5.RendererGL.js:
Potentially repaired by setting this to be [1,1,1,1]
This would match both v1.4.2 and Processing 4.0.1
Snippet:
The text was updated successfully, but these errors were encountered: