hello guys!
i’ve a problem…i’m try to blend with mode ADD some png images in a 3d space, the problem is that it create artifacts, and transparency of background is removed
class Particle {
PVector pos;
PImage img;
Particle() {
img = loadImage("reflection.png");
img.resize(img.width/20, img.height/20);
}
void display(PVector pos, float size) {
this.pos = pos;
pushMatrix();
translate(0, 0, pos.z);
image(img, pos.x, pos.y, size, size);
popMatrix();
}
}
import peasy.*;
ParticleSystem ps;
PeasyCam cam;
int numParticles = 2000;
void setup() {
size(1920, 1080, P3D);
cam = new PeasyCam(this, 400);
ps = new ParticleSystem();
}
void draw() {
tint(#55E4FF);
translate(-width/2, -height/2);
background(0);
blendMode(ADD);
ps.run();
}
this is the piece of code that i use to overlap the image
is there a work around to avoid this problem?