I'm seeing general problems rendering alpha colors for stokes and fills in Processing 2+ 3D Java mode.
Consider the following test sketch, in which all colors are rendering as fully opaque:
- Vert[] vertices;
- float rot_y = 0.0;
- void setup(){
- size(800, 800, P3D);
- smooth();
- vertices = new Vert[20];
- for (int i = 0; i < vertices.length; i++){
- vertices[i] = new Vert(random(width/2),random(height/2),random(width/2));
- }
- }
- void draw(){
- background(255);
- stroke(0,10); // should be alpha value of 10
- fill(0,10); // should be alpha value of 10
- strokeWeight(10);
- pushMatrix();
- translate(width/2, height/2, 0);
- pushMatrix();
- rotateY(rot_y);
- translate(-width/2, 0, 0);
- beginShape();
- for (int i = 0; i<vertices.length; i++){
- vertex(vertices[i].x, vertices[i].y, vertices[i].z);
- }
- endShape(CLOSE);
- sphere(200);
- popMatrix();
- popMatrix();
- rot_y += .01;
- }
- class Vert {
- private float x, y, z;
- Vert(float x_pos, float y_pos, float z_pos) {
- this.x = x_pos;
- this.y = y_pos;
- this.z = z_pos;
- }
- }
Does anyone know if this this a known issue with Processing 2+?