Skip to content

Alpha blending broken in OpenGL renderer? #2051

Description

@sebhunt

[On a MacBook Pro/Mac OS 10.7.5]

Transparency is not working as I would expect. The following two images are from a sketch (below) which draws some intersecting circles; each circle is rotated 5 degrees out of the plane of the previous circle and fill(255,0,0,64) is in effect for all three. The first image is generated with 1.5.1 using P3D; this is what I would expect. The second is what I get with 2.0.2 using P3D and also 1.5.1 using OPENGL. I had initially thought this might be related to #2021 and fixed by #2023, but it seems not.

Apologies if this is a well-known issue (which I would have thought, given it is in 1.5.1) but Google has not been my friend so far.

alpha_bug_1-5-1

alpha_bug_0221

void setup() {
  size(700, 700, P3D);
  noLoop();
}

void draw() {
  background(255);
  ellipseMode(CENTER);
  noStroke();
  fill(255,0,0,64);
  translate(width/2, height/2, 0);
  rotateX(radians(-20));
  rotateY(radians(5));
  ellipse(0, 0, 600, 600);
  rotateY(radians(5));
  ellipse(0, 0, 300, 300);
  rotateY(radians(5));
  ellipse(0, 0, 150, 150);
}

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions