Skip to content

Fix default fill color blowing out lighting in WebGL mode #7673

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 26, 2025

Conversation

davepagurek
Copy link
Contributor

@davepagurek davepagurek commented Mar 26, 2025

The buildGeometry example in the Creating Custom Geometry tutorial wasn't rendering anything. Turns out this is because the default fill color is defined as new Color([255, 255, 255]), but this is with assumed maxes of 1, not 255, so the lighting gets super blown out.

This corrects it to be in the correct scale, and corrects the implementation of color._array, which assumed RGB mode previously: https://editor.p5js.org/davepagurek/sketches/kKAmzvZDc

@davepagurek davepagurek merged commit 2890d64 into dev-2.0 Mar 26, 2025
2 checks passed
@davepagurek davepagurek deleted the fix/default-fill branch March 26, 2025 00:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant