We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
PShape.getSpecular()
.getEmissive()
.getShininess()
...but PShape.getAmbient() does work, which is an important clue. This is an obscure bug but don't worry, I will make a PR to fix this.
PShape.getAmbient()
Those 3 methods return 0, regardless of what the PShape's material settings are.
0
Below is some code that demonstrates the problem.
size(300, 300, P3D); PShape s = createShape(); s.beginShape(); s.vertex(-100, -100, 0); s.vertex(100, -100, 0); s.vertex(100, 100, 0); s.vertex(-100, 100, 0); s.endShape(CLOSE); s.setAmbient(color(255, 204, 15)); s.setSpecular(color(13, 52, 29)); s.setEmissive(color(30, 20, 29)); s.setShininess(3); translate(150, 150); lights(); shape(s); println("AMBIENT", hex(s.getAmbient(0))); println("SPECULAR", hex(s.getSpecular(0))); println("EMISSIVE", hex(s.getEmissive(0))); println("SHININESS", s.getShininess(0));
The current output is:
AMBIENT FFFFCC0F SPECULAR 00000000 EMISSIVE 00000000 SHININESS 0.0
The expected output is:
AMBIENT FFFFCC0F SPECULAR FF0D341D EMISSIVE FF1E141D SHININESS 3.0
I see the problem and will make a PR for this.
The text was updated successfully, but these errors were encountered:
05eb929
Excellent, thanks! Merged for what will likely be 4.3.1 (or whatever comes after 4.3).
Sorry, something went wrong.
note about #781, #782
0726edc
No branches or pull requests
Description
...but
PShape.getAmbient()
does work, which is an important clue. This is an obscure bug but don't worry, I will make a PR to fix this.Those 3 methods return
0
, regardless of what the PShape's material settings are.Steps to Reproduce
Below is some code that demonstrates the problem.
The current output is:
The expected output is:
Your Environment
Possible Causes / Solutions
I see the problem and will make a PR for this.
The text was updated successfully, but these errors were encountered: